Repository navigation
fix(components): the sticky nav overflows on mobile and never pins - #203
Conversation
The row's four items are each `basis-1/4` with labels that do not wrap, so it cannot shrink below their min-content width of about 553px. It sits outside any `overflow` container, so instead of clipping it pushed the document itself sideways: `scrollWidth` 577 against a 390px `clientWidth` on `/`, `/about-meditation` and `/vishuddhi-chakra`, measured in Chromium at 320, 360 and 390. A container-level `overflow-x: hidden` would hide the symptom and clip the nav's own mega-menu. Guarding the row the way the banner rows above it already do removes the cause, and leaves `lg:` and above untouched. What replaces the row below `lg:` is still open on the ticket; this change does not answer it. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013WrBzBbojHKgeC3GfSMys9
With the nav row gone below `lg:`, the compact logo and the map pin are the sticky bar's only controls, and both were 16x16 anchors wrapping an `aria-hidden` icon — no accessible name, and a hit area a third of the 44x44 the design system requires. Each now carries `touch-target-overlay`, which leaves the drawn 16px icon alone so the bar keeps its height at `lg:` and above; they sit at opposite ends of the bar, well past the 44px where two overlays would fight over a shared strip. The logo takes the `common.general.site_title` translation and the pin takes the class page's own title, so neither adds a literal. The `condensed` assertion moves to matching element text, because the pin's `aria-label` now carries the action link's string too. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013WrBzBbojHKgeC3GfSMys9
With the nav row hidden, the bar's only children are a 16px logo and a 16px map pin in a container with no vertical padding, so the bar collapsed to 18px. A 44x44 `::before` centred on a 16px box inside an 18px bar hangs 13px past each edge, and once the bar is pinned at `top-0` the upper half falls outside the viewport: hit-testing a point grid on `/map` at 390px returned a reachable area of 44x31, not 44x44. `min-h-11` on the bar gives the overlay room to land. It is inert at `lg:` and above, where the nav row already makes the bar 44px tall — re-measured there as an unchanged 46px outer height, items at 186x44 and the row box at [128,896] and [256,1024]. Also drops a measured pixel figure from a comment that content length decides, and trims the assertions to the pair-matching idiom the file already uses. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013WrBzBbojHKgeC3GfSMys9
Un-stuck below `lg:` the bar now holds nothing — the row is hidden and both icon controls are `opacity-0` — so its `border-t`/`border-b` read as an empty 44px gap at the top of every mobile page, where nav items used to be. It is not drawn there at all until the observer sticks it, which is the state the compact logo and map pin exist for. Two corrections from the same review pass: - The row comment claimed it "sits outside any `overflow` container". False under `LayoutMap`, whose `overflow-hidden` wrapper clipped the row instead — which is why `/map` never scrolled sideways. - The default-render test matched `Classes near me` as a bare substring, which the map pin's new `aria-label` satisfies on its own, so the banner's action link could have been deleted with the test still green. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013WrBzBbojHKgeC3GfSMys9
The 44x44 `::before` is centred on its control, so a container shorter than 44px leaves it hanging outside, and a bar pinned at `top-0` loses the half above the viewport. Records the measurement that found it — 44x31 reachable against a `touch-target-overlay` class list — and the method, since reading the markup cannot catch this. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013WrBzBbojHKgeC3GfSMys9
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | 8a11f1e | Commit Preview URL Branch Preview URL |
Oct 30 2026, 11:03 PM |
Deploying wemeditate-design with
|
| Latest commit: |
8a11f1e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a71eb725.wm-design.pages.dev |
| Branch Preview URL: | https://claude-fix-202-sticky-nav-ov.wm-design.pages.dev |
sydevs-bot
left a comment
There was a problem hiding this comment.
2 questions for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The overflow fix is right, and it is one class pair. hidden lg:flex on the row, confirmed in the served HTML of all four preview routes.
The joined touch-target half is where the diff outgrows its problem. It keeps touch-target-overlay on two 16px controls, hand-writes min-h-11 on their container, then amends a shared rule file to permit that. Three pieces, where the repo's own rule says to reach for touch-target first. One swap gives both controls a 44×44 box, floors the bar from its own content, and leaves the rule file alone.
No contract surface is touched. Both question threads are genuine decisions, correctly left to you. The ticket's "navItems is per page" premise is indeed wrong: layouts/useSiteNav.ts builds one list from the global config for every route.
Findings
- should-fix
Header.tsx:148—min-h-11is the hand-written floor the rule forbids.touch-targeton the two controls replaces it and the new doc paragraph. - should-fix
docs/rules/design-system.md:40— the new rule over-claims. It readsColumnCarousel's dots andAlert's cross as violations. - should-fix
Header.tsx:156— both icon controls stay keyboard-focusable whileopacity-0, and now carry names. SC 2.4.7.
What was checked
- Read whole:
Header.tsx,Logo.tsx(it spreadsaria-labelonto itsLink), both touch-target utilities inlayouts/tailwind.css,layouts/useSiteNav.ts,docs/rules/design-system.md,docs/rules/tailwind.md. - All five
## Previewlinks return 200. Served HTML on/,/about-meditationand/vishuddhi-chakracarrieshidden lg:flexon the row,min-h-11on the bar,hidden lg:blockon the un-stuck nav, twotouch-target-overlays and botharia-labels./mapserves the sticky class list instead. - Grepped all eight
touch-target*call sites.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`touch-target-overlay` plus a hand-written `min-h-11` was three pieces where one is enough, and the rule file says to reach for `touch-target` first. Both icon controls now carry a 44x44 box of their own, which floors the bar from its own content and cannot be clipped: the hit area is the box, so it stays inside a bar pinned at `top-0` instead of hanging half above the viewport. `items-center` on the logo and `justify-end` on the pin hold the drawn 16px icons where they were, so the box grows inward only. Measured in Chromium with `document.elementFromPoint`, against the real compiled stylesheet, at 390 / 1024 / 1280: - both controls reachable 44x44, the whole area inside the 44px bar - bar 44px content / 46px with its borders, unchanged at every width - nav row still [128,896] at 1024 and [256,1024] at 1280 - drawn logo and pin unmoved; `scrollWidth === clientWidth` Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXWxpV6xcr5U2ntzMh
The rule read "hangs outside any box shorter than 44px", which describes every correct use of the utility — `ColumnCarousel`'s 8px dots and `Alert`'s cross both hang well outside their boxes on purpose, and the stylesheet says the overlay leaves the box alone by design. As written those two call sites read as violations. Box height is not the test. An edge that cuts the `::before` off is: the viewport for a bar pinned at `top-0`, or an `overflow` ancestor. Names both, and keeps the measurement and the method, which are what reading a class list cannot give you. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXWxpV6xcr5U2ntzMh
`pointer-events-none` stops the mouse and nothing else. At `lg:` un-stuck the bar is drawn with both icon controls at `opacity-0`, so a keyboard reached two links nobody can see — and this branch had just given them accessible names, so a reader announced them too. SC 2.4.7. `invisible` takes them out of both the tab order and the accessibility tree, and makes `pointer-events-none` redundant. Measured in Chromium at 1280, un-stuck: twelve Tab presses now cycle the banner logo, the banner action link and the two nav items; before, the compact logo and map pin sat between them at `opacity: 0`. They hide at once rather than fading out. `visibility` cannot be animated from here — `Logo`'s own `transition-opacity` wins over a property list set at the call site, measured as `transition-property: opacity` on the logo against `opacity, visibility` on the pin's wrapper. A fade only one of the two controls kept is worse than neither keeping it. Both controls now share one style string, so the state has a single home. Refs: #202 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXWxpV6xcr5U2ntzMh
|
All three adversarial-review findings adopted, in
Nothing rebutted. Gate green: lint 0 errors, Both question threads are still yours: what replaces the nav row below 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
@sydevs-bot Revise. The recent changes have made it so that the left and right button have their text truncated in basically all cases on mobile. The left and right buttons are much more important that the dots, so we need to address this cleanly. Only option might be to make it so that on mobile the dots appear above the left/right button rather than inline, but I'm also open to other proposals |
|
The session for this item did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
`basis-1/4` hard-coded four items against the list `useSiteNav` builds from `featuredPages`, so adding a fifth featured page in SahajCloud overflowed the desktop row with no code change. `justify-center gap-2` sizes each item to its own label instead, and the `px-0` that compensated for the quarter-width basis goes with it. The reviewer chose this over documenting the count assumption (option B on the `basis-1/4` thread). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2eVApvUXDT2nEnqi
The text variant restated "We meditate" as a literal, so the mark read English in every locale while the icon variant's accessible name was already translated. It now derives the wordmark from `common.general.site_title` and applies the mark's own typography generically — the initial capital stays, the rest lower-cases, and a stacked alignment takes a line per word — so a locale needs no second key for the lockup. English is unchanged to the character. Casing comes from `String.prototype.toLowerCase`, which is locale-insensitive; a script without case is unaffected and Turkish dotted-I is the one tag where it would differ from the locale's own rule. `Logo` reads `useT()` like `Breadcrumbs`, `Image`, `Spinner`, `Countdown` and `SocialIcon` already do. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2eVApvUXDT2nEnqi
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-design | 8a11f1e | Commit Preview URL Branch Preview URL |
Oct 30 2026, 11:03 PM |
The comments on the previous commit repeated the review thread's prediction that a fifth featured page overflows the desktop row. Measured in Chromium against the compiled stylesheet, it does not: the items shrink to their min-content width and the labels wrap instead. At 1024 with five items, `basis-1/4` forced 147px columns, wrapped four of the five labels to a third line and took the bar from 46px to 58px. Content widths fit the same five on one line at 46px. Seven items wrap either way. So the change is still right, for the reason the reviewer gave — it deletes a count assumption — and not for the overflow nobody can reproduce. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2eVApvUXDT2nEnqi
|
Both answers built, on
A correction. 81dcaa3 claimed a fifth featured page overflows the desktop row. Measured, it does not: it wraps four labels and adds 12px of bar height. Gate green on the merged branch: lint 0 errors, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
Your #234 holds the trigger's seam in the compact bar, the Nothing was pushed here. No code changed: #234 carries the work. Body refreshed — verification step 7 and the first reviewer note now point at #234. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
lg:, so the document stops scrolling sideways on a phone.LayoutChromewrapped the whole header in a short box. The page band reaches the header as classes now, so the only box above the nav is the page itself.invisiblekeeps both off the tab order while they are faded — naming them had made a reader announce two links nobody can see.basis-1/4thread: the desktop row sizes every item by its own label now, so the four-item assumption is gone.common.general.site_title, formatted generically, so it is no longer English in every locale.Change outline
Layouts — the sticky nav's containing block (#204)
A sticky element travels only inside its containing block. Every box between the page and the nav took that travel away, so the nav was released one header-height down and scrolled off, while its observer still switched on the stuck styling and faded in the compact logo and pin — off-screen.
The overlay now spans the column rather than the header, so the nav inside it still has the page to travel;
pointer-events-noneleaves the content below its clicks, and the banner and the bar take theirs back.Headerapplies the band to the banner and to the un-stuck nav, andfull-bleedstill replaces it once the nav sticks.Components — the sticky bar, by viewport
The row is the only thing removed. The bar keeps the compact logo and map pin, and takes its height from them.
touch-targetis the utility the rule file says to reach for first. It replaces three pieces — an overlay on each 16px control, a hand-writtenmin-h-11on their container, and a rule amendment permitting that — with one.docs/rules/design-system.mdinstead corrects what the overlay's real hazard is: an edge that clips the::before, not a short box, which is every correct use of it. That correction citesAlert's 16px cross alone — #201 is takingColumnCarousel's dots off the overlay for 40×40 cells atgap-0, per #135.Atoms — the logo's visible wordmark
The formatting is the generic one the reviewer asked for: the initial capital stays, the rest lower-cases, and a space becomes a line break for the stacked
align="left"/align="right"lockup. English renders character-identical, so no locale needs a second key for the wrap.Behaviour — what each viewport gets
Preview
Both previews redeploy from
8a11f1e. The web preview reads production SahajCloud, so every link opens on real content — set the viewport width in devtools, since a width cannot be deep-linked.scrollWidthequalsclientWidth; it was 577. No bar at the top of the page any more. Scroll, and the bar now pins: this is the lead-splash case.LayoutMap, which always pinned and is untouched here. At 390 the bar is the whole chrome: logo left, classes link right.wemeditate-designWorker, so this host replaces the oldwm-design.pages.devone.The overflow fix was verified on these hosts at
e25f8d5, across all 9 page×width combinations. Everything since is measured in Chromium against the real compiled stylesheet — the tables below — because hit areas, tab order, a row's wrapping and a stickytopare facts a served HTML diff cannot show.Test results
.claude/skills/pr-prep/check.shon the branch merged withmainat283c745— lint 0 errors,tsc --noEmitclean, 925 tests in 91 filescomponents/organisms/Header/Header.test.tsx), 4 passed (components/atoms/graphics/Logo/), 9 passed (layouts/LayoutChrome.test.tsx)Logo.test.tsxones, which pass against the old literal too. That is exactly whyLogo.locale.test.tsxexists: a French fixture is the only assertion that can tell a wired-up wordmark from the hardcoded one, and both of its assertions were watched failing.Measured in Chromium, before and after
Before, every page and width in #202:
After, on the preview host at
e25f8d5:Hit area at
95479fa, by hit-testing a point grid withdocument.elementFromPointrather thanreading classes. The bar is 44px of content and 46px with its borders at every width, with no
min-h-*on it:Every hit area falls inside the bar's own 44px, which is what the overlay could not do: pinned at
top: 0it reached 44×31 at 390, half of it above the viewport. Those numbers are/map's,the only route that pinned at the time.
#204: does the nav pin?
LayoutChromeserver-rendered with a 3000px page, the compiled stylesheet inlined, and a 6-linestand-in for
Header's ownIntersectionObservereffect — a static file does not hydrate, and thestand-in swaps only the state half of the class list the component really rendered, so the same
harness measures both commits.
window.scrollTo(0, 1200), thennav.getBoundingClientRect().top:The two splash figures are the ones #204 recorded against a dev server reading production
SahajCloud (−1107 at 390, −1072 at 1280), which is what says the harness measures the real thing.
At
top = 0the nav carriessurface-light full-bleed bg-white, is 46px tall, and spans[0, clientWidth]withscrollWidth == clientWidthat every width — so--page-widthstillresolves from
:rootand no horizontal scrollbar appears.What the move was allowed to change, and did not
Un-stuck, at 1024 / 1280 / 1920.
samemeans identical to the pixel:One line moves: the un-stuck nav's own border box, because the page gutter now sits inside the
nav's border rather than outside it. See the note below.
Tab order at 1280, un-stuck, twelve
Tabpresses:Dropping
basis-1/4: what it actually costSame harness:
Headerserver-rendered inside the page band with the compiled stylesheet, measuredat 1024 and 1280. "before" re-applies the two dropped declarations —
flex-basis: 25%on each itemand zero horizontal padding on its link — so one build measures both states. Fixture labels are
Inspiration/Meditate Now/Music/About Meditation(the dropdown), plusClasses Near Mefor the five-item case.scrollWidth == clientWidthin every cell above, in both states.So the thread's premise is wrong, and I repeated it before measuring it. Five items at
5 × 25%do not overflow:basis-1/4is a flex basis, the items carry the defaultmin-width: auto, and they shrink to their min-content width instead. What a fifth item reallycost was a wrap — four of the five labels onto a third line, and 12px of extra bar height on every
desktop page. Content widths absorb the same fifth item on one line. Past six items both states
wrap, so the change moves the wrap threshold by one item rather than removing it.
The reviewer's own reason for option B stands either way: it deletes a count assumption rather
than documenting one.
Fixture pre-mortem: the specs assume
common.general.site_titleresolves toWe Meditate.Verified in
lib/translations.en.json, which is whatuseT()falls back to outside a Vike app.Manual verification
document.documentElement.scrollWidth === document.documentElement.clientWidth, and that dragging the page left does not move it./,/about-meditation,/vishuddhi-chakraand/map, at 390 and 1280, scroll 1200px and readdocument.querySelector('nav.sticky').getBoundingClientRect().top. Expect0on all four — it was −1107 / −1072 on the first three (fix(components): the sticky nav never pins on a content page #204)./(a page with a lead splash), confirm the header still overlays the splash, the gutter is unchanged, and clicking the splash below the header still works.We/meditateon two lines, lower-casem.lg:, confirm the header carries no navigation. The menu that replaces it is People on a phone can reach the whole site from the top bar #234.Notes for reviewer
lg:is People on a phone can reach the whole site from the top bar #234, filed at your answer on that thread: a menu trigger in the compact bar, theMobileMenuorganismDESIGN_SYSTEM.md:161lists and nobody built, and the SahajCloud key the trigger's accessible name needs —common.a11yholds no menu string. The panel's form is the one decision left open there. Until it ships, a phone reaches the featured pages through the footer onLayoutChromeroutes, and on/map, which renders no footer, it reaches only the logo and the classes link.8a11f1ecorrects the comments; the table above has the numbers. The commit message itself cannot be corrected without a rewrite, so it stands wrong on the record.border-t/border-bnow span the page band instead of its content area — 24px wider each side, so at 1280 the hairline reaches the viewport edges. The gutter had to move from a wrapper into the nav's own padding, and no token expresses "the band, less the gutter" as a margin; keeping the border inset would have meant an inner box, which would then inset the stuck bar's border too. The stuck state, where that border is the visible one, is unchanged:full-bleed, edge to edge. Say the word and it goes back behind an inner box for the un-stuck state only.div.absolute inset-x-0 top-0 z-30spanned the full width and 111–174px of height, so at 1920 a click 60px from the left edge — outside the page band — hit the overlay rather than the page.pointer-events-noneends that too.toLowerCase()carries one known limit. It is locale-insensitive, so a locale whose own casing rule differs — Turkish dotted-I is the realistic one — would get the generic result rather than its own. A script without case is unaffected. The alternative,toLocaleLowerCase(), keys off the runtime's locale rather than the content's, which is worse.navItemsis per page is wrong.layouts/useSiteNav.tsbuilds the same items from the global config for every route./meditationsand/classes"escape" because both are 404s that render no<nav>at all — so they were never evidence.visibilitycannot be animated from the call site:Logo's owntransition-opacitywins the cascade, measured astransition-property: opacityon the logo againstopacity, visibilityon the pin's wrapper. A fade only one of the two kept is worse than neither keeping it, so neither does. The fade-in is unaffected.Button icon={MapPinIcon}, which already owns the overlay and thearia-label. Correct that it duplicates the pairing, butButton's icon-only form isw-8 h-8, circular, with a ghost hover fill — a visible redesign of the bar at every width, which the ticket's "unchanged atlg:and above" criterion forbids. Worth its own PR.Logoatom, which is unnamed-by-construction for three of its four variants. Still the better home, and my reason for dismissing it was false:Breadcrumbs,Image,Spinner,CountdownandSocialIconall readuseT()already, so no layering decision was pending.Logonow reads it too. Moving the name in is a separate change, since only one linked icon-only call site exists today.lg:+ the two 44×44 boxes capture the ends of the nav row. Measured false: 60px of clear space at each end, at both widths — at 1024 the logo box ends 68 against a row starting 128, and the row ends 896 against a pin box starting 956; at 1280, 196/256 and 1024/1084. No control loses a pixel. Content-width items only widen that gap.top.tests/smoke/web/is fetch-based with no browser andtests/guards/scans source, so the unit specs assert the structure those facts follow from — how many boxes stand between the page column and the nav, that the band arrives as classes, and that neither dropped class is back. The widths, hit areas, wrapping and pinning are the measurements above plus steps 1–5. A headless assertion would need Playwright added as a dependency — a decision, not a fix.Closes #202
Closes #204
🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjX2eVApvUXDT2nEnqi