Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pagination on /notifications/watching #23564

Merged
merged 4 commits into from
Mar 21, 2023

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Mar 18, 2023

The q parameter was not rendered in pagination links because context.Pagination:AddParam checks for existance of the parameter in ctx.Data where it was absent. Added the parameter there to fix it.

@silverwind silverwind changed the title Fix pagionation on /notifications/watching page Fix pagination with q on /notifications/watching page Mar 18, 2023
@silverwind silverwind added type/bug outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Mar 18, 2023
@silverwind silverwind added this to the 1.20.0 milestone Mar 18, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 18, 2023
@silverwind silverwind changed the title Fix pagination with q on /notifications/watching page Fix pagination /notifications/watching page Mar 20, 2023
@silverwind silverwind changed the title Fix pagination /notifications/watching page Fix pagination on /notifications/watching Mar 20, 2023
Copy link
Member

@yardenshoham yardenshoham left a comment

Choose a reason for hiding this comment

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

To avoid duplication you could use keyword instead of ctx.FormTrim("q") in

Keyword: ctx.FormTrim("q"),

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 20, 2023
@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 20, 2023
@jolheiser jolheiser enabled auto-merge (squash) March 21, 2023 00:43
@jolheiser
Copy link
Member

🎺 🤖

@jolheiser jolheiser merged commit 45aa4ea into go-gitea:main Mar 21, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Mar 21, 2023
The `q` parameter was not rendered in pagination links because
`context.Pagination:AddParam` checks for existance of the parameter in
`ctx.Data` where it was absent. Added the parameter there to fix it.
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Mar 21, 2023
@jolheiser jolheiser removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 21, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 21, 2023
* upstream/main:
  Replace a few fontawesome icons with svg (go-gitea#23602)
  Fix pagination on `/notifications/watching` (go-gitea#23564)
  Fix `.locale.Tr` function not found in delete modal (go-gitea#23468)
  fix submodule is nil panic (go-gitea#23588)
  `Publish Review` buttons should indicate why they are disabled (go-gitea#23598)
  Improve template error reporting (go-gitea#23396)
  Polyfill the window.customElements (go-gitea#23592)
  Add CHANGELOG for 1.19.0 (go-gitea#23583)
@silverwind silverwind deleted the watching-pagination branch March 21, 2023 15:02
jolheiser pushed a commit that referenced this pull request Mar 21, 2023
Backport #23564 by @silverwind

The `q` parameter was not rendered in pagination links because
`context.Pagination:AddParam` checks for existance of the parameter in
`ctx.Data` where it was absent. Added the parameter there to fix it.

Co-authored-by: silverwind <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants