Repository navigation
Conversation
Deploying syatlas with
|
| Latest commit: |
3dcc37a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6c1c297e.syatlas.pages.dev |
| Branch Preview URL: | https://accent.syatlas.pages.dev |
Ardnived
added a commit
that referenced
this pull request
Jul 20, 2026
…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]>
Ardnived
added a commit
that referenced
this pull request
Jul 21, 2026
* chore(types): sync payload contract from SahajCloud main Refs #52 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(types): structured recurrence + inactive on event schemas; drop 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]> * feat(i18n): event display/action/recurrence keys across all 10 locales 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]> * feat(lib): calendar export, distance formatter, display formatting hook - 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]> * feat(event-panel): redesigned panel — facts, single Register CTA, action 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]> * feat(cards): three-line event card + retire the legacy row components 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]> * feat(embed): resolver summaries on form/share, deep-link gating, basePath - 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]> * feat(rtl+seo): logical utilities sweep, direction TODOs, resolver JSON-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]> * fix(event-panel): dedupe the ended message; document embed sizing 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]> * refactor: simplify per /simplify pass - 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]> * fix: harden per code/security review (ICS, boot, gating, a11y) 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]> * refactor(event-surfaces): design adjustments from review - 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]> * refactor(event-surfaces): second round of design adjustments - 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]> * refactor(event-surfaces): shared EventFacts + third round of adjustments - 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]> * refactor(event-surfaces): compact Summary + card polish; address is a 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]> * refactor(event-surfaces): summary interface + timezone/card polish - 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]> * refactor(event-surfaces): concise localized times + facts/card polish - 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]> * refactor(event-surfaces): type pill, named time conversion, search padding - 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]> * refactor(event-surfaces): named distance, inset dividers, scroll affordance - 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]> * refactor(event-surfaces): region-level conversion, redundancy + distance 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]> * feat(event): add a website action to the event action row 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]> * i18n(event): state the meeting link arrives by email "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]> * chore(types): resync CMS types for the hu + nl locales 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]> * fix(ladle): stop the dev server pinning poisoned dep chunks 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]> * fix(design-system): close six latent component bugs 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]> * refactor(design-system): delete dead component surface 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]> * refactor(design-system): extract the four duplicated recipes 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]> * fix(a11y,rtl): announce copy success, mirror icons, flip the cog 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]> * refactor(design-system): converge the component API surface 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]> * test(stories): correct two misleading stories, cover the missing states Two stories documented behaviour the components no longer have — worse than no story, because they assert the opposite of what ships: - EventCard's "Distances" rendered 0.4km and 3.6km, both under the MIN_DISTANCE_KM=5 suppression added earlier in this branch, so two of three cards showed no distance at all — under a caption describing the right-aligned layout that the same branch replaced with faded subtext. - ActionRow's "Overflow" promised horizontal scrolling with an edge fade; the row hasn't scrolled since it was reworked to keep every action on one line. Renamed to "Narrow container" and re-captioned to what it shows. Newly covered, in rough order of how much risk they carried: - RegistrationForm's custom questions (both existing stories passed `[]`, so the question rendering had never been previewed) and its validation state. - The external registration CTA, which the form story faked with a hand-rolled Button; EventDetails now renders the real component, plus the `registerInline={false}` footer arrangement. - Select's `isInvalid` — the registration form's error affordance — with disabled and placeholder-empty beside it. - EventFacts' `compact` variant and `distance` prop, i.e. exactly what every result card uses; all four existing sections rendered the default. - SettingsMenu, the only component with no story at all. - Drawer's `mode="filled"` map-less layout, and the story now uses the StoryWrapper/StorySection helpers it was the last file to skip. Also normalizes the 5 story exports that deviated from `Default` and the two unspaced storyNames. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs: correct the design-system docs to the shipped system The docs are what humans and agents consult before adding a component, so drift here manufactures the inconsistency it was supposed to prevent. Three classes of error: 1. NextUI. It was fully removed in favour of Radix + tailwind-variants, but CLAUDE.md, DESIGN_SYSTEM.md and .claude/rules/components.md all still told the reader to "prefer NextUI v2 built-ins" for a package that isn't a dependency. The component rule now names the real order: existing atoms → Radix primitive → write something new. In-code comments claiming NextUI drives the theme/tokens/overlays are corrected too (the "replacing NextUI's X" provenance notes are kept — they're history, not instructions). 2. DESIGN_SYSTEM.md's classification tables were ~45% wrong: 5 documented components (Toolbar, DetailRow, EventTime, EventSoon, Panel) and a src/layouts/ directory that don't exist, while 14 that do — including 6 atoms and most of the molecules from this branch — were absent. Both tables are regenerated from the tree, the Template tier is replaced by the View tier that actually exists, and the barrel-exception list matches the barrels. 3. STORYBOOK.md documented `<StorySection theme="dark">` — a prop that doesn't exist, so following the doc was a type error — and claimed the canvas is "always light" when the decorator wires Ladle's toggle to it. README.md was still the unmodified Vite+NextUI starter template: it described a different project, linked to nextui-org/vite-template, and told contributors to run `npm install`, which a repo hook blocks. Rewritten for this project. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * build: sort Tailwind classes automatically, fix two invalid utilities `prettier-plugin-tailwindcss` now sorts every class list into the canonical order, including inside `tv()` and `clsx()` calls. This is the process fix behind this whole cleanup: three of the duplicated-chrome findings (the list row, the field chrome, the drawer title) had drifted apart precisely because an unsorted class string makes a real change and a reshuffle look identical in review. With the order fixed, a class diff means something. Pinned to 0.6.x — 0.8.x targets Tailwind v4 and throws `e.charAt is not a function` on our v3 setup. Two utilities the sorter's ordering brought to the surface: - `border-3` (Map's debug overlay) isn't a real class — Tailwind's borderWidth scale is 0/2/4/8 and the config doesn't extend it, so the box has been rendering a 1px border, not 3px. Now `border-4`, on `danger-9` rather than the raw `red-700`. - The filter-count badge's `text-[10px]` was the smallest text in the app and below a comfortable floor for a numeric indicator; it joins the scale at `text-xs`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(design-system): name the last three inline prop types ImageCarousel, SettingsMenu and Lightbox declared their props as inline anonymous object types, so a consumer couldn't type a wrapper around them. Each now exports the conventional `<Component>Props`, surfaced through its folder barrel and the tier barrel. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(design-system): one region card, one gutter, clock-relative fixtures Three related cleanups: - OnlineClassesCard was RegionCard plus a monitor icon, so it existed only to hold a label and an icon. Folded into RegionCard, which now owns a fixed icon slot: the slot sizes and spaces the glyph so every row aligns, and callers pass the bare glyph instead of hand-tuning `me-3 h-7 w-7` (the flag) or `me-3 shrink-0 text-2xl` (the monitor) at each site. The story gains the CountriesView case it was missing — flags, the online entry, and a row with no glyph at all. - The list rows and the event panel now share a 24px gutter. Scrolling from a country list into an event used to shift the text edge 24px → 16px → 32px (the panel was `px-4 md:px-8`); the header and nearby prompt keep their own 16px, which reads as a distinct surface rather than drift. - Fixture dates are computed from the clock instead of pinned to 2033. Pinned dates forced a choice between rotting (a near date silently becomes a past event) and state-poverty (a far-future date makes `now < firstStart` always true, so `running` and `today` — both of which render distinct chips — were unreachable in every story). Deriving from `now` gives the intended state indefinitely without threading a fake clock through the components, and the weekday/title derive from the computed date so the fixture stays self-consistent. One fixture per resolver status now lives in the mocks rather than being re-arranged by hand in the story. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(design-system): one control component on one shared surface 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]> * refactor(button): split shape into radius + isIconOnly `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]> * feat(ui): constrain view width, match Select dropdown, tidy two atoms 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]> * fix(stories): stop ActiveFilterPills nesting a second Router 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]> * feat(registration): remove the mailing-list consent checkbox 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]> * refactor(design-system): move EventActions to molecules 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]> * refactor(design-system): fold Summary into EventFacts 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]> * test(views): add a story per view under a "Views" group, Ladle-controls 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]> * test(views): flesh out view-story previews + supporting fixes 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]> * refactor(events): event-surface fixes, EventFacts card variant, list-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]> * fix(registration): show the state message for a blocked external event 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]> * refactor(lib): drop a redundant rrule ternary, correct a withEndTime 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]> * docs(design-system): sync EventFacts card variant, drop the folded-in 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]> * fix(region): restore the mixed list — child regions + free-floating events 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]> * fix(event): reconcile online time-conversion label against the IP timezone (#66) Closes #64 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(event): valid list-row nesting + component-encoded share params (#67) Closes #65 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
Ardnived
added a commit
that referenced
this pull request
Aug 8, 2026
Closes release-readiness blocker #1. The report-issue form validated, passed a real Turnstile challenge, then window.alert'd the payload and showed a 'sent' confirmation — while ERROR_POLICY routes viewers to that CTA as the last resort on server/config/unknown failures. It now POSTs to SahajCloud's captcha-gated /api/contact-admin (sydevs/SahajCloud#602, closed 2026-08-04) through the existing requestJson helper over sdk.request, so it inherits the shared client's auth header, locale param, non-2xx throw and null-body guard. The endpoint answers 502 rather than a false 200 when the mail fails, so a resolved promise is the only thing that means delivered and the thank-you screen derives from nothing else. Contract read from SahajCloud's merged source rather than the issue, and confirmed deployed. Response types are synced, not hand-written: types:cms gained a curl for the root endpoints file. Both reviews caught a blocking bug: React Query's default networkMode PAUSES an offline mutation — no request, no onError — so on the one form that exists because something already failed, the honest failure state was unreachable and the paused mutation would resume later and double-send. Fixed with networkMode: 'always'. Closes #103 Closes #80
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.
Translation files have been updated, feel free to merge this pull request after review.