Skip to content

feat(button): a floating variant for controls over the map - #470

Merged
Ardnived merged 12 commits into
mainfrom
claude/feat-button-floating
Nov 24, 2026
Merged

Ardnived merged 12 commits into
mainfrom
claude/feat-button-floating

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a floating variant to the Button atom: the app's opaque surface and a shadow. primary is filled, sharing the solid compound row; the others keep bg-background with the ramp's border step. The settings cog's floating trigger is now a floating Button rather than hand-written chrome in SettingsMenu, and CompactEmbedView's close control — which hand-rolled the same skin on a bordered Button — takes the variant too. The hand-rolled toolbar trigger goes as well: SettingsMenu's toolbar prop becomes variant: 'floating' | 'ghost', and both cogs are one Button drawing one 20px glyph (the one in a row of controls is ghost).

Visible changes

CHANGELOG.md records these for embedding hosts.

  • The floating cog over the map is drawn at 44px on a touch screen (the Button sm icon-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.
  • In a row of controls (DrawerStack's map-less cog strip) 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. A negative start margin keeps its glyph on the strip's padding edge, as the deleted recipe's -ms-3 did.
  • The neutral floating glyph rests at gray-11 and darkens to the foreground on hover, matching neutral ghost, so the same cog rests at one weight in either variant.
  • CompactEmbedView's close control draws a 1px border rather than 1.5px — the isIconOnly + bordered compound's heavier outline does not apply to floating — and gains the same hover tint.

Change outline

 src/components/atoms/Button/Button.tsx
+  variant `floating`: 'border bg-background shadow-lg'
~  primary shares the solid compound row: `variant: ['solid', 'floating']`
+  three `variant: 'floating'` rows (secondary, contrast, neutral, bordered)
 src/components/atoms/Button/Button.stories.tsx
+  'floating' in the variant matrices; a "Floating" section on a gradient
 src/components/molecules/SettingsMenu/SettingsMenu.tsx
-  `trigger` recipe (toolbar + hand-written floating skin)
-  `toolbar?: boolean`
+  `variant?: 'floating' | 'ghost'`, one `GLYPH`, the radius inlined
+  one trigger: <Button isIconOnly size="sm" variant={variant}>
   `side` prop and all callers unchanged
 src/components/molecules/SettingsMenu/SettingsMenu.stories.tsx
~  Trigger section becomes Variants (floating, ghost); Examples names the floating Button
 src/views/DrawerStack/DrawerStack.tsx
-  <SettingsMenu toolbar side="top" />
+  <SettingsMenu className="-ms-1.5 pointer-coarse:-ms-3" side="top" variant="ghost" />
 src/views/CompactEmbedView/CompactEmbedView.tsx
-  `closeClass`'s hand-rolled border, surface, shadow and glyph colour
+  `variant="floating"`; `closeClass` carries position alone
 CHANGELOG.md
+  a Changed entry for the three controls above

Preview

Preview pending (design playground story: Atoms / Button, Floating section; Molecules / Settings Menu).

Test results

origin/main is 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, no Modal.focus flake this run.
  • pnpm build and pnpm size pass, assert-css-scoped included. The two new utilities are in the emitted sheet: -ms-1.5 and pointer-coarse:-ms-3 compile to -6px and -12px.
  • Not run here, both CI gates: pnpm test:a11y and pnpm 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.
  • The browser look recorded in the first round predates it: the floating cog's glyph is 20px now, and that has been seen only in the built sheet.

Notes for reviewer

#466 carries the same variant and will be rebased onto this PR once it merges.

🤖 Generated with Claude Code

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]>
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running
CI fix 1

recent dispatches
  • 18:41Z resolve-conflicts · attempt 1 · session · done
  • 18:41Z resolve-conflicts · attempt 1 · session
  • 18:27Z address-review · attempt 1 · session · done
  • 18:27Z address-review · attempt 1 · session
  • 18:15Z review-pr · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-bot

sydevs-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Smoke is red on a platform 5xx, not on this diff.

/loader.js answered 500 on the preview this run published (62520e66-sahajatlas-web), three times across the spec's retries, failing serves loader.js as a loader and serves every chunk the loader can reach. Every other required check is green.

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 sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@Ardnived
Ardnived enabled auto-merge November 24, 2026 18:14
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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, and primary repeats its solid row verbatim.
  • SettingsMenu.tsx:20 — TRIGGER is read twice in one file; its ghost half is already HEADER_CONTROL.
  • DrawerStack.tsx:826 — the deleted -ms-3 is 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

Comment thread src/components/atoms/Button/Button.tsx Resolved
Comment thread src/components/atoms/Button/Button.tsx Resolved
Comment thread src/components/atoms/Button/Button.tsx Resolved
Comment thread src/views/DrawerStack/DrawerStack.tsx Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
`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
@sydevs-bot

Copy link
Copy Markdown
Contributor

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 CHANGELOG.md entry for both cogs and the close control.

origin/main merged in clean.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
…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
@sydevs-bot

Copy link
Copy Markdown
Contributor

🧶 Merged origin/main in. One conflict, in CHANGELOG.md: #478 and this branch each added the first entry under ### Changed. Both are kept, this PR's above #478's, since it lands after it.

No code conflict. #478 moved the Schedule-X calendar tokens in globals.css and touched no Button recipe, so its "solid button's dark green" still names what primary + solid paints here.

Lean gate passes on the merged tree: lint, typecheck, 2381 unit tests.

Pushed 03a3ddd.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026

@sydevs-dispatcher sydevs-dispatcher Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Ardnived
Ardnived added this pull request to the merge queue Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 24, 2026
Merged via the queue into main with commit 1c30790 Nov 24, 2026
27 checks passed
@Ardnived
Ardnived deleted the claude/feat-button-floating branch November 24, 2026 18:54
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 24, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 24, 2026
#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
Ardnived added a commit that referenced this pull request Nov 24, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 24, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 25, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 25, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 25, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 25, 2026
…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]>
Ardnived added a commit that referenced this pull request Nov 26, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants