Repository navigation
Description
Summary
Follow-up fixes and polish for the nested-drawer navigation shell shipped in #31 (feat #30). Seven issues spanning drawer drag behavior, drawer/chrome spacing, the settings cog position, a stale-locale i18n bug, missing default theme colors on localhost, and inconsistent icon-box structure in DetailRow. Grouped into one ticket; each is tracked as its own acceptance-criteria block below.
Issues
1. Disable drawer dragging on tablet and larger (bug)
On ≥md, the drawer renders as a left-anchored panel (direction: 'left', src/views/DrawerStack/DrawerStack.tsx:132) but is still draggable with dismissible on and no snap points (snap props are only passed for bottom, src/views/DrawerStack/DrawerStack.tsx:279-282). Result: the panel can be dragged, the drop shadow doesn't track the drag, and a drag reads as a dismiss of the top-level drawer.
- Expected: On
≥md(left direction) the drawer cannot be dragged at all — it can only be dismissed via the close button. No snap/drag affordance; the drag handle is hidden (handle already defaults to bottom-only,src/components/atoms/Drawer/Drawer.tsx:158). - Notes: Likely disable vaul drag for the left direction (e.g. gate
dismissible/drag handling ondirection === 'bottom') while keeping close-button dismissal working.
2. Reduce handle → header spacing on mobile (polish)
The gap between the drag handle and the header reads as too large on the mobile bottom sheet. Handle margin is my-3 (src/components/atoms/Drawer/Drawer.tsx:31); header padding is pb-2 pt-4 (src/components/atoms/Drawer/Drawer.tsx:25).
- Expected: Tighter, visually balanced spacing between the handle and the first header row on mobile.
3. Reduce country-flag icon size on mobile and tablet (polish)
Country flags in the countries list are h-9 w-9 (src/views/CountriesView/CountriesView.tsx:64) — too large on mobile/tablet.
- Expected: Smaller flags on mobile and tablet (responsive size), restoring balance with the row text.
4. Move the settings cog to the top-left (polish)
The settings cog is currently top-right on the map (fixed right-3 top-16, src/views/DrawerStack/DrawerStack.tsx:271) and bottom-right map-less (absolute bottom-3 right-3, src/views/DrawerStack/DrawerStack.tsx:233).
- Expected: Cog moves to the top-left corner. On
≥md, it's offset so it does not overlap the left drawer panel (which sits atleft-0, floating toleft-4at≥lg). The dropdown alignment (align="end",src/components/molecules/SettingsMenu/SettingsMenu.tsx) should be revisited so the menu opens sensibly from a left-anchored trigger.
5. Language switch doesn't relocalize the current view (bug)
Toggling the language while viewing the countries list does not update country names to their localized form until you navigate to another view.
- Root cause:
useLocale(src/hooks/use-locale.ts:8-9) seeds a localuseStatefromi18n.resolvedLanguageat mount and only updates through its ownsetLocale. So whenSettingsMenucalls its instance'ssetLocale, otheruseLocaleconsumers (e.g.CountriesView'sregionNames,src/views/CountriesView/CountriesView.tsx:21) keep a stalelocale, so theirIntl.DisplayNamesnever rebuilds. - Expected: Every
useLocaleconsumer reacts to a language change. Fix by derivinglocalefromi18n.resolvedLanguage/ subscribing to i18next'slanguageChangedevent rather than holding independent local state. - Regression guard: Country names in
CountriesViewrelocalize immediately on language toggle, with no view navigation.
6. Default "We Meditate" theme missing on localhost (bug)
Loading localhost shows a grey, un-themed UI instead of the default We Meditate teal/orange brand.
- Context: When no client palette resolves (e.g. localhost, where the client color fetch is unavailable/empty),
BrandThemebuildsresolvedwith all rolesundefined(src/config/theme/BrandTheme.tsx:34-40) andapplyPaletteclears the managed vars, expecting the staticglobals.cssdefaults to stand (src/config/theme/palette.ts:171-185). The observed grey suggests that fallback isn't landing. - Expected: When no per-embed or client palette is available, the widget renders the built-in default We Meditate theme (
DEFAULT_SEEDSteal#82b1ae/ orange#e08e79,src/config/theme/palette.ts:49) — not grey. - Notes: Implementer to confirm the actual cause (client record returning empty/neutral colors vs. the
globals.cssdefault not applying vs. fetch failure) and make the default palette the guaranteed fallback.
7. Give DetailRow a structured, always-square icon box (refactor)
The leading icon box in src/components/molecules/DetailRow/DetailRow.tsx:12-24 is a single w-11 h-11 slot whose contents are passed as free-form children, so it isn't reliably square and the two real box shapes aren't modeled.
- Observation: There are only two kinds of box: (a) a framed single icon, and (b) a frame split in half with a small text line top and bottom (e.g.
JUL/14). - Expected: Model these two variants explicitly (e.g. an
iconbox and astacked/splitbox) so the box is always square and consistent, and callers can't hand-assemble an off-spec box. Keep the existingtonevariants (icon/highlight/plain). - Notes: Update the current callers (event detail cards, timing date badge) to the new API; keep
DetailRowpresentational.
Acceptance criteria
- Drag: On
≥mdthe drawer cannot be dragged; it dismisses only via the close button. Dragging never dismisses the top-level drawer; the shadow no longer desyncs. - Spacing: Handle→header gap on the mobile sheet is visibly tighter/balanced.
- Flags: Country flags are smaller on mobile and tablet.
- Cog: Settings cog sits in the top-left; on
≥mdit's offset clear of the drawer; the menu still opens and is usable. - i18n: Toggling the language relocalizes the current view immediately (verified on
CountriesView), with no navigation required. - Theme: Localhost with no client palette renders the default We Meditate teal/orange theme, not grey.
- DetailRow: Icon box is always square; the two box kinds (framed icon / split top-bottom text) are explicit variants; callers migrated.
- Lint + typecheck +
test:run+ build pass.
Files affected
src/views/DrawerStack/DrawerStack.tsx— drag gating (1), cog position (4)src/components/atoms/Drawer/Drawer.tsx— handle/header spacing (2), drag behavior (1)src/views/CountriesView/CountriesView.tsx— flag size (3)src/hooks/use-locale.ts— stale-locale fix (5)src/components/molecules/SettingsMenu/SettingsMenu.tsx— cog menu alignment (4)src/config/theme/BrandTheme.tsx,src/config/theme/palette.ts— default-theme fallback (6)src/components/molecules/DetailRow/DetailRow.tsx— icon-box variants (7)
References
- Follow-up to feat(ui): rework UI into a nested-drawer navigation system #31 (nested-drawer navigation), feat feat(ui): rework UI into a nested-drawer navigation system #30
- Related: latent locale-in-query-key note (spike perf(api): spike — separate region hierarchy from the event feed #32)
Metadata
Metadata
Assignees
Labels
Type
Fields
Hold Until
Activity