Repository navigation
feat(filters): Where, When and Language buttons over the map on a computer - #542
Conversation
…puter
From 1024px of widget width the filters are three buttons at the top right of
the map, and in the calendar's own header, instead of a drawer behind the
Filters button. Each opens a small menu (the Dropdown atom, triggered by a
floating Button) with the same questions and live counts as the phone's
filters, and a tap applies at once. A button with an answer is filled and
names it ("Tue · Evening"), its screen-reader name keeping the question; Clear
leads the row once anything is chosen. On a place page Where names the place
unfilled, and fills only for a searched place, Near me or a format.
- SearchFilters is composed of per-question blocks (FormatFilter, DayFilter,
TimeFilter, LanguageFilter, MoreFilters), which the phone form and the
buttons' menus share.
- usePanelFilters: over a place page the first answer opens that place's
results; Clear then goes back to the page (clearsBackToPlace) unless a place
was searched since or the link was fresh.
- Escape in a menu closes only the menu: every usePopover panel carries
data-popover-open, and DrawerStack's Escape ladder leaves the key to it.
- The row lets the map beside it take every press but its buttons', and is
placed from DRAWER_W_PX, which moves to config/responsive.ts.
- The Filters button and the list's filter tags step aside while the buttons
show; narrower widgets, a map-less list and phones keep them.
- Where shows what a searched place's scope holds ("18 within 186 mi, plus 23
online"), on the phone too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Hand-added, as SahajCloud#1302 serves them: the full sync stays blocked on main until #466 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps DrawerStack's two provider sites one element each. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Where the filter row goes is one pure decision (filterRowPlace), resolved once in DrawerStack and shared through FilterRowContext; the calendar's list view, a narrow panel beside the map, now gets the map row instead of a squeezed header row. Sort keeps the toolbar's end when Filters steps aside. - Escape: an open usePopover claims the key in the window's capture phase, so no Radix layer (the drawer, the calendar's filter overlay) hears it. This replaces the data-popover-open mark and DrawerStack's check. - SearchField's focus request is cleared only once the input has focus, from a mount-only store subscription; the dependency on the flag it consumed disconnected its observer before a late input rendered. - The closed buttons read only the facet scope (useFilterScope); live counts are taken inside each menu, which mounts only while open. - The row is placed by classes against --sy-drawer-w, pinned by the existing drawer-width scan, so DRAWER_W_PX stays where it was. - Smaller: useIsWide(element, minPx), WhereFilter takes facet counts and a required onSearchInstead, a typed Dropdown function trigger, one listsFilteredClasses predicate, dead barrel exports and aliases dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… row 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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
sahajatlas-design | 2c32738 | Nov 28 2026, 01:04 AM |
|
Not required, so not blocking: 🤖 sydevs dispatcher |
…r always takes the row - FilterChips (src/components/organisms/FilterChips) is the controlled button row; FilterChipBar in the view only wires it to the URL and supplies the Where menu's place half. RecoveryButton moves into the SearchFilters organism, which both surfaces use. - The full-width calendar (month and week) carries the row in its header from the drawer's own 768px crossing, not from the map row's 1024px one. - Stories: Organisms › Filter chips gains "Czech classes" and "Location refused", and Views › Filter the same two; the story harness resolves the row as DrawerStack does, so Views › Calendar previews its header row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ear me - The compact credits sit under the control column, centred under its 40px buttons, and open leftward from there, so the filter buttons' row needs to clear only the buttons (64px, not 100px). - While the filter buttons show over the map, the column's find-me button is hidden (useMapControls.findMeHidden, set by DrawerStack from filterRowPlace): Where's Near me asks the same question through the same GeolocateControl, which stays mounted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Clear - The Language menu is the checkbox list alone, with no heading, and a search box once more than 10 languages are offered (accent-blind; its name is a screen-reader string, filters.a11y.search_languages, in every locale). - Each menu stays on the side it opened and is capped to the room below the button, down to the frame's 16px inset, so a long one scrolls inside itself and ends where the full-height side panel does (usePopover fitHeight). - Clear is an X with a "Clear" hover label. - The map's row renders into the map's own element (published by MapControls as useMapControls.container), under the control column's corner, so the column's hover labels draw over the buttons. - The Czech story case and its feed are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # CHANGELOG.md
…answers
- CheckboxGroup (molecule): checkboxes with a count at each row's end and the
row's hover tint. Past 10 options it adds a search box and opens with the
checked options first (order taken at mount, so nothing moves under the
pointer). Both language lists, the phone's dropdown and the button's menu,
use it.
- The When and Language buttons name a count ("3 timings", "3 languages")
once more than two answers are picked (filters.when.count,
filters.language.count, from sydevs/SahajCloud#1307).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Hand-added from sydevs/SahajCloud#1307, as production serves them: the full sync stays blocked on main until #466 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Sync the translation snapshot: Copy number and the share Email label now read `event.actions.copy_number` and `share.email` (sydevs/SahajCloud#1304), and the three keys sydevs/SahajCloud#1306 dropped leave RETIRING_KEYS. Keys published ahead of #538 and #542 join PENDING_KEYS. - tests/browser/skeleton.spec.ts measures the sign-up form, filters and calendar. It caught three header mismatches, now fixed: the sign-up form's reassurance line, the filters' close-button row, and the calendar's own controls in place of a Back-and-title header. Co-authored-by: Claude Opus 5.5 <[email protected]>
… tags - Vocabulary: a chip is the Chip atom, a small tag; the applied filters are filter chips (ActiveFilterPills → ActiveFilterChips); the buttons that open filter menus are FilterMenus / FilterMenuBar (were FilterChips / FilterChipBar); "pill" names only a shape. DESIGN_SYSTEM.md says so. - On the map the filter menus render into a slot beside the control column, inside the one Mapbox control (MapControls.menuSlot), so Mapbox places them; their width is capped against the map (a size container) so they wrap rather than run under the side panel. - In the full-width calendar's toolbar they are smaller bordered buttons, inline after the month controls, with Clear at the end they grow from. - Clear's label is filters.chrome.clear (to read "Clear filters", sydevs/SahajCloud#1308). - CheckboxGroup keeps checked options at the top as they are picked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tory - In the calendar's toolbar the filter menus sit at the line's end, and Clear leads the row as it does over the map, so it is not read as the calendar's own close button in the corner. - Organisms › Filter menus takes Placement (map | toolbar) as a control and shows every state: nothing chosen, one answer each, everything chosen (counts), nothing matches with and without a single way out, and a refused location; its description says how the no-match footer works in every menu. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s said filters.chrome.clear as sydevs/SahajCloud#1308 serves it, hand-added while the full sync stays blocked on #466; the fallback default and prose follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`pageRegion` and `filterOriginRegion` both answered "which region is this path about" off `resolveStack`, one reading the last entry and the other the entry under a trailing `filters`. Both callers of the second only ever pass a `/…/filters` path — `FilterView` renders on that route, and `navigation.ts` reads it inside the `kind === 'filters'` arm — so one function stepping over a trailing `filters` answers both. `clearsBackToPlace` widens by the same step: a `from` of `/gb/filters` now matches region `gb`, so Clear goes back to the drawer the results were opened from rather than resetting the answers. `navigate(-1)` undoes that step either way, which is what the rule says it is for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYUQZ8jhMiFkhxaeFV
Two options nothing asked for. `searchableAbove` had one caller, which never passed it, so it is the module constant its own `@default 10` already treated it as. `meta?: ReactNode` was an escape hatch with one use, a count span, and a second word for what `Choice` beside it spells `count?: number` — so the option carries the number and the group draws it, as `Choices` does. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYUQZ8jhMiFkhxaeFV
`DESIGN_SYSTEM.md` reserves "filter chip" for the `ActiveFilterChips` tag — the thing this crossing HIDES — and what it shows is the filter menus. `FilterChips` already became `FilterMenus`; the constant and `filterRowPlace`'s field were the residue. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYUQZ8jhMiFkhxaeFV
A host-observable behaviour this branch introduced and never recorded: an open popover listens on the host's `window` for Escape and stops it there. The guide is the only documentation an embedding site reads, so the bound belongs in its exceptions list — only a key pressed inside the widget's own subtree, never one in the host's own modal. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYUQZ8jhMiFkhxaeFV
|
Four adopted, two rebutted, six threads resolved. Pushed Adopted — Escape Rebutted —
🤖 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. 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
useFilterEditor (src/hooks) owns reading the filters with a page's implied place and writing them back. The phone drawer and the filter buttons both use it, so usePanelFilters and FilterView's own copies go. The two surfaces differ only in where an answer lands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The filter buttons now show over the map wherever the side panel does (the existing 768px crossing) and wrap where the map beside it is narrow, instead of a second 1024px measurement and a shared row decision. - FullInterface hands the buttons to the map as a prop; MapControls shows them, and hides find-me, while useMapControls.filterMenus holds. The slot published through the store and DrawerStack's portal go. - The full-width calendar decides its own header row (isCalendarFullWidth); the Filters button and filter tags step aside on useFilterMenusOnMap. - filterRowPlace, FilterRowContext, useFilterRow and FILTER_MENUS_MIN_PX go, and useIsWide loses the extra width parameter. - The map controller wraps the map too, so the buttons' Where can reset the camera. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The drawer (FilterView), the buttons (FilterMenuBar) and the Where menu they share (WhereFilter) live together. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ListToolbar takes the Filters button as children and Sort as `end`, which keeps the end whether or not the Filters button shows, so the two callers' ms-auto wrappers go. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/components/molecules/ActiveFilterChips/ActiveFilterChips.tsx # src/lib/shape/calendar.test.ts # src/lib/shape/calendar.ts # src/lib/shape/navigation.test.ts # src/views/CalendarView/CalendarView.tsx # src/views/DrawerStack/DrawerStack.tsx
… buttons The Filters button steps aside where the filter buttons show, which left the root header 6px shorter than the loading chrome that draws it (the browser lane's skeleton check). Its control slot keeps a control's height either way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in #520–#551. Resolutions: - ShareView stays deleted (#540); the inline split's class views are the class and its sign-up, and the aside under the map takes the actions, then Register, in #540's order. - The calendar's width reads #538's `isCalendarFullWidth` off the URL; #466's `calendarFillsWidth` goes with Schedule-X. - MapControls and Mapbox take both `settings` and #542's `filterMenus`; MapLayer passes the floating filter buttons, and DrawerStack claims them only for a sheeted stack. - The root view's new title (#531) is a place's, so inline it gives way to the page heading. - Main's Event "Layout" control is dropped: the Expanded form shows the phone sheet. - The panel stays 384px, including FilterMenus' cap; translations re-synced from production. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… map MapControls becomes its own organism, with a story, and knows nothing of Mapbox: the filter buttons where they show, find-me where they do not, and settings. `floating` sits in the full and expanded maps' corner, which is now `MapCorner`, the one Mapbox control that holds the slot and the credits under it. `inline` is the toolbar above the inline embed's map, with #542's filter buttons in their inline look, so the inline map carries only its credits and the page heading loses its cog wherever there is a map. Find-me's request stays with the map (`useLocate`), which publishes its state and `locate` on `useFindMe`, so its button can sit outside the map. The Filters button and filter chips step aside inline as they do beside a panel, and the inline calendar never carries a second set in its header. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
usePopover.Change outline
Components — where the filter row goes
One rule: the buttons show wherever the side panel sits beside a map, and wrap where the map is narrow. No second width measurement and no shared row decision.
Components — the button row
A controlled organism, like
SearchFilters; the view wires it to the URL and supplies the Where menu's place half. The closed buttons read only what the scope holds; the live counts are taken inside a menu, which mounts only while open.Components — the list's filter lines
Said once, by the list, on every list of classes: the filters only ask what can narrow the classes here, so an empty set is reached by moving somewhere else after choosing.
Flow — an answer, and Clear
On a place page the first answer opens that place's results; Clear then steps back to the page.
Behaviour — Escape in a popover
A Floating UI popover is not in Radix's layer stack, so the drawer heard Escape first and closed the page with the menu. The open popover now claims the key before any layer.
That phase is the host page's too, so the claim is bounded to the widget's own subtree:
composedPath, since a window listener seesevent.targetretargeted to<sahaj-atlas>by theembed's shadow root. An Escape in the host's own modal reaches them untouched, and Floating UI's
document-level dismiss still closes the popover.
Components — the map's control column
The credits move under the buttons, so the filter row clears only the buttons; find-me steps aside while the row offers Near me.
Files — the filter form split into blocks
The phone's form and the buttons' menus compose the same per-question blocks.
Behaviour — smaller changes
Files — vocabulary
A chip is the
Chipatom, a small tag; a filter menu is a button that opens a menu; "pill" names only a shape (DESIGN_SYSTEM.md).Preview
Contract impact
CHANGELOG.md, plus one key: while apopover is open the widget listens on the host's
windowfor Escape and stops it there. That isa ninth entry in
docs/embedding.md's exceptions list, with its bound — only a key pressedinside the widget's own subtree. No parameter, CSP, Permissions-Policy, sizing or URL change.
filters.chrome.more_area), are merged; #1308 rewordsfilters.chrome.clearto "Clear filters".Test results
.claude/skills/pr-prep/check.sh): lint, typecheck andtest:runpassed.FilterMenus.test.tsx,FilterMenuBar.test.tsx,filter-row.test.ts,use-popover.escape.test.tsx(including the host's own Escape),FilterNotes.test.tsx,CheckboxGroup.test.tsx(the option's count),hiddenInPersonandisCalendarFullWidthcases, andpageRegion(its trailing-filtersstep) andclearsBackToPlacecases innavigation.test.ts.src/lib/shape/path.ts. No findings — the Escape guard only narrows, and the widenedpageRegionreaches no new sink (regionis set throughURLSearchParams, resolved against the region tree, and rendered as a text child).Manual verification
Checked in the Ladle full-widget story at 1440×900. Worth repeating on the preview:
/gb: three buttons, nothing open. Press When: days, then Morning, Afternoon, Evening and Night, each with its hours and count./gb, When, Tue: the results open withdays=2®ion=gb, Where still names the United Kingdom unfilled, and Clear leads the row. Press Clear: back on the United Kingdom page./gb/south-east/london: When, Tue and Evening, then Escape. The menu closes and the results keepdays=2&time=evening.Notes for reviewer
filters.when.label,filters.where.scope, and the pluralfilters.language.countandfilters.when.count) were added totranslations.en.jsonby hand, copying production's values from SahajCloud#1302 and #1307. The full sync stays blocked on main until feat(widget): open every embed inline; expand the map over the page #466 merges.usePopover, not the drawer, so it also covers the calendar's filter overlay and every other popover. Worth a look from anyone who knows the Radix layer stack.clearsBackToPlacewidened by one step, as a consequence of the one region read: afromof
/gb/filtersnow matches regiongb, so Clear on the results goes back to the drawer theywere opened from rather than resetting the answers in place.
navigate(-1)undoes that stepeither way, which is what the rule is for — but it is a behaviour change, not a rename, so say
if you want it kept strict to a place page.
Detail
MapControls' menu slot), so Mapbox places it. Its widest iscalc(100cqw - var(--sy-drawer-w,352px) - 96px), against the map as the size container, so it wraps rather than running under the panel.floatingButton variant, in the calendar's header bordered and small; filledprimaryonce answered either way.Dropdowngained a function trigger so a real Button opens it without nesting one control in another.shownGroupsasks of the counts, without counting.🤖 Generated with Claude Code