Repository navigation
A phone menu on pages without a sidebar - #104
Merged
Merged
Conversation
On phones the header hides its main links. Docs pages reach them through Starlight's menu button, but the splash pages (/, /pricing/, /examples/, /playground/ and the 404) had no way to the main sections at all. Those pages now get a menu button in the same place and style as Starlight's. It opens a panel under the header with the six main links and the theme switch, which phones also lost on these pages. The panel is a popover, so it opens, closes on Escape and closes on a tap outside even before scripts run. The script keeps aria-expanded in sync, returns focus to the button on Escape, and closes the panel when focus moves past it, when a link is followed or when the page widens. It settles in over the site's 320 ms UI timing, without movement under reduced motion. Docs pages and the desktop header are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
On phones (50rem and below) the header hides its main links. Docs pages reach them through Starlight's menu button. The splash pages (
/,/pricing/,/examples/,/playground/and the 404) had no way to the main sections. The owner picked option A, a menu button with a panel, over a scrolling row of links.aria-expandedin sync;Evidence
Phone screenshots at 375 px. Before:
/and/pricing/. After:/closed and open, then/pricing/open in dark mode.tests/site/menu.spec.tsagainst themainbuild: 9 failed (no menu button on splash pages).After: 9 passed. The whole
site-chromiumproject: 91 passed.bun run lintandbun run checkpass./docs/at 375 px is byte-identical before and after. The desktop header at 1280 px is byte-identical to dotquilt.dev.Merge Danger
Door: two-way
Blast Radius: header
Phones only, on pages without a sidebar. The existing 320 px fit test covers a crowded header. Popover support (Safari 17+, Firefox 125+) is what Starlight's own sidebar menu already needs. PR #103 doesn't touch
Header.astro.🤖 Generated with Claude Code