Repository navigation
feat(button): a floating variant for controls over the map - #470
Conversation
Adds `variant="floating"` to the Button recipe: the app's opaque surface and a shadow, in every colour (primary is filled, like solid). The settings cog's floating trigger is now a floating Button instead of hand-written chrome, and the Button and SettingsMenu stories show it. Visible change: on a touch screen the floating cog is drawn at 44px, the Button sm icon-only size, instead of 32px with an invisible 44px tap area. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
Smoke is red on a platform 5xx, not on this diff.
Evidence it is not the change:
The lane retries twice with no delay, so all three attempts land in one window. I changed nothing: the mechanism is unexplained and the 500 does not reproduce, so a backoff tuned on one incident is not a fix I can verify. Filed as #473. Re-run Smoke. There is nothing to fix on this branch. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…e of the hand-rolled toolbar cog SettingsMenu's `toolbar` prop becomes `variant: 'floating' | 'ghost'`, and both cogs are now one Button. DrawerStack's map-less cog strip passes `variant="ghost"`; `side` is unchanged. Visible change: in a row the cog is drawn at 32px on desktop (44px on touch, as before), and gains the ghost tint on hover, like the drawer header's controls. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The shape is right, and the direction this repo wants: a hand-rolled tv() skin in a molecule becomes one variant on the shared controlSurface, so the diff removes a layer, not adds one. The compound rows cannot be a loop — Tailwind only sees literal classes — so that length is forced, not chosen.
Two things it does not account for. It builds the shared owner of floating chrome and leaves CompactEmbedView's close control outside, the one sibling that copies this skin by design. And it calls two changes visible, which is what CHANGELOG.md records for embedding hosts, with no entry added — a should-fix with no thread, since that file is outside the diff. No contract surface is touched.
Findings
should-fix
Button.tsx:33— the floating chrome's one existing sibling stays hand-rolled.Button.tsx:132— no caller passes a colour to a floating control, andprimaryrepeats itssolidrow verbatim.SettingsMenu.tsx:20—TRIGGERis read twice in one file; itsghosthalf is alreadyHEADER_CONTROL.DrawerStack.tsx:826— the deleted-ms-3is unreplaced, so the strip's cog loses its alignment.
consider
Button.tsx:152— the cog's rest step and hover both change, against "looks as it did".Button.stories.tsx:126,:35— both restate what the grids render.
What was checked
Read whole: Button.tsx, SettingsMenu.tsx, views/shared.tsx, CompactEmbedView.tsx, StorySection.tsx and DrawerStack.tsx's two call sites. Profile read. new-pieces.mjs: 6 pieces covered, 2 kept; 4 of 5 streamliner sketches posted, the fifth folded into Button.tsx:132. Sweeps: the other shadowed siblings are panels, not controls; -ms-3 has no second user; no doc names the removed prop or lists the variants; no spec pins the old API; .claude/workflow.json sets no preview or fixture.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`primary` / `floating` restated the `primary` / `solid` class list verbatim, plus `border-transparent`. One row with `variant: ['solid', 'floating']` carries both, as `Chip.tsx` already does for `flat` and `subtle`. `border-transparent` is inert on `solid`, which draws no border, so the merge changes no rendering. The other three floating rows stay: each differs from its `bordered` row by the border step, so the colour x variant matrix the stories render keeps every cell. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
The hand-written cog this variant replaced drew its glyph at gray-11 and darkened it to the foreground on hover. The variant rested it at gray-12 and dropped the darkening for a surface tint alone, so the same control rested at two different weights depending on which variant a caller passed, against this PR's own claim that the cog looks as it did. Neutral floating now carries `text-gray-11 hover:text-foreground`, as the neutral ghost row does, and keeps the surface tint the other floating colours have. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
…adius `TRIGGER` was a two-key map read twice in one file, with no second caller. The radius is the one thing the two cogs still differ in, so it inlines. Both now draw a 20px glyph. The ghost cog takes it from `HEADER_CONTROL`, the set it renders beside, and the floating cog needed it: `size="sm"` draws 44px on a coarse pointer, where a 16px glyph read hollow. On a fine pointer the floating cog grows its glyph 16px -> 20px, the same pair the drawer header's controls draw. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
The deleted `toolbar` recipe carried `-ms-3`, which pulled the 44px control back so its glyph sat flush with the strip's `px-4` and lined up with the drawer content above. Nothing replaced it, so the glyph was indented 6px on a fine pointer and 12px on a coarse one. The call site carries it now, one pull per drawn box size. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
This control hand-rolled the cog's chrome on a `bordered` Button, under a comment saying it was the cog's skin down to the shadow. That skin is now a variant, so the copy goes and `closeClass` carries position alone. Its border draws 1px rather than 1.5px: the `isIconOnly` + `bordered` compound adds the heavier outline, and `floating` does not. The cog it is paired with has always drawn 1px, and a floating control's own surface and shadow carry the separation a bordered control needs its outline for. Its hover also gains the surface tint every other floating colour has. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
…show Two threads, one file. `floating` is in the `variants` array, so both matrices already render it in all four colours. The section's own colours row was a third copy, and the two sample pills differed only in their glyph. What is left is the gradient background, plus one pill and the cog on it. The cog's glyph is 20 now, as the real one draws. The story JSDoc's added sentence was the third statement of the same fact: the section description says it with more detail, and the variant's own JSDoc says it to a reader of the recipe. Ladle renders the JSDoc as the story description, where the per-section text already covers every variant. `X` stays imported — the Widths section uses it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
This PR's own summary calls two changes visible, and this file is what records a visible change for the sites that embed the widget. The compact card's close control changed with them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYPWd8a1r3CpLHP9Hx
|
Every review thread is adopted. Nothing rebutted, nothing to decide.
The review body's point with no thread, "two changes visible ... with no entry added", is bc93bcb: a
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…oating main's #478 and this branch each added the first entry under `### Changed`. Both are kept, this PR's first, since it lands after #478. No code conflict: #478 moved the Schedule-X calendar tokens in globals.css and touched no Button recipe. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX9geazPZrsZD8peEn
|
🧶 Merged No code conflict. #478 moved the Schedule-X calendar tokens in Lean gate passes on the merged tree: lint, typecheck, 2381 unit tests. Pushed 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. 🤖 Written by the sydevs autonomous loop — see what this is
#470 landed the `floating` Button variant on main, so this branch's copy of it goes and main's stands. Where main refined the map-less filled drawer and its cog strip, this branch deletes both — a map-less atlas renders InlineEmbedView instead — so the refinements go with them. - Button: main's compound variants, with primary folded into the solid row and the neutral glyph at step 11. Only the variant's doc comment stays ours, now that Expand map and Close map exist to name. - SettingsMenu: one 20px glyph for both cogs, which main measured against the 44px touch box. `side` and its story go: the bottom strip that passed `side="top"` is the map-less drawer this branch removes. - Button story: main's gradient section, with the two real controls in place of its stand-in pill. - CHANGELOG: both entries kept. #470's two clauses about the map-less cog strip and the collapsed card's close control are cut, since this release removes both surfaces. - CompactEmbedView: deleted here, as this branch intends; main's only change to it was moving its close button onto the `floating` variant. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW9XSRmCHBNfAARzUm
…rlier copy #470 merged with review changes the branch's own copy predates: the primary floating row shared with solid, the neutral floating glyph at step 11 like ghost, and a 20px glyph on both cogs. The branch now carries main's files, less what only main still needs: SettingsMenu's side prop, which went with the map-less cog strip, and the sample pills, which are Expand map and Close map here. The inline heading's cog lines its glyph up with the row's padding, as main's strip cog does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…emoves The map-less cog strip and the collapsed card's close control both go in #466, so #470's entry keeps only the cog over the map. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rlier copy #470 merged with review changes the branch's own copy predates: the primary floating row shared with solid, the neutral floating glyph at step 11 like ghost, and a 20px glyph on both cogs. The branch now carries main's files, less what only main still needs: SettingsMenu's side prop, which went with the map-less cog strip, and the sample pills, which are Expand map and Close map here. The inline heading's cog lines its glyph up with the row's padding, as main's strip cog does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…emoves The map-less cog strip and the collapsed card's close control both go in Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rlier copy #470 merged with review changes the branch's own copy predates: the primary floating row shared with solid, the neutral floating glyph at step 11 like ghost, and a 20px glyph on both cogs. The branch now carries main's files, less what only main still needs: SettingsMenu's side prop, which went with the map-less cog strip, and the sample pills, which are Expand map and Close map here. The inline heading's cog lines its glyph up with the row's padding, as main's strip cog does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…emoves The map-less cog strip and the collapsed card's close control both go in Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ten conflicts, all from #490 (the map and a placeholder panel at once, a Turnstile failure that pauses only sign-up), while this branch removed the compact card, the contained map and the `filled` drawer mode. The client record is no longer a suspense read at the shell. With a map, `ClientGate` sits inside each drawer view, so the inline column and the expanded map show a slow or failed API in the panel, beside a live map. Map-less, it stays at the top of the shell, as main has it; `!hasMap` replaces main's `hasMap && !compact`. - `App.tsx`: `StandIn` takes main's place for both stand-ins, filling the window only for the map-first form (`!inline`). `clientLoaded` reaches both interfaces. - `FullInterface.tsx`: `InterfaceProps` carries `clientLoaded`, so `useInterfaceBoot`'s home redirect waits for the record in every form. - `Drawer.tsx`: #490 moved the `tv()` slots to `drawer-style.ts`, so this branch's `inline` mode and its comments move there, and `filled` stays gone. The real drawer stays `anchored`, now with `initialTransform`. - `DrawerStack.tsx`: the shared `topView` gains `ClientGate`, and the cross-fade takes `initial={false}`. The map-less filled drawer and its cog strip stay deleted. - `fallbacks.tsx`, `nav.tsx`: main's cached-region read, country name and `SkeletonField`, plus this branch's `isPlace`. A place's pending-title placeholder carries `data-sy-place`, so inline it gives way to the page heading as the title it stands for will. - `Fallbacks.tsx`: `LoadingFallback` loses `unboxed`, as main has it. - `use-turnstile-guard.ts`: main's non-blocking guard; the call-site rule keeps this branch's `useInterfaceBoot` reason. - `globals.css`: main's control-column `z-index` above the curtain stays; the `[data-sy-expanded]` nudge stays deleted. - `DESIGN_SYSTEM.md`: main's re-padded table with this branch's Drawer row. #490's host-facing prose named the full map form and the compact card: `docs/embedding.md`'s `key` row, its CHANGELOG entry and `mapbox.md` now say "with a map" and "a map-less embed", as #470's entry was cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Adds a
floatingvariant to the Button atom: the app's opaque surface and a shadow.primaryis filled, sharing thesolidcompound row; the others keepbg-backgroundwith the ramp's border step. The settings cog's floating trigger is now afloatingButton rather than hand-written chrome in SettingsMenu, andCompactEmbedView's close control — which hand-rolled the same skin on aborderedButton — takes the variant too. The hand-rolledtoolbartrigger goes as well:SettingsMenu'stoolbarprop becomesvariant: 'floating' | 'ghost', and both cogs are one Button drawing one 20px glyph (the one in a row of controls isghost).Visible changes
CHANGELOG.mdrecords these for embedding hosts.smicon-only size) instead of 32px with an invisible 44px tap area. On a fine pointer it stays 32px. Its gear glyph grows 16px → 20px on every device, which is what the drawer header's controls draw.-ms-3did.floatingglyph rests at gray-11 and darkens to the foreground on hover, matching neutralghost, so the same cog rests at one weight in either variant.CompactEmbedView's close control draws a 1px border rather than 1.5px — theisIconOnly+borderedcompound's heavier outline does not apply tofloating— and gains the same hover tint.Change outline
Preview
Preview pending (design playground story: Atoms / Button, Floating section; Molecules / Settings Menu).
Test results
origin/mainis merged in (it carried #469's theme change), and everything below ran on the merged tree..claude/skills/pr-prep/check.sh: lint, typecheck and the unit lane pass — 189 files, 2381 tests, noModal.focusflake this run.pnpm buildandpnpm sizepass,assert-css-scopedincluded. The two new utilities are in the emitted sheet:-ms-1.5andpointer-coarse:-ms-3compile to -6px and -12px.pnpm test:a11yandpnpm test:browser. No control's drawn box changes in any story — only a glyph size, a border width and a hover tint — and no browser-lane spec reads this chrome.Notes for reviewer
#466 carries the same variant and will be rebased onto this PR once it merges.
🤖 Generated with Claude Code