Skip to content

Add DayGridView component#1

Merged
derrickreimer merged 8 commits intomainfrom
day-grid-view
Feb 11, 2026
Merged

Add DayGridView component#1
derrickreimer merged 8 commits intomainfrom
day-grid-view

Conversation

@derrickreimer
Copy link
Member

Summary

  • Extract shared components (EventChip, TimeGutter, AllDayRow, NowIndicator, UnavailabilityOverlay, SlotInteractionLayer, SelectionOverlay, hooks) from resource-grid-view/ into components/shared/ with a generalized columnId abstraction instead of resource-specific types
  • Add DayGridView component that shows days as columns for a date range (e.g. a week view), reusing all shared infrastructure
  • Add GridViewClassNames base type, DayGridViewClassNames, DayGridSelectedRange, and DayGridViewProps types
  • Add date-based library helpers: generateDateRange, formatDayOfWeek, groupByDate, groupAllDayByDate, computePositionedEventsByDate
  • Add DayGridView demo to playground with a week of sample events
  • Update README with DayGridView documentation

Test plan

  • Verify pnpm typecheck && pnpm lint:fix && pnpm build passes
  • Verify ResourceGridView still works correctly in playground (no regressions from shared extraction)
  • Verify DayGridView renders correctly in playground with week view, day headers, today indicator, events, overlapping events, and all-day events
  • Verify drag-to-select works in DayGridView
  • Verify slot click works in DayGridView
  • Verify event click works in DayGridView
  • Verify now indicator appears on today's column
  • Verify dark mode works for both views

Extract shared components (EventChip, TimeGutter, AllDayRow, NowIndicator,
UnavailabilityOverlay, SlotInteractionLayer, SelectionOverlay, hooks) from
resource-grid-view into components/shared/ with generalized APIs (columnId
abstraction instead of resource-specific types). Build DayGridView that
shows days as columns for a date range, reusing all shared infrastructure.
Replace per-column all-day cells with a CSS subgrid container that
renders all-day events as continuous blocks spanning multiple columns.
A new layout algorithm computes column spans and greedy lane assignments
for vertical stacking, with continuation indicators on truncated edges.
- Use Tailwind border-cal-border class on column dividers instead of
  inline CSS variable that wasn't being applied
- Add explicit padding rows to the subgrid so dividers span the full
  height and eliminate the gap above the hours section
- Add horizontal margin on event chips so they don't sit flush against
  column border lines
The flat (square) edge on truncated sides is sufficient to indicate
that an event continues beyond the visible range.
Use 2px margin instead of 0 on continuation edges so events don't
press flush against the column border.
@derrickreimer derrickreimer merged commit f13996b into main Feb 11, 2026
1 check passed
@derrickreimer derrickreimer deleted the day-grid-view branch February 11, 2026 19:27
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.

1 participant