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

Improve branch select list ui in go templates #29729

Merged
merged 25 commits into from Mar 15, 2024

Conversation

HEREYUA
Copy link
Contributor

@HEREYUA HEREYUA commented Mar 12, 2024

Relate:#27417
Reference: #26631

Before

image

After

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 12, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 12, 2024
@github-actions github-actions bot added modifies/translation modifies/templates This PR modifies the template files labels Mar 13, 2024
@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 Mar 13, 2024
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Mar 14, 2024
web_src/css/repo.css Outdated Show resolved Hide resolved
web_src/css/repo.css Outdated Show resolved Hide resolved
web_src/css/repo.css Outdated Show resolved Hide resolved
@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 14, 2024
@@ -1434,6 +1434,7 @@ issues.choose.ignore_invalid_templates = Invalid templates have been ignored
issues.choose.invalid_templates = %v invalid template(s) found
issues.choose.invalid_config = The issue config contains errors:
issues.no_ref = No Branch/Tag Specified
issues.no_results = No results found.
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, but I have to raise this: Why create a duplicate translation string?

issues.no_results = No results found.
pulls.no_results = No results found.

This will lead to unnecessary work for the translators. Either keep the old key or move to non-namespaced key no_results_found.

@silverwind silverwind self-requested a review March 14, 2024 22:42
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Mar 14, 2024
@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 15, 2024

This CSS was quite a mess formatting wise, I see we need to tighten the linter rules 😆

I'm sorry, I will pay more attention in the future

@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 15, 2024

@HEREYUA would you be interested in merging these two into one in another PR? I will approve this PR with with some remorse.

I will try it

@silverwind
Copy link
Member

Let's fix #29729 (comment), then we can merge this PR.

@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 15, 2024

Let's fix #29729 (comment), then we can merge this PR.

updated, but should the places using pulls.no_results be modified to use no_result_found, does this need to be modified in another PR?

@silverwind
Copy link
Member

silverwind commented Mar 15, 2024

I would say do the renames here. I found these places:

rg pulls.no_results | grep -v options
templates/repo/issue/view_title.tmpl:           <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/issue/branch_selector_field.tmpl:<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/diff/compare.tmpl:   <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/wiki/view.tmpl:        <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/branch_dropdown.tmpl:    'noResults': {{ctx.Locale.Tr "repo.pulls.no_results"}},

@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 15, 2024

I would say do the renames here. I found these places:

rg pulls.no_results | grep -v options
templates/repo/issue/view_title.tmpl:           <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/issue/branch_selector_field.tmpl:<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/diff/compare.tmpl:   <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/wiki/view.tmpl:        <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "repo.pulls.no_results"}}">
templates/repo/branch_dropdown.tmpl:    'noResults': {{ctx.Locale.Tr "repo.pulls.no_results"}},

Okay, I'll make the changes right away.

@silverwind
Copy link
Member

Ok, remove pulls.no_results from the en_US file when done.

@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 15, 2024

Ok, remove pulls.no_results from the en_US file when done.

done

@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 15, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 15, 2024
@lunny lunny merged commit 2eb7c56 into go-gitea:main Mar 15, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Mar 15, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 15, 2024
@HEREYUA HEREYUA deleted the fix/branch_select_ui branch March 15, 2024 04:05
@6543 6543 modified the milestones: 1.23.0, 1.22.0 Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/templates This PR modifies the template files modifies/translation size/M Denotes a PR that changes 30-99 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants