Repository navigation
feat(map): one control column for find-me, settings and the credits - #482
Conversation
The map had three buttons in two corners and three shapes: the 32px settings cog
beside the panel, and Mapbox's square find-me and solid "i" in the far corner,
which stayed white in the dark theme. All three are now one top-right column of
matching round buttons, 40px (44px on a touch screen), 8px apart and 16px in,
themed in every state. A window 480px tall or less runs them as a row.
The column is ONE Mapbox control (`MapControls`), so Mapbox's `position` prop
still places it and no stylesheet rule moves a corner:
- Settings and find-me are floating Buttons. Find-me drives Mapbox's
GeolocateControl with its own button hidden (`showButton={false}`), so the
blue dot, permission flow and failure dialog are unchanged, and a permission
denied before the map loaded now reaches the dialog instead of a disabled
button.
- The credits are Mapbox's own compact AttributionControl, appended to the
column; only its look is restyled in globals.css. #370's invert-filter dark
rules go with the controls they styled.
- DrawerStack no longer renders the cog. It publishes when the cog is hidden
(full-width calendar, the sheet's near-full stop) through `useSettingsCog`.
Ports the intent of 384b966 and 29dcb12 (ux/map-controls) onto today's main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…de the column - Find-me now leads the column, above settings. - Each shows its name in a new Tooltip atom (Radix Tooltip), skinned like the map's opened credits, on hover and on keyboard focus, never on touch. A focus opens it only after a key press, so the cog does not light its own label every time its menu closes. - The credits go back to Mapbox's stock compact "i", level with the column's top and to its left, inside the same control, so they stay visible above the phone sheet. globals.css only resets Mapbox's corner margin and float there, adds a 44px touch tap area, and restores #370's dark-theme fix for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The hover labels on find-me and settings are now one pill growing leftward out of the button, the shape Mapbox's credits button takes when opened, rather than a detached tooltip. `HoverLabel` replaces the Tooltip atom, so the Radix Tooltip dependency goes again. Same rules: mouse hover and keyboard focus, never touch, and hidden while the settings menu is open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tailwind 4's Preflight dropped v3's cursor: pointer on buttons, so every button in the widget showed the arrow. One rule in base.css restores it, under :where() so a cursor utility still wins and disabled buttons keep the arrow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves #476's DrawerStack, attribution.test.ts and AGENTS.md against the control column: the floating cog stays out of DrawerStack, and the peek strips' removal and the SNAP_POINTS assertion come from main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- MapControls is memoised and gets a stable onLocate, so the map's hover and camera re-renders no longer redraw the settings menu. - The column/row switch reads useIsShortViewport, the signal that caps the phone sheet in a short window, instead of a second hard-coded 480px. - The credits' touch area is the touch-target utility, not a copy; the overflow rule beside it targeted a clip Mapbox does not apply. - Find-me tints its glyph from a lookup; HoverLabel keeps its open styles in one variant. - attribution.test.ts checks the class names against mapbox-gl's own sheet, so a rename upstream fails it. - Stale "the cog is fixed" notes, a cog-offset note and the old localised labels note are gone; Checkbox and Dropdown drop cursor-pointer classes the base rule now covers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A tap before Mapbox's control has finished its setup used to do nothing: it now waits for the control's `ready` and asks then. - A page with no geolocation at all made `trigger()` throw; that now opens the failure notice, as a denied permission does. - A second tap while a request is out is ignored, so one answer cannot navigate twice. - HoverLabel's document listeners are reference-counted and leave with the last label, rather than staying on the host page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived
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
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 972da03 | Nov 25 2026, 06:39 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The shape is right, and the hard part justified. One useControl whose element lays out its own children is what docs/rules/mapbox.md leaves open once no stylesheet rule may move Mapbox's corner, and the credits stay Mapbox's to keep the one collapsed form its guide sanctions. Against mapbox-gl 3.35.0 the behaviour claims hold: denied-before-load really does reach the dialog now. No contract change — no parameter, origin, CSP, storage or Permissions-Policy row moves, and the geolocation row's wording matches the code.
Two things to settle: the cog's hide removes it from a column it leaves standing, and five module globals with document listeners track input modality that @floating-ui/react, already a dep, tracks for you.
Findings
should-fix—MapControls.tsx:105: the cog hides; find-me and the credits do not.should-fix—HoverLabel.tsx:32: Streamline the input tracking onto@floating-ui/react.should-fix—Map.tsx:381: StreamlinelocationFailed, a copy oflocate === 'failed'.should-fix—MapControls.tsx:19: StreamlineLOCATE_TINTinline.
Settled the open question (the pill over the credits) as A, and resolved it.
What was checked
- Read whole on the branch:
MapControls,HoverLabel,Map.tsx's locate block,SettingsMenu,DrawerStack,store.ts, both stylesheets, the test. - mapbox-gl 3.35.0:
trigger()is false only while_setupis unset, which_setupUIsets before firingready;_onErrorfireserrorwhatevertrackUserLocationis;AttributionControl.onRemovetakes no map argument; the credits button's dark filter still reaches the span.mapboxgl-ctrl-iconused to. - The
localeprop's removal orphans no key; the map-less cog is unaffected (DrawerStack.tsx:702). - Streamliner: 16 pieces, 8 kept, 3 of 5 findings posted.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`useSettingsCog` removed the cog from a column that is covered whole in both cases it fired. The full-width calendar's drawer is `!inset-0` (`lg:!inset-4`), the same box the column sits in at 16px; the sheet's 0.97 stop puts its top edge at 3% of the frame, which on a short viewport is above the column's own top. The cog is also the second control in the column, so find-me covers it before either drawer does. Where a top edge did show, find-me and the credits showed theirs beside it. So the hide was never visible, and `docs/rules/i18n-and-state.md` said as much already. The store, the `DrawerStack` effect and the branch go with it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYeifwR5hWFNyKADbF
The pill measures the room either side of its button as it opens, against the frame or the window, and mirrors (button at its left end) when the left cannot fit it. The story shows both sides. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A two-entry lookup and its `Partial<Record<…>>` were read once, four lines below their declaration. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYeifwR5hWFNyKADbF
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
|
Base merged clean (f796b68), pushed here. The reviewer's A stands as built. Adopted
Rebutted
Asked
⚠ The PR body was edited at 18:15Z, mid-run. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
The newest commit, 4730e37, is sydevs-bot's own, so it is not approved on your behalf. Read it, then say 🤖 sydevs dispatcher |
…y control - Find-me's state, in-flight guard, ready retry and failure dialog state move from Map.tsx into `Mapbox/use-locate.ts`; Map.tsx keeps the wiring. - `useSettingsCog` becomes `useMapControls`, hiding the whole column rather than the cog alone. DrawerStack sets it only at the phone sheet's near-full stop, where find-me and the credits used to peek as slivers above the sheet; on the desktop calendar the panel already covers the column whole. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes the loop's #481 merge and its glyph-tint expression. Its 78d0d76 dropped the cog's hide on the claim that both drawers cover the column whole. They do on the desktop calendar, but at a 390x844 phone's near-full stop the sheet's top sits at 25px and the column's at 16px, so find-me and the credits showed 9px slivers above it (measured). The owner chose one switch that hides the whole column there (`useMapControls`), which also serves the inline view's toolbar later, so this side of those hunks is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
#482 made the map's top-right corner one control column holding find-me, settings and Mapbox's credits, and took the cog out of DrawerStack. This branch had moved the same cog into the inline heading row and put "Close map" at the bottom middle of the expanded map. - DrawerStack portals the sheet origin and "Close map" only. Settings live in MapControls now, and main's useMapControls effect for the sheet's near-full stop arrives with it. - The inline heading row keeps its ghost cog for a map-less embed alone. With a map, the column owns settings, and both rendering showed the same menu twice. - SettingsMenu keeps side, align and labelled. Nothing passes side any more, since the map-less drawer strip that did is deleted here. - globals.css drops [data-sy-expanded]'s 40px nudge, as this branch had it: it cleared the compact card's corner collapse control, and the exit is now "Close map" at the bottom middle. main's .sy-map-controls credits rules stay. - CHANGELOG keeps both entries; src/components/AGENTS.md keeps main's map controls row and this branch's anchored-panel wording. - CompactEmbedView.tsx, MapFrame.tsx and MapFrame.test.tsx stay deleted; main only edited comments in them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZAZHuFE1VSqyzx9ni
#482 hides the map's control column while a phone sheet stands at its near-full stop, which would otherwise leave a row of slivers above it. A narrow inline column takes that stop for the calendar too, but covers no map, so the inline map lost find-me, settings and Mapbox's credits on every narrow /calendar. The hiding now asks for a sheet that can collapse, as the rest of the sheet behaviour does. Watched failing first: the new browser-lane scenario, with the old condition. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The "Calendar" heading belongs to the loading chrome alone; the view names its switch instead. The spec caught the heading while the view was still loading, so it passed or failed on timing. It now waits for the switch: 3 of 3 red with #482's old condition, 6 of 6 green with the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
<button>shows the pointer cursor again, which Tailwind 4's Preflight had dropped widget-wide.Change outline
Components — the map's controls are one Mapbox control
The cog leaves
DrawerStackand joins find-me and the credits in one custom control, so Mapbox'spositionprop still places the whole corner and no stylesheet rule moves it.Flow — find-me
Our button drives Mapbox's control, so the blue dot, permission prompt and failure dialog are Mapbox's as before.
Files — new pieces
Preview
/gb/south-east/londononce it is)Contract impact
Visible to host pages, no contract change: the cog moves from beside the panel to the map's top-right corner, and Mapbox's own locate button (
.mapboxgl-ctrl-geolocate) is no longer shown.CHANGELOG.mdanddocs/embedding.md(Permissions Policy row, the tap-size note) are updated. No parameter, origin, CSP, storage or Permissions-Policy change, so WeMeditateWeb'slib/atlas-embed.tsand the WordPress plugin need nothing.Test results
--full: ✓ lint, typecheck, unit lane, build (incl. CSS scoping check), size budgetattribution.test.ts: 13 passed — each new assertion watched failing firstpnpm test:a11y: 3 findings, all also onmain(the Mapbox wordmark link's tap size, two registration tab-order findings);mainalso fails on its old find-me button, which this fixesmaintoo:Modal.focus*.test.tsxfail about 1 run in 4, untouched heremainmerged in (f796b68): ✓ lint, typecheck, 2414 unit testsManual verification
/gb/south-east/london: "i", find-me and settings top right; hovering each button draws its name out of it; Tab does too.Notes for reviewer
DrawerStackeffect and the branch). Both stops it fired at cover the whole column: the wide calendar's drawer is!inset-0/lg:!inset-4, the column's own 16px box, and the 0.97 sheet's top edge sits under 16px on any short viewport. The cog is also second in the column, so find-me covers it first either way./code-reviewand again by the critic — 'found' tracks the blue dot, which stays, and 'failed' reports the last answer until the next tap, so it outlives its dialog.HoverLabelkeeps its own input tracking:@floating-ui/react'suseFocusis:focus-visiblealone on Chrome, its modality listeners being behindisMacSafari(), and that is the read a menu's returned focus defeats./simplifyitems left as they are: fading the border and shadow in Button'sfloatingvariant (it would fade every floating button's focus ring too), derivinglabelledfromfloating(the label's wrapper would capture a caller's positioning), and derivingsuppressedfromaria-expandedwith:has().Detail
ux/map-controls) by hand:mainhad moved (feat(button): a floating variant for controls over the map #470's floating Button, fix(ui): dark-theme and display fixes from the 6 Nov bug sweep #370's dark fix, feat(nav): Back says where it goes; a place with one class opens it #476's Back rework), and both commits conflicted. 7454293 and 2d69807 were not ported.docs/rules/mapbox.mdstands, met by making the column one control rather than CSS on Mapbox's corner.HoverLabelopens on focus only after a key press. Chrome counts a menu's returned focus as:focus-visibleeven after a mouse click, so the cog otherwise lit its own label each time its menu closed.🤖 Generated with Claude Code