Skip to content

feat: Dot colors per event - #158

Open
benjaminVadon wants to merge 3 commits into
mainfrom
dot-colors-per-event
Open

feat: Dot colors per event#158
benjaminVadon wants to merge 3 commits into
mainfrom
dot-colors-per-event

Conversation

@benjaminVadon

Copy link
Copy Markdown
Contributor

No description provided.

@benjaminVadon
benjaminVadon requested review from sirambd and a balanced review from Copilot September 9, 2026 09:46
@benjaminVadon benjaminVadon self-assigned this Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It removes an existing public SDK API and model without a compatibility or deprecation path.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds per-event and recurrence-override colors to calendar day dots.

Changes:

  • Introduces DotColor and calendar/event color fallback.
  • Updates queries, recurrence folding, and ordering.
  • Expands tests for custom colors and recurrence cases.
File summaries
File Description
EventRepositoryTest.kt Tests repository dot-color behavior.
VisibleCalendarColorsByDayFoldTest.kt Removes obsolete fold tests.
DotColorsByDayFoldTest.kt Tests replacement dot-color folding.
CalendarManager.kt Exposes the new monthly dot API.
DotColor.kt Defines the dot-color model.
CalendarColors.kt Exposes the default source color.
DotColorsByDayFold.kt Folds events into per-day colored dots.
EventRepository.kt Connects the new query and fold.
EventDotColorInRange.kt Projects event and override colors.
EventDao.kt Queries event and calendar colors.
AppleIdAccessors.kt Removes the obsolete Apple identifier accessor.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@benjaminVadon
benjaminVadon force-pushed the dot-colors-per-event branch 2 times, most recently from 30bbd58 to a776715 Compare September 11, 2026 09:08
benjaminVadon and others added 3 commits September 11, 2026 15:34
The per-day color map exposed VisibleCalendarColor(CalendarId, CalendarColors),
so consumers received a full palette to read a single Int out of it, plus a
calendar id neither the Android nor the iOS app ever used. Both are replaced by
DotColor(sourceColor), the calendar id becoming an internal fold key, which lets
the Apple idValue accessor go.

No behaviour change: dots are still one per calendar owning an event that day,
colored after that calendar.

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

Day dots were colored after the owning calendar only, so an event redefining
its color (RFC 7986 COLOR) was indistinguishable in the month grid. The fold
now reads events.colorArgb, and each override its own, letting a dot carry the
event's effective color.

Dots are consequently reduced per calendar *and* per color: a calendar mixing
inherited and redefined colors shows one dot per color, while two calendars
sharing a color still show one dot each.

Since a day list may now hold equal DotColor values, it can no longer be used
as a set of stable keys. iOS keys its dots on Color.hashValue
(EventDotsView.swift), which will need an index-based id.

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

Copy link
Copy Markdown

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.

2 participants