From 3a1f4274a4645f944d4b8c208af95f4e5ab433a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Tue, 11 Aug 2026 16:49:47 +0200 Subject: [PATCH] docs: specify mobile portal navigation --- ...6-08-11-mobile-portal-navigation-design.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 docs/superpowers/specs/2026-08-11-mobile-portal-navigation-design.md diff --git a/docs/superpowers/specs/2026-08-11-mobile-portal-navigation-design.md b/docs/superpowers/specs/2026-08-11-mobile-portal-navigation-design.md new file mode 100644 index 0000000..1118a13 --- /dev/null +++ b/docs/superpowers/specs/2026-08-11-mobile-portal-navigation-design.md @@ -0,0 +1,80 @@ +# Mobile Portal Navigation Design + +## Goal + +Authenticated admin and editorial users must be able to reach every portal +section on a mobile viewport. The existing desktop navigation remains +unchanged. + +## Scope + +The shared `PortalShell` gains one mobile-only dropdown trigger. The dropdown +uses the same role-specific `nav` items already supplied by the admin and +editorial layouts, so no second navigation catalogue is introduced. + +The mobile header contains: + +- the existing brand link; +- one labelled menu button with a menu/close icon. + +The open dropdown contains: + +- every role-specific navigation destination; +- the existing theme control; +- the existing sign-out action in a visually separated action row. + +On `sm` and larger viewports, the current inline navigation, theme control and +sign-out button remain visible and the mobile trigger and dropdown are hidden. + +## Interaction + +- The trigger exposes its state with `aria-expanded` and references the menu + with `aria-controls`. +- Activating the trigger toggles the dropdown. +- Selecting a navigation link closes the dropdown before navigation. +- Pressing Escape closes the dropdown and returns focus to the trigger. +- Clicking outside the dropdown closes it. +- The current route is indicated visually and with `aria-current="page"`. +- All interactive rows provide a touch target of at least 44 pixels. + +## Visual Direction + +The menu follows the portal's restrained black-and-white identity. It appears +directly below the sticky masthead, inset from the viewport edges, with a solid +background, fine border and modest shadow. Navigation rows use clear spacing +and typography rather than decorative elements. The active destination uses a +high-contrast filled state. Motion is limited to a short opacity/position +transition and is disabled when reduced motion is requested. + +## Component Boundary + +A focused client component, `MobilePortalMenu`, owns open state, focus, +outside-click handling, Escape handling and active-route detection. It receives +only `nav` and `sectionLabel`. `PortalShell` remains a server component and +renders this client boundary alongside the unchanged desktop controls. + +The existing `ThemeToggle` and `LogoutButton` are reused inside the mobile +dropdown. Separate desktop instances remain in the desktop-only control group; +CSS breakpoints ensure only one instance of each control is interactive at a +time. + +## Verification + +Component tests cover: + +- the closed initial state and correct accessible trigger state; +- opening the menu and exposing all supplied navigation destinations; +- rendering the theme and sign-out actions inside the open mobile menu; +- indicating the active destination; +- closing on link activation, Escape and outside click. + +The existing full test, typecheck, lint and production-build checks must remain +green. A mobile viewport smoke check verifies that desktop controls are hidden +and the dropdown provides every role-specific destination. + +## Out of Scope + +- Changing desktop navigation or route names. +- Adding nested navigation levels. +- Changing authentication, authorization or sign-out behavior. +- Adding a full-screen drawer or animation framework.