Repository navigation
feat(event): redesign event display & registration surfaces - #58
Merged
Merged
Conversation
Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…onlineUrl Extend EventScheduleSchema with the full structured pattern (interval, weekdays, monthly mode/day/week, ending, exclusions), add `inactive` to both feed + doc schemas and selects (verified geojson pass-through), and remove `onlineUrl` end-to-end — Atlas never shows a join link; delivery is CMS-side after registration. Adds resolveEventDisplay: the shared display resolver every event surface derives type/status/register-state from, with unit tests asserting every row of the issue's status table, external-mode invariance, today-rollover and the weekday-in-display-zone rule. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adopts the legacy recurrence key family (weekly_1/weekly_2/monthly_*) already translated in 9 locales, backfills it in en, and adds the new display group (type/status/microcopy/time-hint strings), the action-row labels, and the missing recurrence templates (multi-weekday, every-N, monthly by-date). sessions_count carries full plural forms for cs/ru/uk. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Hand-rolled RFC 5545 builder (no runtime dep): TZID-anchored DTSTART, RRULE from the structured schedule (incl. monthly by-weekday, COUNT/ UNTIL), EXDATEs expanded from exclusion windows at constant local time across DST, plus a Google Calendar template link. - formatDistance: m below 1 km, one decimal below 10, integers above; miles for en-US/en-GB via a locale→unit map. - useEventDisplay: the one formatting layer over resolveEventDisplay (type labels, status chips, recurrence templates from display-zone instants, time hints, register microcopy). Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ion row - EventHeader: title + chip row (type · Free · status · languages) + one timing line, rendered outside the drawer body so the mobile 80px peek carries the triage payload and the title stays pinned. - EventDetails body in the issue order: plain-text facts (icon-set icons, non-navigating; address tap only re-frames the map) → Register → microcopy → secondary actions → images → About (prose below the fold). - EventRegisterBar: the only filled control; closed courses disable it with the contact helper; ended/full replace it with the message + a "See nearby events" escape hatch (parent region, else centred search). - EventActions + new ActionRow/ActionCircle molecule: labelled tonal circles per resolver state; contact is tel: on touch and a number+copy popover on desktop; add-to-calendar offers Google + .ics download. - New DirectionsIcon (mirrors under RTL) + icon mirroring policy note. - EventView: sticky Register footer on the mobile map sheet, pinned to the viewport edge via the live --sy-sheet-top mirror; hidden at peek. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
EventCard: bold differentiator per list grouping (venue/locality on region lists via variant="place", title on mixed lists) + status chip, type · recurrence · time on line 2, and the address line with the distance right-aligned (no 10 km threshold; aria explains the searched- location reference). Online variant shows the hosted-from line and converted "(your time)" times, never a distance. Region/online lists state "All events are free" once in the header — no per-card Free chips. Removes EventSoonChip, EventTime, and DetailRow (superseded by resolver chips + plain-text facts); isSoon stays for the relevance sort. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…Path - Shared EventSummary sub-component (views/shared): title · chips · when · where from the resolver, plus an "on Sahaj Atlas" backlink in map-less embeds where no Atlas chrome exists. - RegistrationView: deep links to closed/ended/full/inactive events get the state message, never an operative form (cosmetic until SahajCloud enforces server-side — #577); courses lock startingAt to the first session (registration binds to the full run). - ShareView repeats the summary above the share block. - Widget: basePath wired end-to-end (props type → destructure → r2wc map → initial hash route, safePath-validated; a visitor's existing hash wins) and dir now derives from the active locale on the theme root. DrawerErrorFallback gains a See-nearby escape for dead links. - demo.html documents the map="false" + base-path embedded form and the honest style-scoping caveat (deliberately shadow-DOM-free). Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…N-LD - Convert every physical-direction Tailwind utility to its logical equivalent (ms/me, text-start/end, -end-*, rounded-s/e) so chip/action rows follow text direction; document the two deliberate exceptions (the desktop drawer anchor + PeekStrip geometry) as TODOs for when an RTL locale ships. localeDirection() + tests drive the theme-root dir. - EventMetadata now reads the shared resolver: rolled next-occurrence startDate, EventPostponed for dateless/inactive, SoldOut-ready offer availability — SEO agrees with the UI. - Drop en's dead recurrence.weekly/monthly (all surfaces use the templated key family now). Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The facts block owns "This event has ended" — the register slot keeps only the See-nearby escape hatch (plus the full-state message, whose facts stay normal). demo.html: the host must size the map-less element (an unsized custom element collapses to zero height) — verified against the built embed. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- useEventDisplay gains timeLine + blockedMessage so no surface composes time+hint or state→copy on its own (card, panel, summary, register slot, registration gating all consume them). - Shared schedule primitives (scheduleTimeZone/scheduleStart/withEndTime) in shape/event.ts; ics.ts consumes them — the endTime wire format is parsed in one place. searchPath() owns the ?center format. - Restore the DrawerStack rAF gate (no perpetual loop at the root); cache Intl.NumberFormat per locale in formatDistance; memoize EventMetadata's resolve + OnlineView's decorated cards. - Trim FEED_SELECT of the four calendar-export-only fields; trim the EventDetails + @/lib barrels to what app code consumes; drop dead showFree/className props; merge the Register button branches; replace the hand-rolled RTL list with i18n.dir(); card language chips reuse languageLabel/languageCode; free-line added to the search list; DrawerFooter owns the sticky-pinning contract via a variant. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Review findings fixed: - ICS: validate firstDate_tz (IANAZone) so a malformed CMS zone can't inject TZID lines or invalid DateTimes; strip CR/LF from URL:; escape lone \r; fold by UTF-8 octets without splitting characters; normalize date-only untilDate/exclusions so west-of-UTC zones keep their last session and excluded days; anchor one-off exports at the next upcoming occurrence (rescheduling drift). - withEndTime rolls a midnight-crossing endTime to the next day — a 23:00–00:30 session is no longer "finished" all day (display + DTEND). - Widget: basePath boot runs once — the root hash recurs on navigation and Widget now re-renders on locale changes, which teleported users back to basePath. - Registration: deep-linked /register for external-mode events shows the link-out CTA, never the native form; selectable dates roll past finished occurrences (with a resolver fallback when the precomputed list is empty); the date picker renders in the event's own zone. - EventRegisterBar: external mode without a URL renders no CTA (pre-redesign behavior); hasRegisterSlot keeps the mobile sticky footer from pinning an empty bar on inactive events. - EventHeader peek line carries the load-bearing "(your time)" hint; upcoming status chips use the actually-next occurrence under firstDate drift; useEventDisplay re-resolves across minute boundaries instead of freezing "now"; ActionCircle forwards floating-ui trigger props (popover aria state); ShareView falls back to the current URL; DOMPurify forces safe rel on target links; story mocks moved to far-future dates so previews don't rot into terminal states. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Deploying sahajatlas with
|
| Latest commit: |
c82046c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://638b8ac5.sahajatlas.pages.dev |
| Branch Preview URL: | https://feat-event-surfaces-redesign.sahajatlas.pages.dev |
- New Summary molecule (icon + plain-text fact lines) replaces the private FactLine; the panel's sessionLine is gone — the header owns the timing/terminal line, facts carry recurrence + address only. - EventCard: single behavior (variant removed — title is always bold), start time only (no end time, no "(local time)"; online keeps "(your time)"), type label only when it says more than the default weekly class, and online events carry "Online" in the distance slot with a plain "Hosted from X" place line. - Ended events drop the Share action and the Free chip (nothing left to act on or register for); "See nearby events" is now a flat Button (here and in DrawerErrorFallback). - Removed the Button atom's unused `light` variant. - EventView chip row wraps instead of scrolling; ActionRow centres while content fits (scroll + edge fade only on overflow); ActionRow stories rewritten to the house StoryWrapper/StorySection pattern. - RegionView: "All events are free" is the header-subtitle fallback (a city's own subtitle takes the slot) instead of a separate line. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Restore the authoritative session line (Next session · time · origin) in the panel facts; remove the duplicated timing line from EventHeader (the header is title + chips only now). - "About" → "About this class" across all 10 locales. - Fix the intermittent header close button: the vaul bottom sheet is draggable across its whole surface, so a tap with any micro-movement was swallowed as a drag — mark IconButton `data-vaul-no-drag` (covers close/list/filter). - "All events are free" subtitle fallback now shows only on RegionViews that actually list events (not parent/child-region-only views). - EventCard: drop the type label entirely; move the language/status chips to a bottom row so the title gets full width (line-clamp-2). - Online events use a screen icon (MonitorIcon), not the location pin, for their facts location line. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- New EventFacts molecule: the one calendar/location fact block used by
the panel, the list card, and the share/registration summaries — so
the four surfaces can't diverge. Ended events drop the location line.
- Timing composition (item 7): the time moves onto the pattern line
("Every Saturday · 9:00 AM – 11:00 AM"); the concrete next date drops
to a muted line below. Exposed as timingTitle/timingDetail on the hook.
- EventCard trials EventFacts in place of the old lines 2+3; the
Online/distance indicator moves to its own line just above the pills.
- ShareView/RegistrationView render title + EventFacts (dropping the
chip block that read as a card).
- "See nearby events" is full-width like Register; the EventView title
may wrap to 3 lines.
- Fix the Ladle dev-server "require_react is not a function" crash: give
Ladle its own optimizeDeps cacheDir so it and `pnpm dev` stop
clobbering each other's react/react-dom chunks under rolldown-vite.
Refs #52
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… fact - Summary gains a `compact` variant (tighter spacing, text-coloured icons sized to the text) — used by the list card via EventFacts. - EventCard: the Online/distance indicator sits inline (right) with the pills; a little vertical margin around the facts block. - EventFacts address is now plain text everywhere — the panel already auto-frames the map on the open event, so the re-frame click was a visible no-op, and facts should read as facts, not dead buttons (issue #52 grammar). Drops the onAddressClick prop + the map wiring. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Summary: SummaryItem is now { icon: FC<IconSvgProps>, text, subtext? }
— Summary owns icon sizing/colour per variant, and the optional faded
subtext replaces the ad-hoc muted <div>s in EventFacts.
- Drop the local-time-vs-your-time concept: the timing fact always shows
the event's own local time, unlabelled. Online events show a faded
viewer-local conversion under the hosted-from line instead.
- EventFacts compact (list card) drops the end time (start only).
- Split display.hosted_from into display.online ("Online") and
display.hosted_from ("Hosted from %{city}"), reusing the existing
details.* translations across all 10 locales.
- EventCard: drop the status chip (the facts carry status now); drop the
card border — the divider is drawn between cards by List (divide-y),
with RegionCard's border removed to match; the Online/distance
indicator sits inline with the language chip; a bit more room below the
facts.
- Remove the margin below the IP-geolocation nearby prompt.
Refs #52
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- New formatTimeRange (src/lib/time.ts, unit-tested): delegates to
Intl.formatRange so a shared meridiem collapses ("6 – 7 PM"), whole
hours drop ":00", and 24-hour locales render their own convention
("18–19 Uhr") instead of a hand-spliced en-US string.
- Online where line reads "Online • Hosted from <city>"; its faded
conversion carries the weekday ONLY when the viewer's day differs.
- Compact (card) facts drop the "Next session" line; "Started <date>"
is kept only for courses, where a run actually has a start.
- Distance moves out of the pill row into a faded subtext under the
address; the standalone Online/distance indicator is gone.
- Summary: compact icons fade to the subtext's weight, and an item with
no subtext centres its icon against the single line.
- Prune the now-unused your_time/local_time/origin_time keys (10 locales).
- Fix the invisible image carousel: the Swiper root sits in a flex row,
so without a width it collapsed to its content — which Swiper then
used to size the slides, yielding a 48px track. Also skip loop/
autoplay/pagination for a single image (Swiper's loop needs 2+).
Refs #52
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…dding - EventCard shows a type pill for anything that ISN'T the default weekly class (new isDefaultType on the display hook, so the derivation stays in one place). - The online where-conversion names the viewer's place — "4 PM in Riley Park" — from the IP guess. The lookup is gated on the event being online, so in-person lists never ping the third party, and it falls back to the bare time when the guess is unavailable. - Distance reads "3.6 km away"; the full "…from the searched location" stays as the accessible label. - "All events are free" no longer shows on SearchView (it remains the RegionView/OnlineView header subtitle). - Even margins around the card facts, with the freed space moved above the pill row. - MapSearch: the Geocoder always reserved ~40px for its action slot, but the only occupant is the Clear (×) button, which Mapbox hides while the field is empty. Reclaim that space for the placeholder via :placeholder-shown; typing restores it before the × appears. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…rdance
- Distance names the place it's measured from ("3.6 km from Brussels",
taking the leading part of the geocoder's `q`); "3.6 km away" is the
fallback when no place is known. The distance is from the SEARCH, not
the device, so "away" alone would quietly mislead.
- The viewer's place in an online time conversion now comes from their
own IANA timezone ("4 PM in Vancouver") instead of the IP guess, which
swung between a neighbourhood ("Riley Park") and a whole province.
Municipal by construction, matches the zone the conversion is computed
in, and drops the third-party lookup entirely.
- List dividers are inset to the cards' own px-6 (a ::before rule rather
than divide-y), so they stop short of the edges exactly as the per-card
border did while the hover background still bleeds full width.
- DrawerBody grows a soft inset top shadow once scrolled, so content
sliding under the header reads as continuing rather than blending.
- The registration/share event summary sits on a tinted rounded surface
at body size, so it reads as the object being acted on rather than a
second heading competing with the drawer title.
- Halve the margin above the card pills.
Refs #52
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nce rules
- The online time conversion goes back to IP geolocation, at REGION
level ("4 PM in British Columbia") — the lookup's `city` reports a
neighbourhood, which was the original complaint. `region` is optional
on the schema so a region-less response can't fail the parse and take
the nearby suggestion down with it.
- Skip that conversion entirely when the viewer shares the event's UTC
offset — it would only restate the time shown directly above it. New
sameWallClock() compares offsets rather than zone ids, so distinct
zones that agree right now (London/Lisbon in winter) also skip; unit
tested, since the seed has no online event in the local zone.
- Hide the card distance below 5km: everything in the searched town is
"close", so the line was noise on exactly the results that matter most.
Refs #52
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
SahajCloud now carries an event `website`, so the display resolver emits a `website` action whenever one is set and EventActions renders it as an external link behind a new globe icon. Keeping five actions on a single line without wrapping or scrolling drove the row rework: columns share the width equally (`flex-1 basis-0`), the row lost its gap, and the label dropped to 11px. Measured against the narrowest real panel (288px), that fits every label in all ten locales on one line except pt-BR "Compartilhar" and uk "Поділитися", which fall back to the two-line i18n budget. The URL is parsed through SafeUrlSchema, so a `javascript:`/`data:` value drops the field rather than reaching an href. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
"Joining details arrive after you register" left the delivery channel implicit; "Meeting link will be sent to you by email" says where to look. Adds the `actions.website` label across all ten locales. Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
SahajCloud added Hungarian and Dutch (SahajCloud#578); this is `pnpm types:cms` output only. Note the new event `website` field is not in the generated types yet — SahajCloud main hasn't been regenerated since it landed — though the live API serves it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Vite serves optimized deps as `immutable, max-age=1yr` under a `?v=` hash derived from config + lockfile rather than content, so the same URL can serve different bytes across re-optimizations. A browser that cached a bad chunk — as happened while Ladle and `pnpm dev` shared a cacheDir and clobbered each other's react/react-dom — pins it permanently: the page dies on "Invalid hook call" / duplicate React with nothing in the server log, and no server-side fix can evict it (deleting the cache re-optimizes to the same hash). Serving deps `no-cache` keeps revalidation cheap (304, not a re-download) while making the environment self-healing. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Found by a four-angle audit of the component tree. Each was typed and
documented as working, so none surfaced as a test or lint failure:
- Button's anchor arm never destructured `disabled`, so it fell into the
spread and landed inert on the <a>: `<Button disabled href=…>` typechecked
and shipped a fully clickable link. `disabled` is now omitted from that
arm, and `aria-busy` is set on both.
- globals.css is injected into the HOST document, but `main {}` and
`a { color: inherit !important }` were bare element selectors — they
repainted the host's <main> grey and hijacked every anchor on the page. We
render no <main>, and every <a> we render sets its own colour, so both are
removed (and Link's `!` overrides with them). Swiper's vars move off
`:root` onto `.swiper`.
- Checkbox drew a white checkmark on `bg-primary-9` while
`--primary-contrast` defaults to black, so a pale tenant palette rendered
an invisible check. The check colour now rides with the checked background
via `*-foreground`; Checkbox/Slider thumbs use `gray-1` over literal white.
- ErrorFallback typed `error: any` and dereferenced `.message` — a thrown
non-Error would render undefined or throw inside the error boundary's own
fallback. Narrowed to `unknown`.
- ActionCircle re-declared `onClick?: () => void` on top of HTMLAttributes;
the intersection left a signature no handler taking the event could
satisfy (no preventDefault possible). Dropped the redundant declaration.
- Chip/Alert typed `closeLabel` optional while documenting it as required,
so an unlabelled close button was one omission away. Both now model the
pair as a union the compiler enforces.
Alert additionally defaults to role="status" (assertive announcements are
now opt-in for genuine errors), swaps `hideIcon` for `icon={false}`, and
drops its hardcoded English "Close"/"Something went wrong" for `t()`.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The audit found a maintained API that nothing calls. Removing it: - `DropdownItem` had zero production consumers — the app's only real menu (SettingsMenu) is built on @radix-ui/react-dropdown-menu, so the repo kept two dropdown implementations and the atomic one was the dead half. Dropdown narrows to what its sole consumer (SearchFilters) actually uses: a portaled popover shell that takes its ARIA role from `role`. That also drops the controlled-open props and the ~30-line openOnFocus/closeOnBlur focus machinery, which existed for an autocomplete that no longer ships. - `src/config/site.ts` — 69 lines of Vite+NextUI starter boilerplate with no importers, shipping a stranger's Patreon/Discord/GitHub links in a public bundle. - Button's `isIconOnly` (the IconButton atom already covers it), plus `startContent`/`endContent` — NextUI-isms that children composition handles; none had a single caller, not even a story. - Link's `size` variant (never passed, and it had no defaultVariants entry so it emitted nothing) and the `anchorIcon` override. Its callers also passed isExternal + target + rel to say one thing; `isExternal` alone now does. - `EventsList` leaves the barrel: only DynamicEventsList (same file) renders it, so it follows the repo's own single-use-internals rule. MapSearch's props type is renamed to the conventional `MapSearchProps`, exported, and surfaced in the barrel alongside the component. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Each of these was copy-pasted chrome that had already drifted, so the extraction fixes a real inconsistency rather than just deduplicating: - `listRow` (List.tsx) — EventCard and RegionCard hand-maintained the same row class, and region rows had silently lost their `active:` press state, so they didn't respond to touch while event rows did. The divider inset lived in a third file, kept in sync by a comment; it now sits directly beside the gutter it must match (both stay literal — Tailwind's scanner can't see a class built from a constant). - `fieldChrome` (Select.tsx) — the same field chrome existed as three hand- copied strings that had drifted to three corner radii (rounded-none / rounded / rounded-md) on inputs that stack in one form, and the filter's date input had no focus ring at all. `isInvalid` is a variant now, so no caller re-implements the border ternary. - `DrawerTitle` (views/shared.tsx) — the title block was repeated verbatim in five views as a plain <div>, so screen-reader users had no heading to navigate drawer content by, and the weight had drifted from the event panel's. Now one real <h2>. - `usePopover` (hooks/) — Dropdown and EventActions' ActionPopover spelled out the same floating-ui stack; the latter's comment admitted as much. The hook shares the behaviour but not the markup, because the two anchor differently on purpose (a wrapper div vs a ref-forwarding button) and merging them would force a nested-interactive trigger on one. Registration inputs also gain `aria-invalid` + `aria-describedby` pointing at their error text, which was previously a red border and an unassociated sentence. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
a11y/i18n:
- CopyField's only success signal was a secondary-3 → secondary-5 tint: a
~1.15:1 shift that screen readers can't see and low-vision/monochrome
users won't perceive. It now confirms in an aria-live region, and its
aria-label (the one untranslated label in the tree) goes through t().
RTL — the widget already sets `dir` from the locale, so these were live gaps
the existing TODOs didn't cover:
- `RightArrowIcon` never mirrored, so the region drill-in chevron and both
SettingsMenu submenu indicators pointed the wrong way under RTL. Mirroring
is now a property of the icon (BaseIcon's `flipRtl`) rather than something
each call site must remember; DirectionsIcon moves onto it too.
- The settings cog and the desktop drawer panel were positioned with
`left-*`, including the md/lg offsets that clear the panel — so under RTL
the panel would flip while the cog stayed put, overlapping it. Both are
`start-*` now, which is identical in LTR.
BaseIcon also merges `className` instead of computing it before `{...props}`
overwrote it: any caller passing both onClick and className silently lost the
pointer affordance.
The Drawer RTL TODO is narrowed to what actually remains — vaul's own
physical `direction` prop, which drives the drag axis and can't be fixed by
inset classes.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
One concept had one name per component. Aligning them:
- `ariaLabel` vs `aria-label` were both live in the same tier. Components
extending DOM props must use `aria-label`, so that's the one that scales;
Select/Dropdown/ToggleGroup/DrawerContent follow it. Slider keeps a
distinct name (`thumbLabels`) because its value is `string | string[]`
fanned out per thumb — that was never a DOM aria-label.
- NearbyPrompt's `onDismiss` forwarded straight to Alert's `onClose`, and
its `onSelect` selects nothing — now `onClose` / `onAccept`.
- RegionCard's icon slot was `children`, whose position (before the label)
was load-bearing and unstated. Now a named `icon` prop, matching Summary,
Chip, Alert and ActionCircle.
- Drawer's `contained` + `full` were independent booleans with four
representable states and two real ones; DrawerStack only ever set both
together, and `full` was entirely `!important` overrides cancelling
`contained`. Collapsed to `mode: 'anchored' | 'filled'`.
Shared types where the shape was repeated:
- `EventSurfaceProps` — EventDetails, EventActions and EventRegisterBar all
declared `{ event, basePath }` separately, in the same folder, and are
always passed them together.
- lightbox re-declared ImageCarousel's `Slide` shape by hand, so adding a
field to Slide would leave the lightbox silently ignoring it.
Link now forwards a ref: it's used as a whole-card hit target in EventCard
and RegionCard and was the only atom rendering an interactive element a
caller couldn't reach.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Button and IconButton were the same thing: single-box inline controls that differed only in chrome and whether they carried a label. Merged into Button via `shape: rect | square | circle` — icon-only shapes take their width from the size scale, so a square control stays square at every size — plus a `ghost` variant, which is exactly what IconButton's look was. Per the repo's own rule against pass-through wrappers, IconButton is gone; its four call sites use the preset directly (the three drawer-header controls share a `HEADER_CONTROL` constant, so they provably render identical chrome). ActionCircle does NOT become a Button mode, and the reason is structural: its label sits inside the hit target, so the interactive element is the whole column and the tinted circle is an inner span. Button applies its surface to its own root, so one component couldn't serve both without its classes landing on different elements per mode — a discriminated union where half the props are invalid per branch. Instead the colour × variant × size matrix moves into an exported `controlSurface` recipe that both consume, which is what the request was actually after: `color`, `size` and `variant` now mean the same thing on every control, defined once. ActionCircle's `emphasized` boolean becomes `variant="solid"` — the same variant a Button takes. Also drops the circle's `dark:bg-primary-4` bump: the Radix dark palette already gives step 3 a visible tint (verified in both themes). `data-vaul-no-drag` now goes on every button rather than only the header icons. It's inert outside vaul and prevents the sheet swallowing taps that carry micro-movement, so applying it universally removes a footgun instead of leaving each new control to remember it. Stories cover the full matrix: ghost, all three shapes across sizes and colours, and the action circle's colour/variant/size axes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
`shape` conflated two orthogonal things: the corner radius and whether the control is icon-only (no horizontal padding, width squared against the size scale). That made radius unavailable to any button carrying a label — a pill was unreachable — and coupled a purely visual choice to a layout one. Now two independent props: - `radius: 'sm' | 'full'` applies to ANY button, using the same two values and the same meaning as the Chip atom, so the vocabulary is shared rather than per-component. `full` on a labelled button gives a pill; on an icon-only one, a circle. - `isIconOnly` drops the horizontal padding and squares the width. Output is unchanged for both former shapes, verified in the browser: icon-only buttons measure exactly 32/40/48px square at sm/md/lg with `padding: 0`, and the radius switches 4px ↔ 9999px. The action row's circles are still 48×48 and fully round. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Four design-system tweaks:
- Chip's `light` variant is renamed `ghost`, matching Button's `ghost`
(text-only, no surface) so the same treatment has one name across controls.
- The drawer content bands (header/body/footer) are capped at
`--sy-content-max` (default 32rem) and centred. On a wide surface — a
`map=false` embed or a large-mobile bottom sheet — the views now read as a
centred column instead of stretching edge to edge; a no-op on the ~22rem
anchored panel, which is already narrower.
- Select's listbox takes the trigger's width via `--radix-select-trigger-width`
(exposed by `position="popper"`) rather than sizing to its longest option.
- The Drawer story's "Filled (map-less)" example passed `container={null}`,
which sent the vaul portal to <body> so the panel filled the whole viewport
instead of demonstrating containment. It now hands the drawer its bounding
element, exactly as DrawerStack does. Verified in the browser: the panel fits
its box (not the viewport), the Select listbox measures 320px = the trigger,
and the body caps at 512px centred.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The story wrapped its subject in its own <MemoryRouter> to seed the filter query, but the Ladle decorator already provides one — react-router v7 throws "You cannot render a <Router> inside another <Router>", which blanked the story with an uncaught error (it must have been tolerated on an older version). It now seeds the query on the decorator's router via useSearchParams in an effect, so all six pills render. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Removes the opt-in consent checkbox from the registration form, and with it the plumbing that only that checkbox fed: the `subscribe` field on RegistrationSchema, the `subscribe` key in the register mutation payload, the schema test for it, and the `registration.mailing_list_consent` string across all ten locales. The form no longer collects or sends consent, so SahajCloud simply won't stamp `mailingListSubscribedAt`. The privacy note stays; `Controller` stays (the starting-date Select still uses it). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
EventActions consumes the display resolver (useEventDisplay) and composes
ActionRow / CopyField / Link — the same shape as EventFacts, which is already
a molecule. It owns no data or map lifecycle of its own, so it belongs in the
molecule tier; only its folder placement said otherwise.
It now defines its own `{ event, basePath }` props instead of importing
`EventSurfaceProps` from the EventDetails organism (a molecule importing a
type from an organism was the wrong dependency direction). The EventDetails
organism composes it from the molecule tier, as it does EventFacts.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Summary was a generic icon+text fact-list presenter with exactly one consumer — EventFacts — yet it was a public molecule (folder, story, barrel export, SummaryItem/SummaryProps types). A presenter/composer split is a fine pattern, but here the presenter was design-system surface nothing outside its one composer ever used. EventFacts now builds AND renders the facts: it keeps Summary's default/compact `tv()` recipe and item rendering, with the item shape a private `Fact` type. No behaviour change — the panel, list card, and share/registration summaries render identically (verified in Ladle). One fewer public molecule, one fewer indirection on the event surface's hot path. Adding an `event` prop to Summary was the alternative, but that pushes domain knowledge into a generic presenter — the wrong direction. Merging keeps the domain composition in the one component that owns it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ls driven
Each of the eight drawer screens (Countries, Region, Online, Event, Filter,
Search, Registration, Share) now has a co-located story in the new "Views"
title group. Per the request, view stories break the house one-page-of-cases
layout: they render a SINGLE example and expose a "case" select (Ladle
argTypes controls) to switch between the known states — minimal/maximal
data, online/ended/inactive/external events, empty results, and so on.
A shared ViewHarness (src/views/story-harness.tsx) makes data-connected views
previewable without a backend:
- seeds the exact query keys into an ISOLATED client (staleTime/gcTime
Infinity, no retry) so useSuspenseQuery resolves synchronously and nothing
pings the absent API or the third-party IP service (geojson + ip-location
are seeded for every view);
- provides the map-less contexts (NoopMapController, WidgetMode);
- stands in for the drawer panel with a bounded scroll box (views render
DrawerHeader/DrawerBody against the default DrawerContext).
Seeding the cache bypasses the fetchers' zod parse, so the new region/geojson
fixtures (src/mocks/regions.ts) only need to be TYPE-valid — tsc is the guard.
Verified in the browser: all eight render with zero console errors, and the
arg-case control switches states (e.g. Event View -> Ended).
DrawerStack is intentionally excluded — it's the URL-driven stack orchestrator,
not a screen previewable in isolation.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Story previews for every view, driven by a shared ViewHarness: - full-view filled-drawer layout at xsmall width; seed the client query; native Ladle "Brand palette" control (replacing a bespoke <select>) - per-view "Example" control with empty states + a shared event-variant gallery; drop "View" from story names - new examples: RegionView Country / minimal Parent, EventView Minimal, Registration Confirmation Supporting changes the previews surfaced: - RegionView: retire the mixed parent+events shape (leaf-or-parent) + empty state - MapSearch: contain the Mapbox web-component mount crash (Ladle iframe / CSP) behind a plain-input fallback - CountriesView: own the busiest-first sort (moved off getCountries) - fixtures: comprehensive EventSlim gallery; realistic same-day evening schedules; minimal/country fixtures Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
11 tasks
…item renames Functional fixes: - Inactive events show only the municipality (no street) and drop the Directions action — a dormant venue has no precise location to route to. - OnlineView drops the always-on "free" note; "All classes are free" is now only a subtitle fallback for a region with no name. - ShareView's details card width now matches the share block (max-w-md). Design system: - EventFacts gains a `card` variant (a title over the facts on a boxed surface); EventSummary is now a thin wrapper over it that adds only the embed "on Sahaj Atlas" backlink. - Rename EventCard -> EventListItem and RegionCard -> ListItem (folders, exports, `*Props` types, imports, story names, docs). Stories: - Seed a passive IP guess so the nearby prompt renders on the views that support it (Countries / Region / Search). - RegistrationView drops the "Online" example (it demoed EventFacts, not the view); EventFacts stories show the new `card` variant. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A terminal (inactive / ended / closed) event in external-registration mode was routed to EventRegisterBar, which renders nothing for a non-registerable event — so a deep-linked `/register` for such an event showed the summary then an empty box. Gate the external branch on the event being registerable (`!blockedMessage`) so terminal states fall through to their "contact for timings" / closed message. Found in the /finalize-pr code-review pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…comment - ics.ts: `weekNumber === '-1' ? '-1' : weekNumber` always equals `weekNumber` (it's already narrowed truthy) — collapse it. - event.ts: the withEndTime doc said an end "at-or-before" the start rolls to the next day, but the code (`end >= start`) keeps an end EQUAL to the start same-day (a zero-length occurrence). Reword the comment to match. Found in the /finalize-pr code-review pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… Summary row - EventFacts gained a `card` variant (the boxed details card wrapped by `EventSummary`); note it + drop the stale `variant="compact"`-only description. - Remove the `Summary/` row — Summary was folded into EventFacts on this branch. - EventListItem: "row in an event list" (post EventCard→EventListItem rename). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Deploying sahajatlas-design with
|
| Latest commit: |
c82046c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d47ffd29.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://feat-event-surfaces-redesign.sahajatlas-design.pages.dev |
This was referenced Jul 20, 2026
Closed
…vents Reverts the leaf-or-parent retirement from earlier in this branch. A region can legitimately hold BOTH child regions (venues/centres within a city) AND its own free-floating events (an event pinned to the region rather than to a venue), so both must render together. RegionView again lists the online roll-up card (when sub-regions roll one up), the sub-region cards, and the region's own located events in one list; the mocks + RegionView story are restored to a "Mixed" example demonstrating exactly that. Addresses PR #58 review finding #1 (the retirement orphaned region-level events) by keeping the mixed shape rather than reshaping the data layer. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Reconcile with two PRs that landed on main during this branch's Adjust phase: - #63 refactor(registration): align questions payload with EVENT_REGISTRATION_QUESTIONS — took its tightened `questions` typing (`z.record(RegistrationQuestionNameSchema, z.string())`) and the `RegistrationQuestionName[]` prop narrowing on RegistrationForm/RegistrationView, and took its fresh SahajCloud-main `payload-types.ts` resync over this branch's local-seed sync. Kept this branch's removal of the mailing-list `subscribe` field (1f0b768) — dropped #63's adjacent re-introduction of it. Updated the RegistrationForm "With questions" story to pass CMS question keys (referralSource, priorExperience) instead of free-text labels. - #59 docs(skills): workflow parity — merged cleanly with this branch's renamed molecules list in CLAUDE.md. Lean gate green after merge: lint + typecheck + 309 unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ezone (#66) Closes #64 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
) Closes #65 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Ardnived
added a commit
that referenced
this pull request
Jul 21, 2026
Reconcile #61 (region-aware share) with #58 (event-surfaces redesign), now on main. Conflict resolutions: - ShareContent.tsx: keep #58's exported i18n/a11y CopyField + #61's region grid and native Web Share body (drops the old socials row, which #58 left untouched and #61 replaces). - ShareContent.test.tsx: keep #61's region/native/raw-URL SSR tests (the old encodeURIComponent socials assertions no longer apply). - ShareView / RegistrationView: keep #58's EventSummary header + registration gating; add #61's useViewerCountry + country prop. Both sides already converge on `event.webUrl ?? window.location.href`. - public/locales/*/common.json: union of share.{copy_link,copied} (#58) + share.{share_on,native} (#61). - DESIGN_SYSTEM.md: #58's reorganized molecules table with #61's ShareContent description (region-ordered react-share + native Web Share fallback). - Button API: #58 dropped startContent, so the native-share icon renders as a child of Button. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Ardnived
added a commit
that referenced
this pull request
Jul 25, 2026
…surfaces, i18n & nav (#74) * fix(list): left-align event cards + suppress host-page list markers Two visual regressions from the event-surfaces merge (#58): - The Link atom's inline-link `items-center` survived the class merge into EventListItem's flex-col card, centering every line of content. listRow now carries `items-stretch` (column cards left-align; ListItem's explicit `items-center` still wins the merge for row cards). - The <li> wrappers (#65) exposed cards to host typography: the widget's CSS is injected into the host document, where a bare `li { list-style: disc }` beats preflight's inherited reset and paints a bullet next to every card. The List <ul> now sets explicit list-none/m-0/p-0 plus [&>li]:list-none on the wrappers. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(button): pin icon-only buttons square under flex compression The EventView close button sits in a flex header row beside the title; a long title squashed it below its w-8 (flex items default to shrink:1 even with a fixed width), so the hover surface rendered as a pinched rectangle instead of a square. Icon-only buttons are definitionally fixed squares — the isIconOnly variant now carries shrink-0, covering every header control (close, collapse, filter, share circles) at the atom. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(region): add a search shortcut to the RegionView header A search icon button sits immediately left of the close button in the RegionView header, grouped in a flex container so the header's justify-between keeps the title left and the two controls adjacent (gap-2, matching the header slot's own control spacing) instead of spreading all three apart. Clicking it jumps to the distance-ranked SearchView via searchPath(). The reusable SearchButton lives in views/shared alongside CloseButton / FilterButton and reuses the shared HEADER_CONTROL preset, so the header reads as one set of buttons. Its aria-label uses common:search, which existed only in en — now added across all 10 locales (each value derived from that locale's existing search_placeholder verb). Verified in-browser (/brazil): the control renders as a 32x32 square immediately left of close and navigates to /search. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(i18n): localize header control labels across all locales The drawer/chrome header controls read their aria-labels from common.json keys that existed only in en — back, close, explore, and settings were all 1/10 locales, so every non-English header control silently fell back to the English label (Close, Back, Settings, Explore) for screen-reader users. Added all four across the nine missing locales (cs, de, es, fr, hu, nl, pt-BR, ru, uk) via pnpm i18n:add, deriving each value from the locale's own sibling strings. This matches the just-added `search` label so the whole header-control set is now consistently localized (filters.title already was). Verified in-browser at ?locale=fr: back→Retour, settings→Paramètres, close→Fermer, search→Rechercher, filters→Filtres all render translated. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(nav): SearchButton navigates via useAtlasNavigate The origin/main merge (history-aware nav) moved shared.tsx's header navigations onto the useAtlasNavigate() seam and dropped the raw useNavigate import — but this branch's SearchButton, added before the merge, still called useNavigate(). Git merged both sides cleanly, leaving useNavigate referenced but unimported: navigating into a region threw "useNavigate is not defined". Switch SearchButton to useAtlasNavigate() (already imported), matching FilterButton/SearchField — which also correctly stamps history depth + camera for the header CTA push. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(region): uppercase the ISO country code so names resolve After the CMS slugs were migrated to ISO codes (SahajCloud#556), country slugs are lowercase (`gb`, `de`). isoCountryCode passed them through as-is, but Intl.DisplayNames({ type: 'region' }) is case-sensitive: `.of('gb')` echoes back "gb" (fallback:'code') while `.of('GB')` resolves "United Kingdom". So CountriesView/RegionView/OnlineView rendered the bare code instead of the country name. Normalize the derived code to UPPERCASE at the source (isoCountryCode), the canonical form the mocks already use; the flag call site lowercases it again. Fixes the name display across all three views in one place. The existing post-#556 test asserted the lowercase passthrough — corrected to assert `DE` and that the name actually resolves to "Germany". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(nearby): only the × persists a dismissal, not accepting The IP-geolocation suggestion persisted a session dismissal both when the × was pressed AND when it was accepted (zoom to the guess). So once you followed it, it never came back. Accepting now only navigates: the new ?center/?q makes hasActivePlaceSearch suppress the prompt while you're viewing that area, and it returns once you leave — so it keeps offering until you actually dismiss it with the ×. The × still persists (markNearbyDismissed) as before. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(carousel): full-bleed slides + native Swiper pagination bullets - Full width: drop the slides' p-6 and break the carousel out of EventDetails' px-6 with -mx-6, so the event image spans the drawer width. Square corners (no rounded-lg) for the full-bleed edge-to-edge look. - Pagination: drop the custom 80px-bar dynamic bullets (dynamicBullets + the --swiper-pagination-bullet-* size overrides in globals.css) for Swiper's built-in clickable round bullets — pagination={{ clickable: true }} plus the default bullet styling. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(chip): fold emphasis into a subtle variant The Chip's content weight was a separate `emphasis` prop (solid/subtle) that no component ever set — every chip rendered at the default solid weight. Drop it and add `subtle` as a third `variant` alongside flat/ghost: it carries the same soft tint as `flat` but a lighter (font-medium) content weight. flat and ghost keep font-bold, so no existing chip changes. Story grid gains a subtle column; the standalone Emphasis section is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style(event): add breathing room around EventFacts in the panel The when/where facts sat flush against the header chips above and the Register CTA below (just the container's gap-4). Add my-2 so the facts block reads as its own band in the event panel. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(stories): drop the ShareContent Playground story The Default story's "Region ordering" section already renders the grid for every notable region, so the interactive country-picker Playground was redundant. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(registration): radio-list date picker + free note, drop the Free chip - Starting date is now a radio list of the next 3 occurrences with a "show more dates" link for the rest, replacing the Select dropdown — the common choice (the next session) is one tap with the near options visible at a glance. Native radios styled to match the form's field chrome; the ISO string ↔ Date coercion seam is unchanged. - Drop the "Free" chip from the event header (every event is free, so the pill was noise on every card) and surface it instead as the RegistrationView header subtitle. Locale strings updated: add registration.free_note + registration.show_more_dates across all 10 locales, remove the now-orphaned display.chip_free. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(atoms): add a reusable RadioGroup A controlled radio list rendered as selectable cards (native radios, not a Radix primitive), with an optional `collapseAfter` that hides the tail behind a reveal link. Extracted from the registration date picker so the pattern is reusable; domain formatting (dates, counts) stays in callers via `label`. Ladle story + unit tests for the collapse behaviour included. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(registration): frequency-aware date labels + "All classes are free" - The starting-date picker now labels occurrences in the class's own cadence: weekly reads "Next week / In 2 weeks", daily "Today / Tomorrow / In 2 days", monthly "This month / Next month / …" — via Luxon toRelativeCalendar with a unit derived from event.schedule.recurrenceType, replacing the auto unit that drifted ("in 6 days" then "next month"). Rendered through the new RadioGroup atom. - Consolidate the "free" copy: reuse the existing display.all_events_free key (fully localized, 10/10) for the RegistrationView subtitle and reword it to "All classes are free" everywhere; point OnlineView at it too and drop the now-redundant display.all_classes_free (en-only) + registration.free_note. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor: simplify per /simplify pass - RegistrationForm: memoize the starting-date options so the Luxon/Intl formatting isn't rebuilt on unrelated form re-renders. - RadioGroup: join the group className with clsx instead of a hand-rolled ternary. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: add the RadioGroup atom to the design system Record the new RadioGroup atom in the DESIGN_SYSTEM.md atom table and the components rule's "check these first" list. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(event): consolidate the event chips into a shared EventChips molecule Replace the hand-rolled Chip rows on EventListItem and the event header with one EventChips molecule (type · language(s) · Today) so the two surfaces can't drift. All flat; type is primary, language(s) secondary, "Today" danger: - default (event header): the type + every language folded into one chip, plus a "Today" chip when the next session is today. - concise (list card): drops the plain weekly-class type and the viewer's own language; combines the remaining languages into one chip. Adds a `danger` colour to the Chip atom for the Today chip. EventListItem now reads online-ness from the pure isOnline() rather than a second useEventDisplay call. (The header's old online / Full / Ended / Starts chips are dropped — that state still shows in the facts + register bar.) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(event): move the image carousel below the description The event images now sit at the bottom of the panel, after the About prose, rather than between the secondary actions and the description. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(theme): add a contrast brand role + retheme the default palette - A third themeable brand role `contrast` (default orange #e08e79) alongside primary/secondary, wired through PaletteRoles / applyPalette / globals.css / tailwind. `neutral` is the gray ramp; `danger` (red) stays a FIXED error color. - Retheme the built-in default palette: primary #1E6C71 (teal), secondary #A1C3D7 (blue), contrast #e08e79. The globals.css ramps are regenerated from DEFAULT_SEEDS via buildScale (the palette.defaults gate verifies the match). - Rename the per-role on-color var --{role}-contrast → --{role}-on to free the `contrast` name; the Tailwind-facing `foreground` key is unchanged. - No client-record slot maps to contrast yet (color1-3 → primary/secondary/ background), so it's per-embed-overridable and falls back to the default ramp. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(components): standardize colors to primary/secondary/contrast/neutral Rename the component color options: `default` → `neutral` everywhere; the one non-error `danger` accent (the EventChips "Today" chip) → `contrast`. Remove the unused `danger` option from Button/Chip/Link; keep it on Alert (error banners) and as raw error classes (invalid fields, form error text). Add the missing `contrast` variant to Chip/Alert/Button/Checkbox/Spinner and secondary+contrast to Link, so every colour-bearing component carries the standard set. Button + Checkbox `solid`/checked backgrounds darken to step 12 with white text in light mode (so a pale brand seed still reads), keeping the ramp's light solid + adaptive on-color in dark mode. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style(nearby): tint the nearby-suggestion prompt with the secondary color The IP-geolocation "events near you" Alert now uses `color="secondary"` instead of primary. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(theme): wire contrast from the tenant color3, drop background theming The client record's color3 now themes the `contrast` role (was background), so all three brand roles come from the tenant. Background is no longer wired — it uses the fixed globals.css default on every component: the widget's `background-color` embed attribute is removed and BrandTheme stops mapping color3 to background. (The engine's applyPalette still accepts a background seed, but nothing feeds it now.) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(components): story & component polish batch - List cards: wrap standalone EventListItem/ListItem story items in <List> so the host page's <li> markers no longer render - EventChips: rename `concise` variant -> `compact`; story now lists each sample on its own line under separate Default/Compact sections - Alert/Button: drop the unused `faded` variant (and its story columns) - EventPinPopover: move organism -> molecule; split out a map-free EventPinCard that stacks recurrence above start time (compact); story shows the card standalone, then the popover in context on a live map - EventsList: split the network-bound DynamicEventsList into its own module so the presentational list (and its story) no longer pull in the api/i18n graph - Mapbox: combine Map + MapSearch stories into one Mapbox.stories with a "sourced from Mapbox" note - RegionView story: reorder to Country (default) / City / City with Centers (London + SY Centers "44 Chelsham Rd", "Flood Street") / Empty - Spinner story: render the Colour x Size matrix as a grid Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(components): story polish + component moves batch - Icons story: add an "In Context" colour-inheritance section (icons take currentColor across primary/secondary/contrast/neutral) - Checkbox story: (Switch × Checkbox) × colour grid with a disabled row (the contrast colour was already wired on the control) - Chip story: every section now exercises all four colours - ActionRow story: lead with the colour × variant grid (colour rows, variant columns; primary->secondary->contrast->neutral, solid->flat->bordered->ghost) - EventPinPopover: inline into Map.tsx (it's genuinely map-bound via <Popup>) and drop the molecules folder / story / barrel export - RegionView mocks: "City with Centers" is now a mixed view (centres AND its own located events); "City" shows a much denser event roster - Rename NearbyPrompt -> GeolocationPrompt (component, props type, folder, story, test, barrel, consumer); the lib helpers (shouldShowNearbyPrompt / NearbyPromptState) keep the feature name Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(filters): time-of-day period toggles; palette swap; bordered + rename cleanups - Time-of-day filter: replace the two-handle slider with a Morning / Afternoon / Evening / Night multi-select toggle group. New TimePeriod model + TIME_PERIOD_HOURS (night wraps midnight); matchesFilters tests an occurrence's start hour against the selected periods; the filter form shows the covered times below the toggles, and the active-filter pill shows the times (not the period names). A whole-day selection reads as "any time". Added filters.time.{morning,afternoon,evening,night} across all 10 locales; URL codec + query key updated (parsePeriods). - Default palette: swap primary <-> secondary (primary is now the soft blue, secondary the SY teal) in DEFAULT_SEEDS + the frozen globals.css ramps; palette.defaults gate stays green. - EventActions: drop the emphasizeContact display flag; every ActionCircle now uses the `bordered` variant. - Thicken the `bordered` outline to 2px on the shared controlSurface (Button + ActionCircle) and on Alert. - Rename the geolocation feature-logic: src/lib/nearby.ts -> geolocation.ts, shouldShowNearbyPrompt / NearbyPromptState / read|markNearbyDismissed / NEARBY_DISMISS_KEY -> geolocation-named, and the NearbySuggestion wrapper -> GeolocationSuggestion (the proximity helpers NEARBY_MAX_KM / hasClassWithin / isLocalRegion keep their distance-semantics names). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(button): icon-only variants grid; bordered border matches icon; revert palette + Alert border - Button story: add a second colour × variant grid rendered as icon-only circles - Bordered controls: the border now uses the icon/text step (primary-11 … / gray-12) instead of the lighter -7 tint, so the outline matches the glyph (Button + ActionCircle, via the shared controlSurface) - Revert the default palette swap: primary is the SY teal again, secondary the soft blue (DEFAULT_SEEDS + the frozen globals.css ramps) - Alert `bordered` border weight back to 1px (border, not border-2) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(button): 1px border on labelled bordered buttons, keep 2px on icon-only The `bordered` variant is back to a hairline `border` (1px); an added `isIconOnly + bordered` compound restores the 2px outline only for icon-only circles, where a 1px ring reads as an artifact. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Use 1.5 border for bordered icon buttons * refactor: simplify per /simplify pass - EventPinCard (Map.tsx) shares composeCalendarLine's recurrence/hasNext gating via a new calendarLineParts helper, restoring the #72 no-drift contract the inline-into-Map change had forked - Button: correct the icon-only bordered comment (1.5px, not 2px) - Remove the dead filters.time.start/end locale keys (slider thumb labels) from all 10 locales Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(story): correct Link contrast example label (was "Danger") A leftover from the color refactor — the `color="contrast"` Link still displayed "Danger". Story-only label fix. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: sync mapbox + design-system for popover inline, filter + renames - .claude/rules/mapbox.md: EventPinPopover/EventPinCard are now inlined in Map.tsx (map-bound); the card stacks the parts and shares the calendarLineParts gate with the list card's composeCalendarLine (#72) - DESIGN_SYSTEM.md: Slider no longer backs the time filter (period toggles now); ToggleGroup also drives time-of-day; add the EventChips molecule row; NearbyPrompt -> GeolocationPrompt and NearbySuggestion -> GeolocationSuggestion Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Aug 7, 2026
4 tasks done
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
Redesigns every event display surface — panel (desktop + mobile drawer), list card, registration/share headers (native +
map="false"embed) — around one shared display resolver, adds an Add-to-Calendar export, and lands the WS8/WS9 groundwork (RTL logical properties + ~45 new keys across all 10 locales). Implements all 9 workstreams of #52.Since it was opened, the branch also converged the design system behind these surfaces and gave every screen an isolated Ladle preview:
EventActionsmoved to molecules; the oldSummarymolecule folded intoEventFacts, which gained a boxedvariant="card"+ anEventSummarywrapper for the share/registration details card; region/event rows renamed toListItem/EventListItem; four duplicated recipes extracted; dead component surface deleted.ViewHarness— seeds the exact query keys, renders a full-view filled drawer atxsmallwidth, a native Ladle "Brand palette" control, a per-view "Example" control + empty states + a shared event-variant gallery, and a seeded IP guess so the nearby prompt renders where supported.RegionViewkeeps the mixed shape — child-region cards and the region's own free-floating events render together in one list (a city can hold both venues/centres and events pinned to the city itself, led by an "Online Classes" roll-up); inactive events show only a municipality (no street) and drop Directions;MapSearchcontains the geocoder web-component's iframe/CSP mount crash behind a plain-input fallback;CountriesViewowns its busiest-first sort;OnlineView/ShareView/registration-confirmation polish.Core #52 surfaces:
resolveEventDisplay+useEventDisplayare the single source of type/status/register-state/microcopy/time strings; every surface (cards, panel, form/share, JSON-LD, ICS) reads from them. Unit tests assert every row of the issue's status table, external-mode invariance, today-rollover (at end time), and the weekday-in-display-zone rule — fixing the live bug where a Prague Wednesday class rendered "Every Thursday" for a Sydney viewer.ActionRow; contact =tel:on touch / number+copy popover on desktop; add-to-calendar = Google link +.ics). The mobile sheet's 80px peek carries title+chips+timing, and Register pins to the viewport edge from half-snap up.startingAtto the first session.EventScheduleSchema/selects extended with the structured recurrence fields +inactive;onlineUrldropped end-to-end (join link delivered CMS-side post-registration).Verification
pnpm lint) · Types: ✓ (pnpm typecheck) · Tests: ✓ 309 unit tests (pnpm test:run)pnpm build) · Ladle: ✓ (pnpm ladle:build) — CI runs all five on the PR.xsmall— nearby prompt, empty states, EventFactscardvariant, inactive municipality-only + no-Directions, the geocoder fallback, and CountriesView's busiest-first sort.Notes for reviewer
event_full,contact_to_join_full,chip_full) is draft — flag for product review. ICS imports were RFC-verified by unit tests; a hand-import into Google/Apple Calendar is worth doing before release. Translations are best-effort drafts for 9 locales (translators follow up per WS9).Finalize review (this batch)
/registershowed an empty box → now shows its state message; a redundant rrule ternary; awithEndTimecomment that overstated the roll-to-next-day rule. Reverted after review: the review flaggedRegionViewno longer rendering a parent's own directly-located events. That leaf-or-parent shape was reverted in this batch — the mixed list is restored, since a city needs to show both its venues/centres and its free-floating events. Dismissed with reasons: onlinewhereSubtextlabelling the converted time with the IP region while the clock uses the OS zone (pre-existing best-effort label → follow-up Online event time-conversion label names a place from IP but clocks it from the OS timezone #64); "Online" showing as both a chip and the where-line prefix on the panel (pre-existing; a design call);<ul> > <a> > <li>list nesting (pre-existing a11y, carried byte-identical through the row rename → follow-up Event list-row a11y nesting + share-link param encoding cleanups #65);usesMilesexport (it has adistance.test.tsconsumer).websiteURL goes throughSafeUrlSchema, the CMS-description DOMPurify path is intact, the IP lookup is a keyless non-SahajCloudfetch(no API-key leak), the one added dep is a dev-only Prettier plugin, and the Ladleserver.*config can't reach the shipped bundle. One pre-existing, out-of-scope nit:ShareContentusesencodeURI(notencodeURIComponent) for share params — not exploitable (the outer schemes are fixed)./simplifypass wasn't feasible, so its reuse/simplification/efficiency concerns were folded into the code-review.origin/main(it advanced during the Adjust phase): reconciled refactor(registration): align questions payload with EVENT_REGISTRATION_QUESTIONS #63 (registration-questions payload) — kept its tightenedRegistrationQuestionNametyping + fresh SahajCloud-mainpayload-types.tsresync, kept this branch's mailing-listsubscriberemoval, retyped the "With questions" story to CMS keys — and docs(skills): workflow parity — plan gate, --no-worktree, parity spec #59 (workflow docs). Lean gate + full CI green on the merged head.Closes #52
🤖 Generated with Claude Code