Skip to content

feat: add showQuarterHourLines prop and onZoomChange callback#14

Draft
sgandhi-gg wants to merge 1 commit into
fix-overlapping-cards-press-feedbackfrom
quarter-hour-zoom-precision
Draft

feat: add showQuarterHourLines prop and onZoomChange callback#14
sgandhi-gg wants to merge 1 commit into
fix-overlapping-cards-press-feedbackfrom
quarter-hour-zoom-precision

Conversation

@sgandhi-gg

Copy link
Copy Markdown
Collaborator

Summary

  • Add onZoomChange callback to CalendarContainer — fires via useAnimatedReaction whenever zoom level changes, emitting a percentage (0–100) where 0 = min zoom, 100 = max zoom
  • Add showQuarterHourLines prop to CalendarBody (default: false) — when enabled, renders grid lines at :15 and :45 in addition to the existing :00 and :30
  • Wire showQuarterHourLines through BodyContext into both TimelineBoard (day/week view) and ResourceBoard (resource view)

Usage

<CalendarContainer
  onZoomChange={(zoomPercent) => {
    setShowQuarterLines(zoomPercent > 50);
  }}
>
  <CalendarBody showQuarterHourLines={showQuarterLines} />
</CalendarContainer>

Stacked on

fix-overlapping-cards-press-feedback

Made with Cursor

- Add `showQuarterHourLines` prop to CalendarBody (default: false) that
  renders :15 and :45 grid lines in addition to :00 and :30
- Add `onZoomChange` callback to CalendarContainer that emits zoom
  percentage (0-100) via useAnimatedReaction whenever the pinch zoom level
  changes, enabling consumers to conditionally show quarter-hour lines
- Wire showQuarterHourLines through BodyContext into TimelineBoard and
  ResourceBoard so both day and resource views respect the prop

Co-authored-by: Cursor <cursoragent@cursor.com>
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