Skip to content

enhance(ui): hide the dashboard context switcher when there is nothing to switch to - #38669

Open
kp2fcf88vn-lab wants to merge 1 commit into
go-gitea:mainfrom
kp2fcf88vn-lab:hide-empty-dashboard-context-switcher
Open

enhance(ui): hide the dashboard context switcher when there is nothing to switch to#38669
kp2fcf88vn-lab wants to merge 1 commit into
go-gitea:mainfrom
kp2fcf88vn-lab:hide-empty-dashboard-context-switcher

Conversation

@kp2fcf88vn-lab

@kp2fcf88vn-lab kp2fcf88vn-lab commented Jul 27, 2026

Copy link
Copy Markdown

For a user who belongs to no organization, the secondary navigation bar on the dashboard, issues, pulls and milestones pages holds a single dropdown whose only entry is the user themselves - a full-width strip of chrome that cannot change anything.

It is now rendered only when the user belongs to at least one organization, or when the dashboard is viewed in an organization context, where the bar also carries the team filter and the organization navigation.

"New Organization" stays reachable: the navbar create menu already links to /org/create behind the same CanCreateOrganization check. No CSS change is needed, base.css already gives the page its top spacing when the bar is absent.

Screenshots

Dashboard of a user who belongs to no organization.

Before:

dashboard-before

After:

dashboard-after

Unchanged for users who belong to an organization, and on organization dashboards.

AI disclosure

Made with AI assistance (Claude Opus 5 via Claude Code), which drafted the change and this summary; the commit carries a matching Co-authored-by trailer. I reviewed the diff, verified it against a local build, and can explain and revise it during review.

The dashboard, issues, pulls and milestones pages always render the
secondary navigation bar, even for a user who belongs to no
organization. In that case the bar holds a single dropdown whose only
entry is the signed-in user themselves, so it costs a full-width strip
of chrome and offers nothing to act on.

Render the bar only when the user has at least one organization, or when
the dashboard is being viewed in an organization context, where the bar
also carries the team filter and the organization navigation.

Creating an organization stays reachable: the navbar create menu already
links to /org/create for users allowed to create one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Sascha Simon <apps@sascha-simon.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 27, 2026
@kp2fcf88vn-lab kp2fcf88vn-lab changed the title Hide the dashboard context switcher when there is nothing to switch to enhance(ui): hide the dashboard context switcher when there is nothing to switch to Jul 27, 2026
@kp2fcf88vn-lab
kp2fcf88vn-lab marked this pull request as ready for review July 27, 2026 17:50
@github-actions github-actions Bot added topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. 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.

2 participants