Skip to content

feat(calendar): full-width CalendarView, region combobox + input error-state refresh - #78

Merged
Ardnived merged 56 commits into
mainfrom
feat/calendar-view
Jul 29, 2026
Merged

Ardnived merged 56 commits into
mainfrom
feat/calendar-view

Conversation

@Ardnived

@Ardnived Ardnived commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Full-width CalendarView (Schedule-X month/week/list) with our own header driven through the calendar-controls plugin — view picker, prev/next + native date picker, filter button, and active-filter pills — plus history-aware dismissal and per-view/date persistence.
  • Region filter is now a search-in-the-field Combobox (a new atom on Radix Popover + cmdk): type to filter by region name or breadcrumb, click to select, and the trigger shows only the region name. Replaces the old Select-with-embedded-search.
  • One consistent error-state interface across every input atom (Input, Textarea, Select, Combobox, Checkbox, RadioGroup, ToggleGroup, Slider): isInvalid → a danger visual and aria-invalid on the control, with an aria-describedby pass-through. On filled controls the selected fill recolours to danger, not just the border.
  • Bug fixes: the language filter is clickable inside the modal calendar filter sheet again; the calendar story's mock events no longer render as multi-day spans.

Changes

  • src/views/CalendarView/ — the calendar surface + our header (CalendarControls), driven via the SX calendar-controls plugin (SX's built-in header hidden); useCalendarPosition store persists view + focused date across remounts.
  • src/components/atoms/Combobox/ — new atom (Radix Popover + cmdk); Select loses its searchable mode (relocated wholesale to Combobox).
  • src/hooks/use-popover.ts — merges pointer-events: auto into the shared floatingStyles, so both Floating-UI popover surfaces (Dropdown, EventActions) stay clickable inside a modal vaul drawer (fixes the language filter in the calendar filter sheet).
  • src/components/atoms/{Input,Textarea,Select,Combobox,Checkbox,RadioGroup,ToggleGroup,Slider} — shared isInvalid/aria-describedby interface (danger visual owns aria-invalid); DESIGN_SYSTEM + components rule document it.
  • src/views/CalendarView/CalendarView.stories.tsx — mock occurrences authored in each event's own zone so 1h spans stay single-day in any dev/reviewer timezone.

Verification

  • Lint: ✓ (pnpm lint)
  • Types: ✓ (pnpm typecheck)
  • Tests: ✓ 416 unit tests (pnpm test:run)
  • Ladle: ✓ (pnpm ladle:build) — all stories compile
  • Build: via CI (pnpm build)

Manual / visual verification

The node-only unit lane can't cover these — verify in Ladle (light + dark) / the running widget:

  1. Region combobox — type "Alberta", pick Calgary; the trigger then reads just "Calgary".
  2. Language filter inside the calendar's filter sheet (map mode → open calendar → Filter) — languages are selectable.
  3. Input atoms' "Invalid" story sections — the selected/filled parts turn danger (not just the border).
  4. Calendar — no events span multiple days; header controls + pills behave across month/week/list.

Notes for reviewer

  • New runtime deps (public bundle): @radix-ui/react-popover + cmdk, backing the region Combobox. Security-reviewed clean — reputable, no install scripts, no HTML/network sinks; cmdk's @radix-ui/react-dialog was already in the tree via vaul.
  • A /simplify altitude pass moved the modal-drawer pointer-events immunity from the Dropdown panel into use-popover so it also covers EventActions.
  • /code-review + /security-review both ran clean over the delta (one a11y nit — a redundant role="combobox" — fixed).

Closes #76

🤖 Generated with Claude Code

Ardnived and others added 13 commits July 24, 2026 09:41
Extend EventFilters with `region: string | null` (a region slug), wired
through DEFAULT_FILTERS, the ?region= URL codec, activeFilterCount, and
filtersKey. Region-aware matchesFilters via an optional `matchesRegion`
resolver (built by buildRegionMatcher over the ['regions'] tree) so an
event matches the selected region OR any descendant — resolved through a
new subtreeIds hierarchy helper. Only invoked when a region is set, so
the map's hot path is unchanged.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Expose api.getRegions + a useRegionMatcher hook (over the cache-once
['regions'] tree) and thread the resolver into the three matchesFilters
sites — getEvents, the Mapbox source filter, and the FilterView live
count — so the region filter narrows the map, list, and count together.
The matcher is undefined unless a region is selected, so the map's hot
path is unchanged.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A type-to-filter single picker built on the shared usePopover floating-ui
shell (no new dependency): a field-styled trigger opens a filter input
over a scrollable option list, with same-named options disambiguated by a
hint line. Fills the gap between the Radix Select (no typeahead) and the
Dropdown-of-checkboxes language filter — used next for the Region filter.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A searchable single-select over the regions present in the feed (any
level with events under it), disambiguated by a breadcrumb hint. Wired
through setRegion, a removable region pill (slug resolved to its name via
the region tree), and the active-filter badge. i18n label/placeholder/
search/empty added across all 10 locales.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
FilterView.commit hardcoded navigate('/search'), so applying filters from
the calendar (or any results view) jumped to Search. Derive the origin
from the filters path's parent and return to /calendar or /search
(preserving its query); other origins still fall back to /search to show
the filtered events.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@schedule-x/{react,calendar,theme-default}@2.36.0 (MIT). Pinned to the v2
line deliberately: v3/v4 moved to Temporal and pull the ~550 KB
temporal-polyfill peer, while v2 uses plain 'YYYY-MM-DD HH:mm' strings
(matching our occurrence expansion) with only preact + @preact/signals as
peers — the lighter fit for a public embeddable bundle.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
eventsToCalendarEntries expands each event's schedule.upcomingDates into
one entry per occurrence in the visible window, read in the event's
display zone (eventTimeZone: event zone for physical, viewer for online,
UTC when firstDate_tz is null) as a Schedule-X wall-clock string. Add the
getCalendarEvents fetcher — the whole filtered set (region cut applied via
the shared matchesFilters, online included, no distance cap) — for the
view to expand.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add a `wide` Drawer variant that fills the container (minus the floating
margins) instead of the ~22rem left panel, for the one full-width view.
Route /calendar as a top-level view (reserved slug, StackEntry,
resolveStack, TopView) with a calendarPath helper; DrawerStack drives the
wide panel, opens it at the near-full snap on mobile, and hides the cog on
the focused calendar.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The full-width month/week/schedule surface (Schedule-X), themed to our
tokens via the `.sx-calendar` var overrides so it follows light/dark +
accent. It suspends on the filtered source, expands to per-occurrence
entries, and opens the matching EventView on click; the header mirrors
SearchView (Filter + Close). Add a RegionView calendar button that opens
/calendar?region=<slug>, and the calendar.title i18n across all locales.

Part of #76.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- regionsQuery() factory (config/api) — folds the ['regions'] read
  inlined across useRegionMatcher, SearchFilters, and ActiveFilterPills,
  matching the clientQuery/eventQuery pattern.
- filteredFeed() — shared by getEvents + getCalendarEvents so both stay on
  the one matchesFilters predicate instead of duplicating the prologue.
- subtreeIds descends the tree (O(regions)) instead of re-walking every
  node's ancestry; dedup the region-options ancestry walk to distinct
  region ids; drop a redundant region-pill fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
matchesFilters is an event-level predicate ("keep events with SOME
matching occurrence"), so a recurring event that survives it was showing
ALL its occurrences on the calendar — a "Mondays only" filter still
rendered its Tue–Sun occurrences. Extract the per-occurrence half of
matchesFilters (occurrenceMatchesFilters + dateFloor) and apply it in
eventsToCalendarEntries, so each occurrence is trimmed to the day/time/
date cut — the calendar's entries now agree with what the filter promises.
Also fall back to a default span for a zero-length (endTime == start)
occurrence so it stays visible in the week/day views.

Per /code-review.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drop the ^ range on the three @schedule-x packages so a future patch
can't auto-flow into the public bundle on install (per /security-review).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- CLAUDE.md file layout: SearchableSelect atom + Calendar view.
- components.md / DESIGN_SYSTEM.md: SearchableSelect in the atoms list + table.
- data-layer.md: getCalendarEvents + getRegions (regionsQuery factory).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ardnived Ardnived closed this Jul 25, 2026
@Ardnived Ardnived reopened this Jul 25, 2026
Reconcile with #74 (UI bug sweep), which landed on main after this branch
forked. Key reconciliation: #74 replaced the time-of-day filter's
[number,number] hour range with named TimePeriod[] — threaded through the
extracted occurrenceMatchesFilters (so the calendar shares the same
period cut). Also merged both header buttons (Calendar + Search) and
#74's NearbySuggestion→GeolocationSuggestion rename, both atoms
(RadioGroup + SearchableSelect), and both sets of i18n keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: 95dc2c2
Status: ✅  Deploy successful!
Preview URL: https://52561401.sahajatlas.pages.dev
Branch Preview URL: https://feat-calendar-view.sahajatlas.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Deploying sahajatlas-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 95dc2c2
Status: ✅  Deploy successful!
Preview URL: https://71f13276.sahajatlas-design.pages.dev
Branch Preview URL: https://feat-calendar-view.sahajatlas-design.pages.dev

View logs

Ardnived and others added 12 commits July 26, 2026 10:17
Reconcile with #77 (filters → list toolbar + sort selector), which landed
on main after the previous merge. Source files (shared.tsx FilterButton
toolbar refactor, the new sort module) auto-merged cleanly; only the 10
locale files conflicted (both append a top-level object — my `calendar`
vs #77's `sort`), resolved to keep both.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Schedule-X validates its `locale` config against a fixed BCP-47 set and
throws InvalidLocaleError on our short codes (`en`, `de`, …), crashing the
calendar on first render (the CalendarView story too). Map our 10 locales
to the closest supported code (Hungarian → en-US, which SX 2.36 lacks);
our own header title stays localized via i18n.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
computeDayBoundaries sets Schedule-X's visible hours: to the selected
time-of-day period(s) when a time filter is active (a night span wraps
midnight, start > end), otherwise to 1h either side of the earliest/latest
occurrence in the filtered set. Undefined leaves the default whole-day grid.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per feedback: the region filter is now a Select dropdown that only lets
you choose from the CMS regions present in the feed — no free-text input
(which read like an address search) — and sits last in the filter form.
Removes the now-unused SearchableSelect atom + its dead region.search/
region.empty i18n keys and doc entries.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Opening filters from the full-width calendar (map mode) now slides a
separate modal drawer OVER the still-mounted calendar — from the right at
≥md, a bottom sheet on mobile — instead of replacing it with the narrow
filter panel + a calendar peek.

DrawerStack peels the trailing `filters` entry off the base stack when it
sits over the calendar, keeps the calendar as the base view (stable
AnimatePresence key on the base path), and renders FilterView in its own
right/bottom modal drawer with a dedicated control that dismisses to
/calendar. Because the calendar now stays mounted across open/apply,
CalendarView splits its grid into a CalendarGrid keyed by the applied
filters (+ a local Suspense for the header): opening the overlay leaves
the grid untouched; applying remounts it with fresh events + dayBoundaries.
Map-less keeps the plain replace-stack behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ters

- Calendar opens on the month view by default (defaultView).
- Revert the calendar's Filter button to the labelled "Filter" (not icon-only).
- Format + Frequency toggles drop the "Any" option — a single-select toggle
  is left unselected for "any", and the group's "Clear" resets it.
- Hide the "Any time" hint under the time-of-day filter when nothing is selected.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…chable Select

Give the form atoms a `highlight` prop that primary-tints an active/used
field: Select/Input/Textarea via the shared `fieldChrome` recipe, and
Slider/Checkbox/ToggleGroup/RadioGroup via a tinted ring wrapper. New Input
and Textarea atoms wrap the native controls on `fieldChrome` (replacing the
hand-rolled date `<input>` in the filters). Select gains `searchable` — a
type-to-filter box over its items. RadioGroup's selected card now fills like
a selected ToggleGroup item so the choice is unmistakable.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…emos

Move the form-control stories (Checkbox, Select, Slider, ToggleGroup,
RadioGroup) under an "Atoms / Inputs" section, add stories for the new Input
and Textarea atoms, and give each a `highlight` (and Select a searchable)
demo so the new affordances are visible in Ladle.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Wire each FilterView control's `highlight` to whether it's set (format,
frequency, days, time, dates, language, region), so an active filter reads
as a primary-tinted field. Migrate the date bounds to the Input atom and make
the region picker a searchable Select (new `filters.region.search`/`.empty`
strings across all locales).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Applying a filter (the grid is keyed by the filters, so it remounts) or
opening an event and coming back reset Schedule-X to the month grid on today.
Persist the current view + focused date in a non-reactive `useCalendarPosition`
store — date via the `onSelectedDateUpdate` callback, view via a subscription
to SX's internal view signal (no public callback in 2.36) — and seed
`defaultView`/`selectedDate` from it at mount, so the calendar returns to where
the user left it.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Rework the `highlight` prop on RadioGroup, ToggleGroup, Slider and Checkbox to
primary-colour the component's own unselected/indeterminate elements — the
unchecked radio cards, the unselected toggle items, the slider's unfilled track
+ thumb, the unchecked switch track / checkbox box — instead of wrapping the
control in a tinted, padded box. It's a colour change only, so an active field
stands out without ever shifting the layout. The selected elements keep their
solid primary fill.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Event titles are often long and repetitive on a calendar. Label each entry
with the event's parent region name instead — or, when the calendar is already
scoped to a region (so every entry shares it), the locality from the address.
Falls through region → locality → title so an entry is never blank. The label
sources (`regionName`, `locality`) are carried on the calendar source event.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ardnived Ardnived changed the title feat(calendar): add full-width CalendarView with region filter feat(calendar): full-width CalendarView, region filter + form-control refresh Jul 27, 2026
Ardnived and others added 8 commits July 27, 2026 11:19
…tion

- Convert online class times to the viewer's zone with the correct span: the
  event-local `endTime` is now applied in the event zone, then both ends are
  converted to the display zone (in-person classes stay in their original local
  time). Reuses the shared `eventTimeZone`/`withEndTime`/`scheduleTimeZone`
  utilities, mirroring how `resolveEventDisplay` derives the main view's times.
- Move the "Online" term out of the entry title into Schedule-X's `location`
  field (the title stays the place); the distinct colour still flags online
  programs in the month/list views, which don't render `location`.
- Reuse the shared `events:display.online` key (the list/detail views' term)
  for that word and drop the redundant `common:calendar.online`.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The CalendarView stacked our own DrawerHeader (Calendar title + Filter + Close)
ABOVE Schedule-X's built-in header bar (Today / prev-next / date-range / view
selector) — two rows of chrome, wasted vertical space. Inject the title (left)
and the Filter + Close controls (right) INTO SX's header via its `customComponents`
slots instead, and drop the separate DrawerHeader, so the two collapse into one
row. SX portals the slot components from our React tree, so they keep Router /
i18n / drawer-control context and behave exactly as before. The mobile drag
grabber is unaffected (it lives in DrawerContent, not the header).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The `.sx-calendar` on-primary/secondary/tertiary mappings pointed at a
`--*-contrast` token that doesn't exist, so `hsl(var(--primary-contrast))`
resolved to an invalid colour and the text fell back to black — legible only on
dark mode's lighter primary-9, which is why the today-date highlight was
unreadable (black on the dark primary-9 circle) in light mode. Point them at the
real `--*-on` tokens (light: white, dark: black — the same on-color the solid
Button uses), so the highlight text is readable in both themes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…tle size

- Stack the headers again on mobile OR the list view (a separate DrawerHeader
  above SX's own header), keeping the merged single-row layout only for roomy
  desktop month/week grids — so the one row can't get crowded. The grid is keyed
  by `merged` so the SX header slots re-register cleanly on a flip.
- Style SX's header controls (Today / prev-next / view selector) like our ghost
  buttons: borderless, muted text, a primary-tinted surface on hover.
- Add horizontal + bottom padding around the calendar to match other views
  (the SX header's own inline padding is dropped so it stays flush).
- Enlarge the merged "Calendar" title to `text-lg`, matching the drawer titles.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Decide the merged-vs-stacked header from the calendar's OWN width (a
  ResizeObserver on the container), not the viewport. A viewport media query
  mis-fires in embeds — a wide host page with a narrow widget slot read as
  "desktop" and merged, hiding the controls. Now a narrow calendar (mobile, a
  narrow embed, or the list view) always keeps the stacked DrawerHeader, so a
  header is always shown; only a genuinely wide grid merges into SX's bar.
- Register the Day view so the month grid's "+N more" link works (Schedule-X
  switches to the Day view for that date; without it registered it was a no-op).
- Pad the calendar `p-4` on all sides to match other views.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Remove Schedule-X's border on the calendar body — the `p-4` DrawerBody already
  frames it, and the outline (more visible in dark mode) broke that padding.
- Size the header controls (Today / prev-next / view selector) to our `sm`
  button metrics — 2rem tall, 0.75rem horizontal padding, square chevrons —
  so their padding matches our ghost buttons, not just the hover colour.
- Drop the header's own padding so the DrawerBody `p-4` frames it uniformly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drop the extra Day view and instead handle the month grid's "+N more" via
Schedule-X's `onClickPlusEvents` callback: switch to the LIST view focused on
that date (through the internal `calendarState.setView`, reached defensively
like the view signal). Every event for the day shows in one place, and the view
picker stays month / week / list.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…er shows

The mobile bottom sheet is full height and snap-translated; the list view got
`wide=false`, which collapsed it to the short (300px) snap where the stacked
DrawerHeader wasn't comfortably in view. Key the snap on the view KIND instead
of `wide`, so the calendar stays at the near-full snap across month/week/list —
its list needs the height as much as the grid does. (`wide` still narrows only
the desktop panel for the list view.)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Ardnived and others added 16 commits July 28, 2026 07:37
Stop styling / injecting into Schedule-X's built-in header (whose date picker,
view dropdown, and nav we kept fighting — clipped labels, misaligned chevrons, a
list-view dropdown that dropped its other options). Instead drive the calendar
through the official `@schedule-x/calendar-controls` plugin (a PUBLIC API:
setView / setDate / getRange) and build the header from our own atoms:

- One consistent DrawerHeader for every width — title, Today, prev/next, the
  focused month/year (localized via luxon), a Month/Week/List ToggleGroup picker,
  Filter, Close. SX's own header bar is hidden in globals.css.
- Deletes a pile of accreted complexity: the customComponents merge, the
  merged-vs-stacked branching + ResizeObserver width detection + keyed-remount,
  and the two internal `$app` reach-ins (`viewSignalOf` / `calendarStateOf`) — all
  replaced by the plugin's public API. "+N more" still opens the list view on that
  day (via the plugin now).
- New i18n: `calendar.today` / `.previous` / `.next` / `.views.{month,week,list}`
  across all locales.

useCalendarPosition is now written by the header (setView) + the
`onSelectedDateUpdate` callback, and read reactively by the header (picker
highlight + label) and DrawerStack (drawer width). The grid still seeds from it
once and never re-renders on a write.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- The prev/next arrows now page one period off the focused date — a month in
  month view, a week in week view, a day in list view — and Today jumps to today,
  all through the calendar-controls plugin. Each action writes the store first
  (so the label + active view update instantly and the grid seeds correctly on a
  remount) then drives the mounted calendar (guarded, since the header is live
  before the grid mounts).
- The month/year label is now a button that opens the browser's native date
  picker (`showPicker`), setting the current month/week/day.
- Reorder the header: the Month/Week/List picker holds the top line, the nav +
  date + Filter wrap below on narrow widths (one line on large), and Close is
  pinned top-right so it's consistent whether or not the header wraps.
- Render ActiveFilterPills below the header. New `calendar.pick_date` key.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… freeze

Closing the calendar unmounts its large grid; reconciling that removal
synchronously froze the click for a beat, so the press seemed to do nothing.
Wrap the dismiss navigation in `startTransition` — React keeps the UI responsive
and commits the view swap when ready.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…arrows

- Show the focused date, not just the month, in the week + list views (condensed
  month name): the week's first day in week view, the selected date in list view;
  month view keeps "July 2026".
- Remove the separate Today button and move the date picker between the arrows —
  the browser's native picker already has its own Today.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add an optional `initialDraft` prop to FilterView (defaults to the applied
filters, so the app is unchanged) so a story can open the form pre-filled and
unapplied — Apply + Clear active — the state you reach after editing.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the placeholder events with a slice of the seeded UK feed — weekly
morning/evening classes across several cities (one online) plus a one-off
workshop, all single-day + timed (as the real feed is). Seed a couple of applied
filters so the pill row renders.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Extract the duplicated story `SeedFilters` helper into a shared
  `SeedSearchParams` (ladle); reuse it in the CalendarView + ActiveFilterPills stories
- Delete the now-unused `calendar.today` key from all locales
- Consolidate the two `startTransition` dismiss branches into one wrapper
- Dedup the focused-date expression (one `focused` const) in CalendarControls
- Rename the `CalendarControls` type → `CalendarControlsPlugin` (it collided with
  the component); clarify the `drive()` catch comment

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… helper

- CLAUDE.md: the CalendarView header is our own (calendar-controls plugin; SX's
  built-in header hidden).
- STORYBOOK.md: document the shared `SeedSearchParams` ladle helper for
  filter-driven stories.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the region filter's searchable Select with a new Combobox atom
(Radix Popover + cmdk — the shadcn pattern). Fixes two issues with the
Select-as-combobox approach:

- selected state now shows only the region name (the breadcrumb hint stays
  in the list), instead of mirroring the whole two-line item into the trigger
- the search moved into the field itself: type to filter by name or
  breadcrumb, click a result to select

Radix's portal keeps the popover interactive inside the calendar's modal
vaul filter drawer, where a Floating-UI popover is pointer-locked out.
Strips the now-unused `searchable` machinery from the Select atom.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…lter sheet

The calendar's filter overlay is the one modal drawer; Radix Dialog's modal
mode sets `pointer-events: none` on the body, which the Floating-UI Dropdown
panel (a portaled sibling) inherited — so its checkboxes got no clicks. Give
the panel `pointer-events: auto` (a no-op in the non-modal drawers). The new
region Combobox is unaffected: Radix Popover re-enables this itself.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The story built occurrence instants from machine-local time (`setHours`) but
tagged each event with a fixed zone, so on a dev machine outside that zone the
event-local `endTime` (start hour + 1) could fall before the occurrence's
event-zone start and roll to the next day — a multi-day span (17-21 of them in
US timezones). Author each occurrence in its event's own zone instead, so the
wall-clock start is exactly hh:mm and the end always lands the same day. The
online class moves to ~noon UTC so its viewer-zone span stays single-day across
the plausible reviewer band (US Pacific … India) rather than crossing midnight.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The input atoms handled validation errors inconsistently: Input/Textarea/Select
had an `isInvalid` visual but didn't set `aria-invalid`; RadioGroup set
`aria-invalid` but showed no visual; Combobox/Checkbox/ToggleGroup/Slider had no
error state at all.

Standardise on one contract for every form-control atom (Input, Textarea, Select,
Combobox, Checkbox, RadioGroup, ToggleGroup, Slider):

- `isInvalid` → a danger visual (colour change only, no layout shift, mirroring
  `highlight`) AND the atom sets `aria-invalid` on its own control, so a caller
  can't forget the a11y attribute
- `aria-describedby` pass-through on every atom, so a form can link its error
  text (the message itself stays in the field wrapper — the atom is presentational)

Adds the missing Combobox invalid state, a danger visual to RadioGroup, and
`isInvalid` to Checkbox/ToggleGroup/Slider. Every Inputs story gains an invalid
demo; DESIGN_SYSTEM documents the shared interface (and the stale Select
`searchable` note is replaced with the Combobox row).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The error state only danger-bordered the unselected parts, leaving the selected
item/fill primary. For the filled controls (ToggleGroup, RadioGroup, Slider,
Checkbox) `isInvalid` now swaps the SELECTED solid from primary to danger too —
so an errored field reads as wrong whether or not it has a value. Still a colour
change only (no layout shift); text on the danger fill uses `danger-foreground`.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Move the modal-drawer pointer-events immunity from the Dropdown panel class
  into usePopover's returned floatingStyles, so both popover consumers (Dropdown
  + EventActions) get it (a no-op outside a modal) instead of a per-atom fix.
- Import fieldChrome from the Select barrel, matching the other consumers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The trigger is a disclosure button (Radix supplies aria-expanded/aria-haspopup);
cmdk's CommandInput inside is the actual combobox, so carrying role="combobox"
on both was a redundant ARIA role. Flagged by code review.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
components.md: list the new Combobox atom, replace the stale "Select can be
searchable" note (searchable was removed — Combobox is the type-to-filter
picker now), document the shared isInvalid/highlight interface, and add
react-popover to the installed Radix primitives.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ardnived Ardnived changed the title feat(calendar): full-width CalendarView, region filter + form-control refresh feat(calendar): full-width CalendarView, region combobox + input error-state refresh Jul 29, 2026
@Ardnived
Ardnived merged commit 6cc044a into main Jul 29, 2026
4 checks passed
@Ardnived
Ardnived deleted the feat/calendar-view branch July 29, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(calendar): add full-width CalendarView with region filter

1 participant