feat: Menu & Navigation Refactor (OP#801, v0.3.1) #12

Merged
Mike Bros merged 5 commits from feature/801-menu-nav-refactor into release/v0.3.1 2026-02-17 06:50:12 +00:00
Contributor

Summary

  • OP#806: Redesigned user dropdown to Forgejo-style with initials avatar, grouped sections, wrench icon for Settings, ARIA attributes
  • OP#807: Restructured user settings routes from /settings to /user/settings with 301 legacy redirects
  • OP#808: Grouped admin sidebar into sections (Appearance, Configuration, Tools) with "Site Administration" heading
  • OP#809: Visual alignment pass — consistent transitions, ARIA, padding, fixed-width icons, left accent border on active sidebar items
  • OP#810: Unit tests for dropdown visibility, legacy redirects, and userInitial helper

Verification

  • User dropdown shows Settings (wrench icon) and Sign Out for regular users
  • Admin dropdown additionally shows Admin Panel and Impersonate
  • Navigating to /settings redirects to /user/settings (check browser network tab for 301)
  • Admin sidebar groups items under section headings with active left border indicator
  • Dashboard switcher has smooth enter/leave animation and responds to Escape key
  • All menus render correctly across light and dark themes
## Summary - OP#806: Redesigned user dropdown to Forgejo-style with initials avatar, grouped sections, wrench icon for Settings, ARIA attributes - OP#807: Restructured user settings routes from `/settings` to `/user/settings` with 301 legacy redirects - OP#808: Grouped admin sidebar into sections (Appearance, Configuration, Tools) with "Site Administration" heading - OP#809: Visual alignment pass — consistent transitions, ARIA, padding, fixed-width icons, left accent border on active sidebar items - OP#810: Unit tests for dropdown visibility, legacy redirects, and userInitial helper ## Verification - [x] User dropdown shows Settings (wrench icon) and Sign Out for regular users - [x] Admin dropdown additionally shows Admin Panel and Impersonate - [x] Navigating to `/settings` redirects to `/user/settings` (check browser network tab for 301) - [x] Admin sidebar groups items under section headings with active left border indicator - [x] Dashboard switcher has smooth enter/leave animation and responds to Escape key - [x] All menus render correctly across light and dark themes ## Links - Epic: [OP#801](https://project.bros.ninja/work_packages/801)
Replaces the flat text-based user dropdown with a Forgejo-inspired
design featuring:
- Initials avatar circle as the dropdown trigger (replaces icon + name)
- "Signed in as" header with username
- Wrench icon for Settings (was cog)
- Server icon for Admin Panel (was cog, matching Forgejo)
- Grouped sections with dividers (user links, admin links, sign out)
- Smooth scale/opacity transitions on open/close
- ARIA attributes (aria-expanded, aria-haspopup) for accessibility
- Escape key closes the dropdown
- Tighter spacing (py-1.5 menu items, rounded-lg instead of rounded-xl)

Also normalizes dashboard switcher dropdown to use rounded-lg and py-1
for visual consistency.

Closes OP#806

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Moves all user settings routes from /settings/* to /user/settings/*
to align with Forgejo's URL conventions. Adds legacy redirect handlers
for /settings and /settings/* to preserve backwards compatibility.

Updates all internal references across routes, handlers, templates,
and sidebar navigation to use the new /user/settings paths.

Closes OP#807

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restructures the admin sidebar into grouped sections with headings:
- Dashboard (overview), Appearance (themes), Configuration (settings,
  authentication), and Tools (impersonate, import).

Renames heading to "Site Administration", updates Dashboard icon to
tachometer-alt, renames "Auth" label to "Authentication", and removes
unused NavItem struct.

Closes OP#808

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dashboard switcher: adds escape key handler, ARIA attributes, smooth
enter/leave transitions, consistent py-1.5 padding, fixed-width icons
with gap-3 layout matching the user dropdown pattern.

Search popover: adds matching smooth enter/leave transitions.

Sidebar navLinks (admin + settings): adds left accent border on active
state and transparent border on inactive for Forgejo-style active page
indicator. Icons now use fixed w-4 text-center for column alignment.

Closes OP#809

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test(nav): add unit tests for menu and navigation refactor
All checks were successful
CI / test (pull_request) Successful in 1m16s
CI / security (pull_request) Successful in 1m45s
CI / build (pull_request) Successful in 1m50s
CI / lint (pull_request) Successful in 2m30s
fd0be159d4
Tests user dropdown visibility: regular user sees Settings + Sign Out
but not Admin; admin sees Settings + Admin + Impersonate + Sign Out;
guest sees login link instead of dropdown.

Tests legacy /settings redirect returns 301 to /user/settings, and
subpath redirects (/settings/appearance → /user/settings/appearance).

Tests userInitial helper for avatar fallback.

Closes OP#810

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gravity Bot changed target branch from main to release/v0.3.1 2026-02-17 06:49:21 +00:00
Mike Bros approved these changes 2026-02-17 06:50:04 +00:00
Mike Bros merged commit 05d6d7e3e8 into release/v0.3.1 2026-02-17 06:50:12 +00:00
Mike Bros deleted branch feature/801-menu-nav-refactor 2026-02-17 06:50:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mike/gashy!12
No description provided.