Repository navigation
fix(ui): follow-up fixes for the nested-drawer navigation UI - #36
Merged
Merged
Conversation
On ≥md the drawer renders as a left-anchored panel with no snap points, so vaul made the whole panel draggable — a drag desynced the shadow and read as a dismiss of the top-level drawer. Thread a `handleOnly` prop through the Drawer atom and set it for the left direction; since that panel renders no handle, the drawer becomes undraggable while the close button still dismisses it. The mobile bottom sheet keeps its full-panel snap-drag. Closes #35 (drag) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The handle→header gap read as too large on the mobile bottom sheet. The handle renders only on bottom sheets, so trimming its bottom margin (my-3 → mt-2.5 mb-1) tightens the gap on mobile without touching the desktop header rhythm. Closes #35 (spacing) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The h-9 flags read too large next to the row text below the desktop breakpoint. Drop to h-7/w-7 under lg (mobile + tablet), restoring h-9 at ≥lg. Closes #35 (flags) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
useLocale seeded a local useState from i18n.resolvedLanguage and only updated it through its own setLocale, so toggling the language from SettingsMenu left other consumers (CountriesView's regionNames) on a stale locale — their Intl.DisplayNames never rebuilt — until the view remounted. Derive the locale via useSyncExternalStore subscribed to i18next's `languageChanged` so all consumers re-read the active language together. Closes #35 (i18n) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
On localhost the client record returns color1/2/3 = "#000000" (the backend's
unconfigured default). buildScale("#000000") yields a fully-desaturated ramp, so
applyPalette painted primary/secondary grey inline — overriding the built-in
teal/orange globals.css defaults and rendering a grey, un-themed widget.
Treat an achromatic seed (near-zero saturation) like an invalid one in setRole:
the role isn't written and the static default stands. Background is unchanged —
its shade already snaps to the readable app-bg step for any near-black seed.
Closes #35 (theme)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…hapes
The leading slot was a single w-11 h-11 frame with free-form children, so it
wasn't reliably square and the two real box shapes weren't modeled. Replace the
children slot with a discriminated `box` prop — { kind: 'icon', icon } or
{ kind: 'split', top, bottom } — so the box is always square and callers can't
hand-assemble an off-spec slot. Keep the tone variants (icon / highlight / plain).
Migrate the event detail cards + stories and add SSR tests.
Closes #35 (DetailRow)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Follow-up to the handle spacing tweak: the mobile bottom sheet stacked the header's pt-4 on top of the handle's margin, leaving the handle→header gap top-heavy. Add a compound variant so the header uses a tighter top padding exactly when the handle is present (bottom sheet, not the map-less full panel that hides the handle), for a balanced ~11/13px gap. Desktop panels keep pt-4. Closes #35 (spacing) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Map mode: move the cog from the top-right to the top-left, offset past the left drawer on ≥md (flush left-0 on tablet, floating to left-4 at ≥lg) so it never overlaps the panel; on mobile the sheet is at the bottom, so the corner is clear. Flip the dropdown to align="start" so the menu opens from the left-anchored trigger. Map-less: the drawer fills the container with a search header owning the top, so keep the cog on the left but at the bottom (clear of the search field), and lift it to z-50 so it sits above the fill-the-container drawer content instead of being intercepted by a list row. Closes #35 (cog) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Dedup the LeadingBox outer box wrapper — compute the inner content once and return a single wrapper instead of repeating it in both branches. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address code-review findings on the map-less path:
- The >=md left panel omitted handleOnly, so a nested map-less drawer was still
full-panel drag-dismissible - inconsistent with the map drawer. Pass
handleOnly={direction === 'left'} there too.
- The bottom-left cog relied on Radix collision-flipping to open upward; add a
`side` prop to SettingsMenu and pass side="top" so it opens up deterministically
(a top cog keeps the default bottom). Fix the stale align/side comment.
Closes #35 (drag, cog)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The widget called i18n.changeLanguage(locale) in the render body, so it re-applied the embed's locale prop on every render and clobbered a language the user picked from the settings menu. App's AppShell effect already applies defaultLocale on mount (and on prop change), so remove the redundant render-side-effect. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Each deeper ancestor peeks a little less than the one before (cumulative offset base·(1−0.6^depth)/0.4), so a tall stack reads denser and its total spread stays bounded instead of fanning out linearly (gaps 6/3.6/2.16/1.3px vs a flat 6px). - Reduce the collapsed peek snap point from 96px to 80px. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vaul disables text selection on the drawer for pointer devices. Desktop drag is already disabled (handleOnly on the left panel), so re-enable selection there — event/venue copy should be selectable. Mobile is untouched (vaul only sets user-select:none under hover+fine). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Reduce the cog from h-10/w-10 to h-8/w-8 (icon 20→16). Swap the menu's arbitrary min-w-[11rem] for the built-in min-w-44 (same 11rem). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add text-sm to the event description so it reads a little smaller. Swap the title's arbitrary text-[24px] for the built-in text-2xl (same 1.5rem). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Swap the arbitrary h-[100dvh] for Tailwind 3.4's built-in h-dvh (same value). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sort a region's subregions by eventCount descending so the areas with the most events lead the list (copy before sorting; equal counts keep the API order). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The previous diminishing offset gave each level a different gap. Instead give the whole stack a single per-level gap (base·0.7^(total−1)) so every ancestor is evenly spaced, and the gap shrinks with the TOTAL depth — a taller stack reads denser (verified: 2 levels → 4.2px gaps, 4 levels → 2.06px gaps). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Mirror the region view: sort the (already event-filtered) country list by eventCount descending so the busiest countries lead. Equal counts keep API order. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Move the busiest-first ordering into the data layer, next to the eventCount>0 filters the fetchers already do (matching getEvents, which sorts in the fetcher): - getCountries / getRegion sort subregions/countries via a shared byEventCountDesc comparator, so ordering is one testable data invariant instead of two view copies. - Drop the per-view useMemo sorts + imports and CountriesView's now-redundant eventCount>0 filter (getCountries already guarantees it). - DrawerStack: compute the uniform peek gap once (a stack constant) and pass it to PeekStrip instead of recomputing per strip from a threaded total. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Deploying atlas-legacy with
|
| Latest commit: |
4fdc969
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3f0303e1.syatlas.pages.dev |
| Branch Preview URL: | https://fix-nested-drawer-followups.syatlas.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up fixes and polish for the nested-drawer navigation shell (#31 / feat #30), plus a second round of Adjust-phase tweaks. Each is its own commit.
Original batch (#35):
handleOnly); dismissal is the close button only, so a drag no longer desyncs the shadow or dismisses the drawer. Applied to both map and map-less drawers.lg(mobile + tablet), restoring at desktop.align="start"). Map-less keeps it bottom-left (side="top").useLocaleconsumer relocalizes together on a language change (useSyncExternalStoreonlanguageChanged).#000000sentinel) are treated as unset.boxprop.Adjust follow-ups:
Widget.tsxre-applied the embed'slocaleprop in the render body on every render, clobbering a language the user picked from the menu — removed (App's mount effect already applies the initial locale).getCountries/getRegion), next to theeventCount>0filters they already do.base·0.7^(total−1)) — every level evenly spaced, deeper stacks denser.text-[24px]→text-2xl,min-w-[11rem]→min-w-44,h-[100dvh]→h-dvh).Changes
src/config/api/fetch.ts— busiest-first ordering moved intogetCountries/getRegionvia a sharedbyEventCountDesccomparator (data-layer concern, matchinggetEvents); the views just render the pre-sorted data.src/Widget.tsx— dropped the render-bodyi18n.changeLanguage.src/hooks/use-locale.ts—useState→useSyncExternalStore(languageChanged).src/config/theme/palette.ts—isBrandSeedrejects achromatic seeds so primary/secondary fall back to the globals.css default.src/components/molecules/DetailRow/DetailRow.tsx— freeformchildren→ structuredbox.Verification
pnpm lint)pnpm typecheck)pnpm build+ladle:buildManual / visual verification
Driven in the running widget (Playwright, standalone dev against the local backend):
localStoragepersists.--primary-9=176 23% 60%(teal), no inline override — the#000000client seeds fall back to the default.transform: none, not dismissed.user-select: text.Notes for reviewer
useMemosorts + a redundant filter). Code review found no correctness bugs; security review found no risk (the fetcher.sort()mutates only freshly-built arrays — not the React Query cache — and the Widget change doesn't touch the auth/host-prop boundary). No findings dismissed.pnpm previewbuild.Closes #35
🤖 Generated with Claude Code