Feat/mobile nav#38
Merged
Merged
Conversation
- Hamburger toggle button rendered in header when nav content exists; hidden via CSS on desktop (>640px), shown on mobile (≤640px) - Toggle uses aria-expanded to drive open/closed state entirely through CSS — no JS class toggling; sibling selector shows/hides the drawer - Icon animates three bars → × on open using CSS transform - Closes on Escape key, outside pointer click, and toggle re-click - React: useState + useEffect for keyboard/outside handlers - Web component: _menuOpen on BrandHeaderElement instance; event listeners wired in build(), cleaned up on re-render and disconnect - Vue and Svelte inherit behavior through the web component automatically - 4 new web component tests (toggle renders, click toggles, Escape closes, no toggle when no nav content) - New stories: Header/MobileHamburger, Shell/MobileHamburger - prefers-reduced-motion support for hamburger icon animation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Header uses useState/useEffect/useRef/useCallback and must be a Client Component in Next.js 13+ App Router. "use client" is added to Header.tsx in source and injected into dist/index.mjs at build time via a rolldown renderChunk plugin, leaving web.mjs/vue.mjs/svelte.mjs untouched. The check-pack size regex is updated to also handle MB-unit output from newer bun versions, converting to KB before comparing against the budget. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ae528ec to
a6ee904
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.