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 Bug in Issue/pulls list #32081

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cloudchamb3r
Copy link

@cloudchamb3r cloudchamb3r commented Sep 19, 2024

fix #32080

After

for opened issues

Screenshot 2024-09-19 at 6 29 31 PM

for closed issues

Screenshot 2024-09-19 at 6 29 37 PM

for all issues

Screenshot 2024-09-20 at 12 07 12 PM

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 19, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 19, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Sep 19, 2024
@techknowlogick techknowlogick added type/bug topic/ui Change the appearance of the Gitea UI backport/v1.22 This PR should be backported to Gitea 1.22 labels Sep 19, 2024
@@ -467,6 +467,9 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
ctx.Data["AssigneeID"] = assigneeID
ctx.Data["PosterID"] = posterID
ctx.Data["Keyword"] = keyword
if isShowClosed.Has() {
ctx.Data["IsShowClosed"] = isShowClosed.Value()
Copy link
Member

Choose a reason for hiding this comment

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

I think since IsShowClosed has 3 states, it's better to change the template. the current implementation has only two states. ctx.Data["IsShowClosed"] = false is equal to not set the template variable.

Copy link
Author

@cloudchamb3r cloudchamb3r Sep 20, 2024

Choose a reason for hiding this comment

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

As far as I know when state query parameter is not setted (that also means IsShowClosed does not have a value), issue list shows opened issues.
I think in that case, ctx.Data["IsShowClosed"] = false doesn't seemed to be error prone.
Is there are any edge cases that i'm missing?

I found a edge case that select all issue. in that case I'll make not to show open or close button. Is that would be ok?

@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitea always shows close button when I clicked multi select checkbox in issue list
4 participants