Skip to content

Add per-plant and global calendar views for care events - #5

Merged
myaschmitz merged 2 commits into
mainfrom
myaschmitz-plant-calendar-view
Aug 1, 2026
Merged

Add per-plant and global calendar views for care events#5
myaschmitz merged 2 commits into
mainfrom
myaschmitz-plant-calendar-view

Conversation

@myaschmitz

Copy link
Copy Markdown
Owner

What

Adds a calendar to visualize when care events happened — both per-plant and across all plants.

  • Per-plant: plant detail Event History gains a List ⇄ Calendar toggle. List view unchanged. Calendar is full-width with color-coded dots per event type; tap a day to see that day's events inline.
  • Global: new Calendar tab (+ web sidebar entry) shows all events across plants; tap a day for events with plant names, tap an event to jump to that plant.

How

  • Reusable, dependency-free MonthCalendar + DayEventsList (dayjs only), themed via useTheme, colored by getCareTypeByType.
  • PlantCalendarSection wraps the existing PlantEventsSection behind the toggle.
  • Data: EventService.getAllEvents + useAllEvents hook + allEvents query key; invalidated on event create/update/delete.

UI sizing / scroll

Full-width grid with fixed height (max 6 rows) so there's no nested scroll conflict; month nav is arrows; selected-day events grow the page.

Tests

getAllEvents covered; full suite passes (74). Typecheck clean. Verified on a local iOS device build.

Follow-up (not in this PR)

Tap an event → event detail view; needs nav design that restores calendar month/day on back (route+params on web, modal/sheet on mobile). Noted in plan.

Per-plant detail gains a List/Calendar toggle; new Calendar tab shows
all events across plants. Tap a day to see its events, color-coded by
event type. Adds EventService.getAllEvents + useAllEvents and wires
cache invalidation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rooted Ready Ready Preview Aug 1, 2026 5:43am

@myaschmitz
myaschmitz merged commit 1af98c1 into main Aug 1, 2026
4 checks passed
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