Repository navigation
fix(ui): sticky Register bar floats and covers the event actions - #334
Conversation
At the sheet's 300px snap the action row straddled the pinned bar's top edge. Measured in Chromium at 390x844 with the real atoms: the four circles occupied 737.75-806.75 against a bar at 779-844, so their labels and the lower half of each 69px tap area sat under an opaque `z-10` surface. Nothing in the body can fix that. The band is 179px tall at that snap and the lead content (chips plus facts) is 137px, so whatever follows is cut whatever it is -- and `pb-20` pads the END of the content, which never moves an element at the fold. So the row rides the bar instead, under the button. `ctaInline` now gates both calls to action rather than Register alone, because an inline copy of either lands in the same band. The row loads on its own: EventActions reaches CopyField and so react-share, which `molecules/index.ts` keeps out of the eager payload on purpose (#96). EventRegisterBar stays eager -- Register is what must survive a chunk the host's CSP blocked (#89) -- and the boundary around the row renders nothing when that happens. `pnpm size` is unchanged at 310.7/312.5 KiB, with EventActions and ShareContent in their own chunks and no react-share in any eager one. The bar also gains the home-indicator inset. `viewport-fit=cover` (index.html) runs the layout viewport under it, so a bar flush with the bottom put its button in the gesture area. It rides a spacer rather than the footer's padding, which a caller's own `py-*` merges away. What the ticket calls a 25px float does not reproduce. The bar's bottom edge measured 844.01 at all three snaps, before this change and after. An absolutely positioned child resolves against its ancestor's PADDING box, so the sheet's `pb-[calc(var(--sy-frame-h)*0.03)]` is already inside the distance `bottom: var(--sy-sheet-top)` measures -- subtracting it, as the ticket proposes, would land the bar 25px below the fold with the body showing through. Both the atom and `Drawer.sticky.test.tsx` now say so. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SHjmUonsTYZg2xiQ7e7yqY
A visitor on a phone sees the four actions move into the bar, so the guide hosts read carries it. No parameter, origin or CSP change, so `docs/embedding.md` is untouched. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SHjmUonsTYZg2xiQ7e7yqY
…ng it
From the /simplify and /security-review pass over the branch.
**A constant could never have been right.** The body clears the pinned bar
by its own trailing padding, and the bar is not a fixed height. Measured at
390x844 across EventView's resolver states: 65px ended, 102px inactive,
150px the stock class, 176px a closed course, 197.5px at capacity -- and a
translated label moves each of them again. The `pb-40` this branch added
left 37.5px of content under the tallest bar and 95px of dead space under
the shortest, and the `pb-20` it replaced had the same defect in a narrower
band.
So `DrawerFooter sticky` publishes its own height onto the sheet, and the
body slot pads itself by it. Zero where no sticky footer exists, so every
other drawer body is unchanged. The observer fires on a resolver state, a
locale or a width -- a handful of times a session, never per frame, unlike
the `--sy-sheet-top` mirror beside it. `borderBoxSize` is the untransformed
box, so the collapsed sheet's `translate-y-full` cannot report a different
one. Re-measured after: the body's padding equals the bar in all five
states, and the bar's bottom edge is still 844.
This also puts the general half of the ticket in the atom, where its Notes
ask for it -- every `DrawerFooter sticky` gets the clearance and the
home-indicator inset, not just this view.
Three findings from the same pass:
- `FallbackComponent={NoFallback}` is a module symbol for something
react-error-boundary already takes: `ErrorBoundaryPropsWithFallback`
accepts `fallback: ReactNode`, and the runtime honours it on
`fallback !== undefined`. `fallback={null}` deletes the constant.
- `LazyEventActions` was the only `Lazy`-prefixed binding in the repo.
Every other lazy binding is named for what it loads.
- Two mocks in the new spec were copied from its sibling and unreachable
here, since this one stubs the chips the sibling deliberately does not.
Comment prose trimmed where the same argument was written twice: the
padding-box reasoning belongs at the mechanism, not restated at greater
length in the spec that asserts it.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SHjmUonsTYZg2xiQ7e7yqY
Deploying sahajatlas with
|
| Latest commit: |
4131aa0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a3b33916.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-fix-320-sticky-regist.sahajatlas.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 4131aa0 | Oct 26 2026, 08:04 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
1 question for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
… layer The ticket's 25px float is real, and an isolated harness cannot see it. Measured on this PR's own deployed preview at 390x844: the bar's bottom edge sat at 818.69 against an 844 viewport, with the panel's own content showing through the 25.31px strip underneath -- exactly as reported. The cause is the containing block, not the arithmetic. `bottom: var(--sy-sheet-top)` cancels vaul's translate only while it is measured from the sheet's own bottom edge. `absolute` resolves against the nearest POSITIONED ancestor, and since #312 the view crossfade puts two of them between the sheet and the view: `relative min-h-0 flex-1` and `absolute inset-0 flex flex-col`, both filling the sheet's CONTENT box, which its `pb-[calc(var(--sy-frame-h)*0.03)]` ends 25.32px above its border box. Walked on the preview: footer 668.69-818.69, crossfade layer 564-1362.69, sheet 544-1388. `fixed` resolves against the nearest ancestor with a transform instead, and that is the sheet -- vaul writes `translate3d` on it and `will-change: transform` with it. So the offset is measured from the box it was always meant to be measured from, whatever DrawerStack nests in between, and the 3% never has to be named. Subtracting the 3% instead would have been correct only for the current nesting, and 25px too low for a view that composes its footer directly under DrawerContent. ⚠ I reported this symptom as not reproducing, in the first commit on this branch and in the PR body. That was wrong, and the way it was wrong is the useful part: the Ladle probe I measured in composes `DrawerFooter` straight under `DrawerContent`, so it had no crossfade layer to resolve against and the bar measured flush. Both docblocks and the spec now carry the correction, and the spec says why an isolated harness is not evidence here. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SHjmUonsTYZg2xiQ7e7yqY
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
This draft has had no CI activity for hours and no session holds it. A mention ( 🤖 sydevs dispatcher |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Three behaviours, one area, all joined — the diff is the size of #320 and no bigger. The fix is the one the architecture already named: DrawerStack's mirror comment has said "inside the transformed sheet, position: fixed resolves against the sheet" since #52 WS4, and the atom was the last thing still on absolute. Rejecting the ticket's own 3% subtraction is right — it couples two files through a literal.
I looked for a platform mechanism that retires the ResizeObserver and found none. position: sticky needs the footer inside the scroller, whose bottom edge is the sheet's content box, not the viewport. The measurement is forced, so it pays its rent.
No contract surface moves. env(safe-area-inset-bottom) is 0 without the host's viewport-fit=cover, which is the right degradation, so docs/embedding.md needs nothing.
Findings
- should-fix —
Drawer.tsx:426names the crossfade layersheet, contradicting the docblock 20 lines above, and leaves the parent-contains-the-body contract unstated. - should-fix —
Drawer.tsx:52meets a silent tailwind-merge wipe with a comment; four callers already pass the shorthand. - consider —
EventDetails.stories.tsx:108still describes a one-row sticky footer.
What was checked
Read whole: Drawer.tsx, EventView.tsx, EventDetails.tsx, ViewLayer.tsx, DrawerStack.tsx's mirror effect, both new specs. Re-derived the containing-block arithmetic for fixed plus --sy-sheet-top with and without a MapFrame (contain: layout): correct in both, and self-consistent even if vaul drops the transform. Grepped all 13 DrawerBody call sites for a merging p-*. Confirmed no ctaInline state loses the action row. All three preview links answer 200; the named event's data needs an API key I do not hold.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`parentElement` was bound to `sheet`, 20 lines under a docblock saying the view crossfade (#312) sits between the sheet and the footer. Both cannot be true, and the next author reasons from the mechanism: the parent is the crossfade layer, so the name is `layer`. Publishing per layer is the right scope, and that is now stated rather than implied. On the sheet, one value would be shared by both crossfade layers, and the outgoing layer's cleanup would blank the incoming footer's value mid-fade. The contract it buys was unstated and is the part a later composition can break: a `sticky` footer's parent must also contain the body it clears. Anywhere it does not, the clearance resolves to its `0px` fallback and the content ends under the bar, with nothing failing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0198xNcXbYVmd5prap54yrHB
The body's clearance was the slot's own `pb-[var(--sy-footer-h,0px)]`, and tailwind-merge drops a slot `pb-*` for any caller shorthand. A ⚠ in the slot comment was the whole mitigation, while four bodies already pass `p-4`: FilterView, ShareView, RegistrationView, CalendarView. Measured in Chromium against the built sheet: `<DrawerBody className="p-4">` emitted `… overflow-y-auto p-4`, with the clearance gone entirely. None of the four has a sticky footer today, so the first one to gain one would bury its own content with lint, typecheck and both lanes green. So the length rides a `::after` spacer instead. A variant-prefixed class conflicts with nothing a caller passes, so no shorthand can reach it, and the spacer ADDS to the caller's own padding rather than replacing it -- which an inline `paddingBottom` would not: it would override `p-4`'s bottom side and cost those same four bodies their 16px. A pseudo-element rather than a real trailing child, because `CENTERED_BODY` keys its posture on `[&>:last-child]:mb-auto`. Measured: the last element child is still the real one, and the spacer computes to `0px` there. Measured at 390x844 on the built CSS, `--sy-footer-h: 150px`: scrollable overflow 524px -> 674px, and scrolled to the end the last line clears the body's bottom edge by 150px. With `p-4` as well: 166px, the spacer plus the caller's own padding. Unset, the spacer is `0px` and every other body is unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0198xNcXbYVmd5prap54yrHB
The one story for this composition still rendered `EventRegisterBar` alone, and its description still said "the Register slot on its own" -- while the sheet's sticky footer now renders Register plus the secondary action row, which is this PR's point. The rename in the previous commit landed; the sentence and the box did not. Both rows now sit in the story's box, gapped in a wrapper exactly as EventView's footer gaps them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0198xNcXbYVmd5prap54yrHB
|
Three adversarial-review findings, all adopted. Head
Gate: lint + typecheck + 1776 tests ✓ · build + size ✓ 310.8 / 312.6 KiB. The question thread on the action row stays open — it waits on you. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#333 and this branch each added the newest entry under `### Fixed`, so the add/add conflict in CHANGELOG.md took both, this PR's #320 entry first because it lands after #325. Both link definitions survived the automatic merge. No other file overlapped: main's #333 touched `src/lib/time*`, `use-event-display`, `EventFacts.stories` and `src/mocks/events.ts`, which only gained `mockEventOvernight`. Lean gate green on the merge — 151 files, 1780 tests. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PvgLPoQcs7LuvyYwthzPFy
|
Merged
Nothing else overlapped. #333 touched ⚠ Ardnived approved 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Four conflicts, resolved from both sides' intent. `EventDetails`: #334 renamed `registerInline` to `ctaInline` and moved `EventActions` inside the gate, so Register and the action row travel together — the sticky footer is pinned over the body's last band. #147 had extracted `PublishedActions` so the `actions` slot can replace the whole published-class block. Both kept: the extracted component now takes `ctaInline` and gates both calls to action with it. The unverified caveat stays ungated, as on both sides. `EventDetails.badge.test.tsx`: `ctaInline={false}` with #147's `MemoryRouter` wrapper, which the file's other render carries too. `store.ts` and `CHANGELOG.md` link list: both sides' lines. `scripts/select-unit-specs.test.ts` and `docs/testing.md`: the per-edit width pin trips on the merge, not on either side — `AddClassLink.test.tsx` is the nineteenth spec reading a repo file through `repo-source`. Timed the hook and ratcheted to 19: 6.8s for the widest edit, 8.7s for `i18n.ts`, medians of three on 4 cores, both under the 12s budget. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWWuZvSmvGDbhQHr1K
Summary
absoluteresolved against a crossfade layer filling the sheet's content box, not against the sheet.Change outline
Behaviour — what the sticky footer is positioned against
bottom: var(--sy-sheet-top)cancels vaul's translate only while it is measured from the sheet's own bottom edge. Since #312 the view crossfade puts two positioned layers in between, both filling the sheet's content box — which itspb-[calc(var(--sy-frame-h)*0.03)]ends 25.32px above its border box..sy-atlas drawer sheet fixed, h=--sy-frame-h, pb=3%, translateY(snap) div.relative.min-h-0.flex-1 # the view host — #312 div.absolute.inset-0.flex.flex-col # the crossfade layer — #312 DrawerBody - DrawerFooter sticky absolute → resolves against the layer above + DrawerFooter sticky fixed → resolves against the sheet's transformMeasured on this PR's own preview at 390×844: footer
668.69–818.69against a crossfade layer at564–1362.69and a sheet at544–1388. After:694–844.Components — where the calls to action render
The bar is pinned over the body's last band, so an inline copy of either CTA lands under it. They now travel together.
EventView src/views/EventView/EventView.tsx DrawerBody EventDetails (lazy) ctaInline = !stickyRegister chips · facts · children · unverified - EventRegisterBar # gated on registerInline - EventActions # always, so always under the bar + EventRegisterBar + EventActions # both gated on ctaInline About · images DrawerFooter sticky stickyRegister only EventRegisterBar # eager: survives a blocked chunk (#89) + EventActions (lazy, own boundary) # reaches react-share, so never eager (#96)Behaviour — how the body clears a sticky footer
The bar is not a fixed height. Measured at 390×844 across the resolver states: 65px ended · 102px inactive · 150px the stock class · 176px a closed course · 197.5px at capacity. A translated label moves each again.
DrawerFooter({ sticky }) src/components/atoms/Drawer/Drawer.tsx + ResizeObserver on itself → --sy-footer-h, set on its parent, the crossfade layer + trailing spacer: env(safe-area-inset-bottom) DrawerBody() + ::after spacer, h = var(--sy-footer-h, 0px) # 0 where no sticky footer exists EventView - <DrawerBody className={stickyRegister ? 'pb-20' : undefined}> + <DrawerBody> # the atom owns the length nowThe observer fires on a resolver state, a locale or a width — a handful of times a session, never per frame, unlike the
--sy-sheet-topmirror beside it.The clearance is a
::afterspacer rather than the slot's ownpb-*, because tailwind-merge drops a slotpb-*for any caller shorthand and four bodies already passp-4(FilterView, ShareView, RegistrationView, CalendarView). A variant-prefixed class conflicts with nothing a caller passes, and the spacer adds to the caller's own padding rather than replacing it — which an inlinepaddingBottomwould not. A pseudo-element and not a trailing child, soCENTERED_BODY's[&>:last-child]:mb-autoposture still finds the real last child.Preview
/gb/south-east/brighton/163— open at 390×844. Live data: Evening Meditation at Cornerstone Community Centre, with Directions / Contact / Share in the bar.stickyRegistertrue, then step the Example control throughIn person,Full,Course,Endedfor the four bar heights.Measured at 390×844, on the deployed preview
positionabsolutefixedTest results
test:run(151 files, 1776 tests)pnpm build+pnpm size—standalone310.8 KiB,embed312.6 KiB, both 0.1 KiB up onmainfor the longer slot class--sy-footer-h: 150px: 150px clear bare, 166px with a caller'sp-4, 0px unsetManual verification
env(safe-area-inset-bottom)is 0 in every desktop browser, so no automated check can see it. Confirm the bar's background reaches the screen edge and the button clears the gesture area.--sy-footer-his unset there.Notes for reviewer
I reported the float as not reproducing, and that was wrong. The first commit on this branch and the first version of this body both said so, on a Ladle measurement that showed the bar flush at 844. The harness was the defect: it composed
DrawerFooterstraight underDrawerContent, so there was no crossfade layer forabsoluteto resolve against. The deployed preview put it at 818.69, exactly as the ticket reported.1f70040carries the correction, and both docblocks and the spec now say why an isolated story is not evidence for this one.The ticket's proposed fix would also have worked, and I did not take it. Subtracting the sheet's 3% is correct only for the current nesting; it would be 25px too low for a view that composes its footer directly under
DrawerContent, and it couples two files through a literal.fixedresolves against the nearest transformed ancestor, which is the sheet whatever DrawerStack nests in between, so the 3% never has to be named.What the default snap loses. The 300px sheet has 179px under the header and the lead content is 137px, so something is always cut there. Before, it was the action row — half-covered, with dead tap areas underneath. Now the bar is taller and the cut falls on the address line, which reads as "scroll for more". Judgement call; see the question thread.
Why the overlap fix stays view-local while the clearance, the inset and the positioning went into the atom: what belongs in the bar versus the panel is a per-view content decision, not a mechanism.
EventViewis the onlystickycaller today —FilterView's footer is in-flow and unaffected.Detail
Rejected: ending the body's box at the footer's top. It clips the action row at the bar's edge instead of covering it, and
getBoundingClientRecton a clipped element still returns its full layout box — so the ticket's "compare their bounding boxes" check fails identically and the reader still sees a half-cut row. It would also make the body's height depend on the per-frame mirror, turning a layout read into a per-frame invalidation of the whole panel subtree.Rejected: raising the default snap so the row fits. Global to every view, and still content-dependent — a longer facts block re-breaks it.
Rejected: an inline
paddingBottomfor the clearance. Merge-proof, which is the point, but it also overrides a caller'sp-4on the bottom side — so FilterView, ShareView, RegistrationView and CalendarView would each lose their own 16px today, to prevent a failure none of them has yet.Why
EventActionsis lazy in the footer.molecules/index.tskeeps it out of the eager payload on purpose (#96): it reachesCopyFieldand so react-share.EventRegisterBarstays eager because Register must survive a chunk the host's CSP blocked (#89), and the boundary renders nothing when that happens. The split costs one request of ~2.5 KB, already inEventDetails'smodulepreloadbatch, so it lands in parallel rather than after it.Reviewed by
/simplify(4 lenses),/security-review(triggered onsrc/components/organisms/EventDetails/; no findings — no new input, sink, origin or anchor), andcomment-lint.mjs(clean). The simplify pass foundNoFallback, aLazy-prefixed binding, two dead mocks and duplicated prose; its altitude lens caught thepb-40constant. All fixed in4d18377. The adversarial review's three findings are all adopted, in433cdef,0eee4b2and3815ca5.⚠ One claim reasoned to and not shipped: that making the body scrollable at the 300px snap would stop a drag-up expanding the sheet. vaul's
shouldDragreturnstrueon a positive swipe amount before it walks for a scrollable ancestor, so the sheet expands either way. Recorded so nobody re-derives it as a constraint.Closes #320
🤖 Generated with Claude Code
https://claude.ai/code/session_01SHjmUonsTYZg2xiQ7e7yqY