Skip to content

fix(web): calendar-colored event focus chrome - #2760

Merged
cursor[bot] merged 4 commits into
mainfrom
cursor/calendar-colored-event-focus-8374
Aug 12, 2026
Merged

fix(web): calendar-colored event focus chrome#2760
cursor[bot] merged 4 commits into
mainfrom
cursor/calendar-colored-event-focus-8374

Conversation

@tyler-dane

@tyler-dane tyler-dane commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Event keyboard focus and start/end edge focus no longer use theme --accent. They use the owning calendar’s backgroundColor (when it has ≥3:1 contrast against the light page), drawn outside the card so short titles stay readable. Each event stays at two colors: fill + calendar (or --text when calendar color would vanish).

Simplicity

  • Shared eventFocusColor / eventFocusOutlineClass / eventEdgeFocusShadow helpers so Timed and AllDay cards stay in sync
  • Removed a QueryClient-coupled lookup from GridDraft; drafts keep the --text focus fallback without new provider requirements
  • Contrast fallback for light calendar colors (local #fff, pale Google grays) instead of speculative theme-branching

Automated validation

  • Browser at http://localhost:9080 (anonymous): created “Focus check”, focused card, Tab-cycled whole → start → end
    • Whole focus: calendar/--text outline, not accent blue; title readable
    • Edge focus: outside 3px shadow; sidebar announced start/end; title readable
    • Console: expected /api/config refused with no backend; no UI errors
  • Focused web tests: EventCard, calendar-accent util, calendarCardIdentity, GridDraft — 45 pass
  • bun run lint — no new errors (pre-existing warnings only)

Independent review

Fresh read-only review found one confirmed High: local #ffffff calendar focus invisible on light theme. Fixed by falling back to --text when calendar color fails 3:1 against light page paper. No other confirmed findings.

Test plan

  • bun test:web on EventCard, calendar-accent.util, calendarCardIdentity, GridDraft
  • bun run lint
  • Manual keyboard focus + Tab edge cycle on localhost:9080
Open in Web Open in Cursor 

cursoragent and others added 4 commits August 12, 2026 00:55
Replace theme-accent rings and edge bars with the owning calendar's
backgroundColor, drawn outside the card so short titles stay readable
and each event only shows fill + calendar colors.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
GridDraft tests render without QueryClient; resolve focus color only
from list parents that already own the lookup. Drafts fall back to
--text for focus chrome.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Deduplicate the Timed/AllDay focus-visible outline class strings and
keep edge-focus suppression in one place.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Fall back to --text when calendar backgroundColor fails 3:1 against
the light page paper (local #fff and pale Google grays), so keyboard
focus never vanishes in light theme.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@tyler-dane
tyler-dane marked this pull request as ready for review August 12, 2026 02:04
@cursor
cursor Bot merged commit f0bc816 into main Aug 12, 2026
20 checks passed
@cursor
cursor Bot deleted the cursor/calendar-colored-event-focus-8374 branch August 12, 2026 02:06
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