Skip to content

Change admin indicator to icon-only #34586

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 3 commits into
base: main
Choose a base branch
from

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 2, 2025

Change admin indicator in navbar to icon only, which looks better imho, and the icon is the same as "Site Administration" in this menu, which is exactly what the admin role gives access to. User can hover over the icon to get a native title tooltip which localized text.

Screenshot 2025-06-02 at 19 02 17

Works with any avatar and is now aligned to the notifications and stopwatch dots:

Screenshot 2025-06-02 at 19 07 37

(Before there was slight misalignment):

Screenshot 2025-06-02 at 19 01 29

Active state:

Screenshot 2025-06-02 at 19 08 56

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 2, 2025
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Jun 2, 2025
@silverwind silverwind added the backport/v1.24 This PR should be backported to Gitea 1.24 label Jun 2, 2025
@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 2, 2025
@techknowlogick techknowlogick added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Jun 2, 2025
@@ -130,8 +130,7 @@
<span class="only-mobile">{{.SignedUser.Name}}</span>
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
</span>
{{/* do not localize it, here it needs the fixed length (width) to make UI comfortable */}}
{{if .IsAdmin}}<span class="navbar-profile-admin">admin</span>{{end}}
{{if .IsAdmin}}<span class="navbar-profile-admin" title="{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}">{{svg "octicon-server" 11}}</span>{{end}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not think it's right. That text is for "repo admin"

But here it is "site admin"

Copy link
Member Author

@silverwind silverwind Jun 3, 2025

Choose a reason for hiding this comment

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

Hmm right, I guess we can just remove the title completely. Unfortunately, there is no suitable existing translation and I would like to backport.

@silverwind silverwind changed the title Change admin indicator to icon-only with title Change admin indicator to icon-only Jun 3, 2025
@wxiaoguang
Copy link
Contributor

Besides the "text" problem, the "icon" is more not-suitable .... why there is a "server" icon next to the user's avatar, it seems more strange.

@silverwind
Copy link
Member Author

silverwind commented Jun 3, 2025

I think the purpose becomes clear when opening the dropdown.

image

@wxiaoguang
Copy link
Contributor

I think the purpose becomes clear when opening the dropdown.

But it still confuses users at first glance.

And the icon is also inconsistent with other navbar items like "notification", "stopwatch": they all use the blue balls.

@silverwind
Copy link
Member Author

silverwind commented Jun 3, 2025

I read such blue dots as "activity indicator", but admin info is not such a state, it's a user attribute.

@a1012112796
Copy link
Member

I'd like put it at right botom side
image

@hiifong
Copy link
Member

hiifong commented Jun 4, 2025

Besides the "text" problem, the "icon" is more not-suitable .... why there is a "server" icon next to the user's avatar, it seems more strange.

+1

@silverwind
Copy link
Member Author

Could move it, yeah. It doesn't have to be same position as the other blue activity indcators.

@silverwind
Copy link
Member Author

Any other suggestions? Things about the current icon that I don't like:

  • That it's blue. Blue is activity indicator, but this is not one
  • That it's so big. I would prefer something more subtle

@silverwind
Copy link
Member Author

Another possible icon would be the wrench. I find that more suitable than the server icon:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/frontend modifies/templates This PR modifies the template files skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants