Skip to content

Load responsive menu behavior at the header breakpoint - #331

Merged
silveltman merged 7 commits into
mainfrom
perf/responsive-menu-loading-20261024
Oct 24, 2026
Merged

silveltman merged 7 commits into
mainfrom
perf/responsive-menu-loading-20261024

Conversation

@silveltman

@silveltman silveltman commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Headers load their menu controller only while the selected header breakpoint matches. Header blocks1 through5 own visibility and activation together (fold="lg" or "xl"). Generic Dialog, Sheet and NavigationMenu accept optional media queries without fixed breakpoints. Controllers clean up on exit or Astro swaps, recreate on return, and preserve the first click, search shortcut and latest programmatic request during import.

The shared helpers and all eight registry styles are regenerated. Original trusted taps still reach the existing native keyboard handoff; deferred replay does not repeat the document gesture handler. First opening can briefly await its download.

Validation: full source check991 files0errors/warnings/hints, build and unit tests pass, existing artifact warnings retained. All102 browser tests pass, including five actual headers with both folds, resizing while open, slow imports, latest close, ClientRouter, SidebarTrigger and delayed search. Native iOS Safari confirms the real keyboard survives a first tap during a deliberately delayed SDK import. Independent follow-up review resolves all three findings. Matching final immutable hosted preview was explored for search and actual header resize/re-entry.

Matched hosted home measurements retain mobile99/desktop100, A/BP100, with preview SEO protection. No client brand, consent, analytics or CMS changes. Earlier failed test fixtures, prior measurements and reviews remain separately attributed.

@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fulldev-ui ready!

Name Link
🔨 Latest commit 2b6a27a
🔍 Latest deploy log https://app.netlify.com/projects/fulldev-ui/deploys/6adcb8f8eba0b597dab1152d
😎 Deploy Preview https://deploy-preview-331--fulldev-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@silveltman
silveltman marked this pull request as ready for review October 24, 2026 14:02
@silveltman
silveltman merged commit 781697c into main Oct 24, 2026
9 checks passed
@silveltman
silveltman deleted the perf/responsive-menu-loading-20261024 branch October 24, 2026 14:08
silveltman added a commit that referenced this pull request Oct 26, 2026
Dialog, Sheet and NavigationMenu import their Data Slot controller
statically and call `create()`, like the other Data Slot components,
instead of loading it per media query (#331 to #333).

- Removes the `onMedia` helper, `src/lib/dialog.ts`, the `on-media`
registry item, the responsive activation docs and their tests. No custom
loader, no loading props.
- `media` stays accepted on the three components with no effect and is
not rendered, so hosted-registry installs since #331 that pass it still
type-check.
- Header blocks 1 to 5 keep `fold="lg" | "xl"` and close the sheet or
navigation menu the layout hides at that breakpoint, which releases the
scroll lock.
- Every Data Slot root script also binds on `astro:after-swap`, before a
site's own `astro:page-load` listeners after ClientRouter navigation;
published `create()` skips bound roots.
- Published `@data-slot/*` ^1.1.2 and Liquid are unchanged. All eight
styles regenerated.
- Changeset: minor (removes a hosted registry item; folds into the
pending 0.26.0 in #330).

Sites that installed the hosted helpers can delete `src/lib/on-media.ts`
and `src/lib/dialog.ts` once nothing imports them.

Validation at `6f8b6aaed`: `vp run check` passes (988 files, 0
errors/warnings/hints; one existing knip configuration hint; registry
matches). Unit 33/33. Build: 0 critical, 503 existing warnings, 357
hints. Browser 67/67 over Chromium, Firefox and WebKit, including all
five headers at both folds (resize closing, scroll unlock, keyboard),
ClientRouter teardown and a site page-load command after navigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- codesmith:footer -->
---
<a
href="https://app.blacksmith.sh/fulldotdev/codesmith/ui/pr/334?autoLogin=true&ref=codesmith_pr_footer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img
alt="View with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png"
width="162" height="28"></picture></a> <a
href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795605680&installation_model_id=442937&pr_number=334&ref=codesmith_pr_footer&repository=fulldotdev%2Fui&return_to=https%3A%2F%2Fgithub.com%2Ffulldotdev%2Fui%2Fpull%2F334&signature=d7fb5d0be6a73d145913bee3421c8644b601fbc9be00eeabc33a5c82851a02c3"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you
need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant