Repository navigation
feat(panel): the desktop panel is as tall as its content - #495
Conversation
On a computer the floating panel ran the full height of the window even around two classes, so most of it was blank white over the map. At 1024px and wider it now ends under its view, up to the frame's height less its margins, and a long list still fills it and scrolls inside. The view layers share one grid cell instead of being absolute, so they stay in flow and give the panel its height with no measuring in JS. A height change eases over 200ms through the Web Animations API, since a CSS transition never fires while the height stays `auto`; reduced motion skips it. Phones, the full-width calendar and map-less embeds are unchanged. Every drawer body now ends with a 16px inset that mirrors the header's top, so whatever closes a view (the location prompt, an alert, Load more) sits as far off the bottom edge as the header does off the top. A body ending in a list keeps its rows' own padding instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The atom owns the panel element and the inputs that make it content-sized, so the easing hook runs beside `useSheetDragClaim` there: DrawerStack loses its element state and the hook its DOM climb. It seeds from the observer's first delivery, and a spec now holds its four rules. Every block that can close a panel already carried its own bottom space but the location prompt and Load more, so those two carry 16px instead of the body adding an inset that stacked on the rest (the class page, empty states, search results). A panel holding the place search keeps room for its suggestions, which open inside it and now scroll past a cap rather than being cut off by a short panel. 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. |
# Conflicts: # CHANGELOG.md
#485 put a search box under every place title, so the 400px floor that assumed the field in the header no longer fit the suggestions. Any floor breaks whenever the field moves; instead, while the combobox reports `aria-expanded="true"` the panel takes the full height, eased, and the list cap goes. A list view's fallback no longer fills the body either: in a panel sized to its content that pushed the location prompt below it out of view. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | cdf3757 | Nov 26 2026, 12:03 AM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The shape is right. CSS owns the height, a ~30-line hook owns only the easing CSS cannot do, and each spacing edit follows from one new fact: a panel may now end here. Nothing is smuggled in.
top-4, the cap and the suggestions rule all key on --sy-frame-h, so a contained embed clamps to its frame, not the window. The lg: residue stays a float-or-not decision.
One gap: the diff reasons about START_BODY and leaves CENTERED_BODY, whose centring depended on the panel being full height.
Findings
should-fix—CENTERED_BODY'sh-fulland auto margins centre nothing in a content-height panel, and its docblock still claims they do.Fallbacks.tsx:817.should-fix— Streamline:use-ease-height.tsis a module hosting one one-caller effect. Line 10.
What was checked
Read whole on the branch: the 14 changed files, plus shared.tsx, geocoder-dom.ts, sheet-touch.ts.
- Ladder,
useEaseHeight. No platform answer:auto→autofires no transition, so the JSDoc holds. No dependency added. Streamliner: 2 pieces walked, 1 finding,START_BODYkept. - The suggestions coupling holds at both ends.
role="search"occurs once (shared.tsx:253) andMapSearchrenders nowhere else, so the rule reaches every geocoder in a panel;geocoder-dom.tsseedsaria-expandedand the library keeps it. It is the repo's onlyhas-[utility, and such a class fails silently — the measured table is the only evidence. ViewLayerstopped being a positioned ancestor. Everyabsoluteundersrc/viewsand the drawer-rendered molecules has arelativeparent, and--sy-footer-hstill publishes on the layer (#312).- No contract surface touched;
CHANGELOG.mdcarries the host-visible entry anddocs/embedding.mddocuments no panel geometry. Every path the body names exists.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
…ults show Mapbox opens and closes its list on every response, so a panel following `aria-expanded` grew and shrank between keystrokes. It now takes the full height for the typing session: while the search holds focus and text. "We couldn't find that place." toggled under the field on each response and pushed the panel 28px each time. It now waits for a 300ms pause on an empty answer, and shows in the suggestion list's spot and look, overlaying rather than pushing. Its status region stays mounted so the text is announced. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`use-ease-height.ts` hosted one effect with one caller, and `DrawerContent` already carries an equivalent inline `ResizeObserver` effect in `DrawerFooter`. The gate becomes the effect's condition, so the module and its re-export of the panel argument both go. The spec drives `DrawerContent` through vaul instead of the hook, as `Drawer.scroll` and `Drawer.snap` already do, and keys the fake observer by the element it was given so a second observer in the tree cannot answer for the panel's. That buys four variant cases the hook-level spec could not state: bottom, right, `filled` and wide each observe nothing. Every rule watched failing with it removed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVoQUZCUt4jqo5QjdM
`CENTERED_BODY`'s docblock claimed its `max-h` was correct on the desktop panel because the body is the visible area there. A content-height panel makes the body its own content, so the cap never binds and both auto margins collapse — the centring is the bottom sheet's alone now. Measured at 1280×800 against the class chain: a 768px panel centring at 304.5px margins became a 159px panel at 0. The four classes stay. They are the fix for states that were invisible on every phone, and inert is not the same as spare. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVoQUZCUt4jqo5QjdM
…anel-fits-content
|
Both critic threads built and resolved.
🤖 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
…band The list took the band's full width (#370) on the assumption that the field starts the band. On SearchView, Back comes first, so the list ran 28px past the field and off the panel (off the screen on a phone). MapSearch now measures the span from the field to the band's end and hands it to the list; the start page still covers the strip under Filters, as #370 intended. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…anel-fits-content
Nine conflicts. `main` landed #495, a desktop panel as tall as its view, and #485, a search field under every place page's title, while this branch removed the compact card, the contained map and the `filled` drawer mode. `Drawer.tsx` — `main`'s height ease stays, so the slot context keeps the `wide` flag it reads. `filled` is gone, so `showHandle` loses that arm and the real drawer is always `anchored`. `Drawer.ease.test.tsx` loses its `mode: 'filled'` case for the same reason: there is no such panel left to leave uneased. `src/views/fallbacks.tsx` — `main`'s shape, with the field band and without `SearchButton`, plus this branch's `isPlace` on the header. `Icons.stories.tsx` and `translations.en.json` — both sides' additions. Each glyph has its own call site, and the gallery spec checks both directions. `components/AGENTS.md`, `DESIGN_SYSTEM.md`, `Fallbacks.tsx` — prose where both sides rewrote one line. The geometry class names and the `Disclosure` row are `main`'s; the reasons beside them are this branch's, since the contained map and the map-less container `main` names are gone. `CENTERED_BODY`'s note now names the inline column, the one surface left where the body IS the visible area. `CHANGELOG.md` — every entry stays, `main`'s three above this branch's, which keeps the place the branch chose for its own. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUybd1Bs7yKWy9HkV7
main reworked the geocoder field (#485, #495), the drawer snaps (#492, #495) and the panel header (#490) while this branch was open. Every hunk keeps both sides' behaviour. - `MapSearch` keeps this branch's controlled `value`/`onChange` — the Where step holds the draft's text, `SearchField` holds `?q` — and takes main's settle delay, measured results band and overlaying not-found message. Main's new spec held the text inside the field, so it now owns it the way both callers do; watched failing against the settle removed. - `NavHeader` takes main's `pendingTitle`, without its `t`: the X it named is this branch's `CloseButton`, which brings its own. - The mobile snap reads `opensTall(kind)` over main's `fitsContent`, so calendar, add and correct stay tall and event and Share still fit their own content. The two predicates are disjoint. - `EventHeader` takes a `title` rather than an event since #490, so the submit listing and its story pass one. - `CHANGELOG.md`, `DESIGN_SYSTEM.md` and the two import hunks are unions. DESIGN_SYSTEM.md is rebuilt on main's restructure, carrying this branch's `ProposalForm` row, `SubmitView`, `CloseButton` and the `Link` footnote note. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY4MwaWAk4ZhpqxBB5
Summary
Change outline
Components — the cross-fade gives the panel its height
The view layers used to be
absolute inset-0, so they added no height. They now share one grid cell and stay in flow. With no<style>injection, the #236 shadow-root fix holds.Contract — the left panel variant at ≥lg
The full-height rule keys on the typing session (the search holds focus and text), not on the list being open: Mapbox opens and closes the list on every response, and a panel following
aria-expandedgrew and shrank between keystrokes. It works wherever the field sits: header, toolbar, or under a wrapped title.Flow — easing a content-driven height
A CSS transition never fires here, because the height stays
autowhile only the content changes. So the atom eases it with the Web Animations API, in an effect besideuseSheetDragClaim.Behaviour — "We couldn't find that place."
It used to be a line under the field that toggled with each keystroke's response and pushed the panel down 28px each time.
Behaviour — the suggestion list's width
--sy-results-wused to be the band's container width (100cqi, #370), which assumed the field starts the band. SearchView's Back comes first, so the list overran the field by 28px and the panel by 3px (28px off a 390px screen).Behaviour — who owns the space under the last block
Every block that can close a panel already carries its own bottom space (rows, EventDetails, fallbacks, form bodies) except these two.
Preview
/gb/south-east/london/balham-library— the panel ends under two classes and the prompt/gb/south-east/london— a long list fills the height and scrolls inside/gb/midlands/coventry/1493/share— Share ends under its content/gb?langs=zu, then typeLonin the search box — the short panel grows once to full height and all suggestions show. Click the map and it shrinks back./search?q=London, then typeLon— the list lines up with the field, beside Back/gb?langs=zu, then typeXqzv— no bounce while typing, then "We couldn't find that place." in the list's spot/calendar— the month grid keeps its full size. Switch to List: the narrow panel, which scrollsTest results
lint+typecheck+test:run): ✓ (2504 passed, 1 skipped)Drawer.results.test.tsxnow pins the band marker instead of the container width.Drawer.ease.test.tsx: 8 passed. Each rule watched failing with it removed.MapSearch.not-found.test.tsx: 3 passed (the pause, a superseded answer, withdrawal on typing). Each watched failing against its rule removed.ViewLayer.test.tsxnow pins the shared grid cell.assert:css.Manual verification
/gbdown to a class and back. The bottom edge eases. Under DevTools → Rendering → "prefers-reduced-motion: reduce", it changes at once.Notes for reviewer
ux/polish(2e01942) measured the layer in JS and wrote--sy-panel-h/--sy-panel-room. This replaces it with CSS sizing plus a ~30-line effect in the Drawer atom, so there is no viewport read, novaul.cssedit and nosrc/styles/security trigger.CENTERED_BODY's four centring classes are inert at ≥lg now, and they stay. Measured at 1280×800 against the class chain: a 768px panel centring at 304.5px auto margins becomes a 159px panel at 0, becauseh-fulltakes the body's own content height. They are still the fix for fallbacks that were invisible on every phone, so only the docblock's desktop claim changed.DrawerStack.tsx, so one of the two will need a small rebase.Detail
Measured at 1280×800 on this branch (main: 768px everywhere):
The first painted frame of a growing ease is the old height. The animation starts inside the ResizeObserver callback, which runs before paint, so no frame flashes at the new height.
🤖 Generated with Claude Code