Skip to content

fix(calendar): symmetric gutter on event boxes within day columns#812

Merged
renemadsen merged 1 commit into
stablefrom
feat/calendar-event-box-gutter
May 14, 2026
Merged

fix(calendar): symmetric gutter on event boxes within day columns#812
renemadsen merged 1 commit into
stablefrom
feat/calendar-event-box-gutter

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Calendar event boxes (week view) were bleeding past the right edge of their day column with effectively zero gutter on the left. Now they sit with a symmetric 4 px gutter inside the column, and with N overlapping events there's an 8 px gap between adjacent events.
  • Replaces percent-only positioning (left: 0%; width: 99%) with calc() strings that combine a percent-based sub-column with a fixed pixel gutter, and adds box-sizing: border-box so the 2 px white border can't push the visible edge past the computed width.
  • Design spec: docs/superpowers/specs/2026-05-13-calendar-event-box-gutter-design.md (workspace-level repo).

Test plan

  • Open /plugins/backend-configuration-pn/calendar week view; confirm a single event sits symmetrically inside its day column (4 px on each side).
  • Confirm no event crosses the right column divider at viewport widths 1280 / 1440 / 1920 px.
  • Stage two overlapping events on the same day; confirm 8 px gap between them and 4 px from outer column edges.
  • Drag an event to another day — drag-drop still works.
  • Drag the top edge / bottom edge to resize — both still work.
  • Hover an event — lift / z-index unchanged.
  • Toggle completion — still works.

🤖 Generated with Claude Code

Event blocks were positioned with `left: 0%; width: 99%` plus a 2px white
border without explicit `box-sizing`. The visible right edge crossed the
day-column boundary and the left gutter was effectively zero, breaking the
sense of column ownership when scanning the week view.

Replace the percent-only `leftPercent`/`widthPercent` getters with
`leftStyle`/`widthStyle` returning `calc()` strings that combine a
percent-based sub-column with a fixed 4px pixel gutter. For N overlapping
events this yields 4px outer gutters and an 8px gap between adjacent
events. Add `box-sizing: border-box` so the 2px white border sits inside
the computed width regardless of any global box-sizing rule.

Spec: docs/superpowers/specs/2026-05-13-calendar-event-box-gutter-design.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 14, 2026 04:07
@renemadsen renemadsen merged commit ea4e464 into stable May 14, 2026
36 of 37 checks passed
@renemadsen renemadsen deleted the feat/calendar-event-box-gutter branch May 14, 2026 04:46
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