Skip to content

Adds title on branch commit counts #34869

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

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

Conversation

ajmeese7
Copy link

Adds a title to the commit counts when comparing branches, making it easier for novice users to understand what the numbers mean.

Fixes #34867.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 26, 2025
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Jun 26, 2025
@lunny
Copy link
Member

lunny commented Jun 26, 2025

It needs to be translationable.

@silverwind
Copy link
Member

Use data-tooltip-content instead.

@ajmeese7 ajmeese7 force-pushed the feat/commit-count-title branch from a60ece2 to 556fcf7 Compare June 29, 2025 22:39
@delvh
Copy link
Member

delvh commented Jun 30, 2025

Also, wouldn't it make sense to unify both titles into a single title on the parent element?
So it would compare both behind and ahead in the same title.

@wxiaoguang
Copy link
Contributor

Also, wouldn't it make sense to unify both titles into a single title on the parent element? So it would compare both behind and ahead in the same title.

My thought is that why duplicate the numbers in the tooltip .... could it simply just show a fixed tool tip like "Commits ahead", and let users read the rendered number on the UI?

@ajmeese7
Copy link
Author

Also, wouldn't it make sense to unify both titles into a single title on the parent element? So it would compare both behind and ahead in the same title.

My thought is that why duplicate the numbers in the tooltip .... could it simply just show a fixed tool tip like "Commits ahead", and let users read the rendered number on the UI?

That is what GitLab does, that is the behavior I am emulating

@ajmeese7
Copy link
Author

Also, wouldn't it make sense to unify both titles into a single title on the parent element? So it would compare both behind and ahead in the same title.

Working on this now.

@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 Jun 30, 2025
@wxiaoguang
Copy link
Contributor

The current texts are not really translatable.

I'd prefer GitHub's wording, so I think we can make it "Behind count: %d, ahead count: %d", then everything can be simplified. Will make some changes.

@wxiaoguang
Copy link
Contributor

Sometimes it's not easy to fine tune the i18n resources ... I can understand why GitHub drops their i18n support on the web UI.

Does the new tooltip look good to you?

image

@ajmeese7
Copy link
Author

ajmeese7 commented Jul 1, 2025

Sometimes it's not easy to fine tune the i18n resources ... I can understand why GitHub drops their i18n support on the web UI.

Does the new tooltip look good to you?

image

I think it needs to say "ahead of main" if you want to take this approach

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
@wxiaoguang
Copy link
Contributor

Anything else to improve?

@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 Jul 1, 2025
@wxiaoguang wxiaoguang added this to the 1.25.0 milestone Jul 1, 2025
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Jul 1, 2025
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 type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooltip over commit counts for different branches
6 participants