Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Only use prev and next buttons for pagination on user dashboard#33981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@lunny
Copy link
Member

@lunnylunny commentedMar 23, 2025
edited
Loading

The pagination on the user dashboard sounds unnecessary, this will change it to a prev/next buttons. For instances with around10 million records in the action table, this option affects how the user dashboard is loaded on first visit.

Before:

image

After:

image

@lunnylunny added the performance/speedperformance issues with slow downs labelMar 23, 2025
@lunnylunny added this to the1.24.0 milestoneMar 23, 2025
@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelMar 23, 2025
@github-actionsgithub-actionsbot added modifies/goPull requests that update Go code modifies/templatesThis PR modifies the template files docs-update-neededThe document needs to be updated synchronously labelsMar 23, 2025
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsMar 23, 2025
wxiaoguang
wxiaoguang previously requested changesMar 23, 2025
Copy link
Contributor

@wxiaoguangwxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why a new unnecessary config option and why keep copying-pasting the code , and whymath.MaxInt32

@GiteaBotGiteaBot added lgtm/blockedA maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsMar 23, 2025
@wxiaoguang
Copy link
Contributor

It should make a "Paginator" like this: Pages=nil, HasPrev=true, HasNext=true

@lunny
Copy link
MemberAuthor

It should make a "Paginator" like this: Pages=nil, HasPrev=true, HasNext=true

Did you mean reuse the original template? Then we still need to handleIsFirst andIsLast. TheIsLast is not easy to handle.

@github-actionsgithub-actionsbot removed modifies/templatesThis PR modifies the template files docs-update-neededThe document needs to be updated synchronously labelsMar 23, 2025
@github-actionsgithub-actionsbot added the modifies/templatesThis PR modifies the template files labelMar 23, 2025
@wxiaoguangwxiaoguangforce-pushed thelunny/allow_no_pagination_user_dashboard branch frome2f13c0 to19d11c3CompareMarch 23, 2025 08:07
@wxiaoguangwxiaoguangforce-pushed thelunny/allow_no_pagination_user_dashboard branch from19d11c3 to69aa478CompareMarch 23, 2025 08:10
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/blockedA maintainer has reservations with the PR and thus it cannot be merged labelsMar 23, 2025
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsMar 23, 2025
@lunny
Copy link
MemberAuthor

Is it necessary to display the current page?

image

@wxiaoguang
Copy link
Contributor

Is it necessary to display the current page?

I believe yes. Otherwise, how could a user know which page they are viewing?

@lunnylunny added the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelMar 23, 2025
@lunnylunnyenabled auto-merge (squash)March 23, 2025 18:54
@wxiaoguang
Copy link
Contributor

wxiaoguang commentedMar 23, 2025
edited
Loading

Still need to fix some edge cases:

  • the "empty activity" prompt
  • the "last page"

Ideally we should write some tests for the "user dashboard page" to check various cases.


image


image


image

@wxiaoguangwxiaoguangforce-pushed thelunny/allow_no_pagination_user_dashboard branch fromf10dd0b to9271280CompareMarch 23, 2025 19:21
@wxiaoguangwxiaoguangforce-pushed thelunny/allow_no_pagination_user_dashboard branch from9271280 to1f790ecCompareMarch 23, 2025 19:27
@wxiaoguangwxiaoguangenabled auto-merge (squash)March 23, 2025 19:29
@wxiaoguangwxiaoguang changed the titleDon't display pagination on user dashboard by default but with prev and next buttonsOnly use prev and next buttons for pagination on user dashboardMar 23, 2025
@wxiaoguangwxiaoguangenabled auto-merge (squash)March 23, 2025 19:30
@wxiaoguangwxiaoguang merged commit30ee082 intogo-gitea:mainMar 23, 2025
26 checks passed
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelMar 23, 2025
@lunnylunny deleted the lunny/allow_no_pagination_user_dashboard branchMarch 23, 2025 21:46
zjjhot added a commit to zjjhot/gitea that referenced this pull requestMar 24, 2025
* giteaofficial/main:  [skip ci] Updated translations via Crowdin  Only use prev and next buttons for pagination on user dashboard (go-gitea#33981)  update jwt and redis packages (go-gitea#33984)  [skip ci] Updated translations via Crowdin  Improve oauth2 error handling (go-gitea#33969)  [skip ci] Updated translations via Crowdin  Cover `go.mod` and `go.sum` in `.editorconfig` (go-gitea#33960)  Drop timeout for requests made to the internal hook api (go-gitea#33947)  Fix file name could not be searched if the file was not a text file when using the Bleve indexer (go-gitea#33959)  Fix oauth2 auth and UI (go-gitea#33961)  Allow filtering issues by any assignee (go-gitea#33343)  Optimize total count of feed when loading activities in user dashboard. (go-gitea#33841)  Extract code to their own functions for push update (go-gitea#33944)  Optimize heatmap query (go-gitea#33853)
@go-giteago-gitea locked asresolvedand limited conversation to collaboratorsJun 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@wxiaoguangwxiaoguangwxiaoguang approved these changes

+1 more reviewer

@appleboyappleboyappleboy approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/goPull requests that update Go codemodifies/templatesThis PR modifies the template filesperformance/speedperformance issues with slow downs

Projects

None yet

Milestone

1.24.0

Development

Successfully merging this pull request may close these issues.

4 participants

@lunny@wxiaoguang@appleboy@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp