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 counting and filtering on the dashboard page for issues #26657

Merged
merged 21 commits into from
Aug 23, 2023
Merged

Fix counting and filtering on the dashboard page for issues #26657

merged 21 commits into from
Aug 23, 2023

Conversation

wolfogre
Copy link
Member

@wolfogre wolfogre commented Aug 22, 2023

This PR actually has multiple parts, and I didn't split them because it's not easy to test them separately since they are all about the dashboard page for issues.

  1. Support counting issues via indexer, to fix The incoming request has too many parameters. This server supports a maximum of 2100 parameters.  #26361
  2. Fix repo selection, so it also fix Incorrect selection behavior at repo list , on the left side of the issues page. #26653
  3. Keep keyword in filter links.

The first two are regressions of #26012.

After:

Screen.Recording.2023-08-22.at.17.51.28.mov

Thanks to @CaiCandong for helping with some tests.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 22, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 22, 2023
@wolfogre wolfogre added type/bug and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 22, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 22, 2023
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Aug 22, 2023
@zjjhot
Copy link
Contributor

zjjhot commented Aug 22, 2023

Thank you very much. I have a suggestion.

Issues that have existed in history can be displayed in the repo list (even if this issue module is prohibited from accessing, it is reasonable to exist, and I can always see records of historical existence, which is fine).

However, those that have never been issued (count=0) should not be displayed in the repo list, especially those repos that disabled by issue module.

@wolfogre
Copy link
Member Author

Issues that have existed in history can be displayed in the repo list (even if this issue module is prohibited from accessing, it is reasonable to exist, and I can always see records of historical existence, which is fine).

Not sure, maybe another PR.

However, those that have never been issued (count=0) should not be displayed in the repo list, especially those repos that disabled by issue module.

Done in e56c59a

@CaiCandong
Copy link
Member

	for k, v := range issueCountByRepo {
		if _, ok := selectedReposMap[k]; !ok && v == 0 {
			delete(issueCountByRepo, k)
		}
	}

Maybe we can use https://pkg.go.dev/maps@go1.21.0#DeleteFunc

@wolfogre
Copy link
Member Author

Maybe we can use pkg.go.dev/maps@go1.21.0#DeleteFunc

Not now, Gitea is still using go1.20:

gitea/go.mod

Line 3 in 1432d4e

go 1.20

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 22, 2023
@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 Aug 23, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 23, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) August 23, 2023 01:31
@techknowlogick techknowlogick merged commit 5db21ce into go-gitea:main Aug 23, 2023
23 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Aug 23, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 23, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 23, 2023
* giteaofficial/main:
  Fix counting and filtering on the dashboard page for issues (go-gitea#26657)
  add mfa doc (go-gitea#26654)
  [Refactor] getIssueStatsChunk to move inner function into own one (go-gitea#26671)
  Use line-height: normal by default (go-gitea#26635)
  Improve repo sub menu (go-gitea#26531)
  Fix organization list in dashboard (go-gitea#26650)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
7 participants