Skip to content

feat(nav): one phone nav for 3.0 (HeaderMenu, NavIcon in place, scoped drawers) - #540

Merged
lorant-one merged 13 commits into
feat/3-0-breaking-cleanupfrom
feat/nav-kit-3-0
Nov 18, 2026
Merged

lorant-one merged 13 commits into
feat/3-0-breaking-cleanupfrom
feat/nav-kit-3-0

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

The core half of the 3.0 nav kit. Stacked on #539 (own icons); retarget to feat/3-0-breaking-cleanup once that merges.

What it fixes (mobile nav audit, 17 Nov)

  • Landings disagreed (hamburger left vs right, the X jumping because the header was redrawn in a drawer, no phone menu at all on two sites).
  • Phone drawers lost a branded app's look because the portal leaves the StyleScope (Frametic's drawer, fixed by hand in motion#170).

What changes

  • HeaderMenu (new): the landing header's phone menu. Put it where the hamburger goes. The header never moves: the same button folds into the cross, the menu opens as a panel under the nearest header, filling the screen below it with page scroll locked, and footer pins the main CTA to its foot. open / defaultOpen / onOpenChange; closes on a link, Escape (focus back to the button), the button, or a window wider than below (default "m"). Disclosure, not a dialog: focus goes to the first link on open, Tab off either end returns to the button.
  • NavIcon draws the built-in menu icon (3 lines) and folds it into close in place; reduced motion = no transition. Now centred in its 40px target. API unchanged.
  • Drawer copies the nearest StyleScope's data-* attributes (plus any outer data-theme/data-brand/data-accent) onto its portal, so Sidebar's phone drawer keeps a branded app's look. Helper internal/scopeAttributes.ts, also used by HeaderMenu.
  • Docs page components/headerMenu.mdx, catalog purpose, subpath export, CHANGELOG entry, bundle-size baseline for the new entry.

Dashboards keep Sidebar (desktop rail + phone drawer); TabBar (#527) stays 3.1.

Screenshots (390 and 1280, dark and light)

In the project's files under nav-kit/core/: phone-{dark,light}-closed.png, phone-{dark,light}-landing-menu.png, phone-{dark,light}-dashboard-drawer.png, desktop-{dark,light}-closed.png, taken from next dev on apps/dev with a proof page (not committed).

Checks

  • New tests: header-menu.test.tsx (6, including the Drawer scope), NavIcon glyph tests. Full core suite passed except 3 specs this PR then fixed (subpath export, safe-area token, spec word list); those re-run green. Typecheck clean, build green.

Generated by Claude Code

…t-ins

178 icons from once-ui-system/icons (rounded line set, shared 24 grid root),
up from 107. Conservative borders square caps and joins through the new
--icon-linecap / --icon-linejoin tokens. check/checkbox changed meaning:
Toast and Feedback success use checkCircle, Checkbox draws check, and the
3.0 codemod reports both names. Native data re-synced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
… StyleScope

- HeaderMenu: a landing header's phone menu. The hamburger turns into the
  cross in place, the menu opens as a panel under the header (page scroll
  locked), footer pins the main call to action. open/defaultOpen/
  onOpenChange; closes on a link, Escape, or above `below`.
- NavIcon draws the built-in menu icon and folds it into close, centred.
- Drawer copies the nearest StyleScope's data attributes onto its portal,
  so Sidebar's phone drawer keeps a branded app's look.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
@lorant-one lorant-one self-assigned this Nov 17, 2026
Generated files regenerated with the repo's scripts: ai/ spec, catalog and
bundles (generate-ai-spec), tokens (export:tokens). Bundle sizes within
budget, lint gate at its baseline, core and foundations tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
Lorant's call (17 Nov): keep the panel under the header, the button usually at
the right end of the bar, and give the motion care. The panel now opens with a
clip from the header's edge, rows arrive one after another and the call to
action lands last; closing folds it back up before it unmounts (at once with
reduced motion). Docs and changelog follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
/nav-kit-proof shows HeaderMenu (at the right end of a landing header) and
Sidebar with its phone drawer; the nav-kit screenshots come from it. Also
commits the AGENTS.md that next dev writes, so the tree stays clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
@lorant-one
lorant-one changed the base branch from feat/own-icon-pack to feat/3-0-breaking-cleanup November 17, 2026 23:49
CHANGELOG keeps both entries; ai/ regenerated with generate-ai-spec;
bundle-size.json re-recorded with --update (adds HeaderMenu, small growth
from Drawer/NavIcon scope work).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxGyk4YVJPL5V3YV6R
@lorant-one
lorant-one merged commit c196c6d into feat/3-0-breaking-cleanup Nov 18, 2026
9 checks passed
@lorant-one
lorant-one deleted the feat/nav-kit-3-0 branch November 21, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants