Skip to content

Display density controls (row height, event size, columns) - #9

Merged
alontu merged 1 commit into
masterfrom
feat/display-density
Jun 12, 2026
Merged

Display density controls (row height, event size, columns)#9
alontu merged 1 commit into
masterfrom
feat/display-density

Conversation

@alontu

@alontu alontu commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Feature

A גודל control in the view-settings group lets the user tune the calendar's density:

  • Presets: דחוס / רגיל (default) / מרווח — a segmented control.
  • Advanced sliders: row height, event bar height, event font, column width.
  • Persisted to localStorage; comfort floor prevents extreme squeezing.

Why

Row height grows with stacked multi-day events; sparse rows had a fixed floor that some users want smaller for a whole-year overview. Now they can compress (or enlarge) to taste.

Implementation

  • Pure logic in src/lib/density.ts (presets, bounds/clamp, CSS-var mapping, parse) + tests.
  • Hardcoded sizes in the grid CSS converted to var(--x, <current default>), so the default look is unchanged.
  • DensityControl applies the vars to :root and persists; self-contained component in the header.

Verification

  • npm test81 passing (incl. 11 new density tests); npm run build green.
  • Visual: popover + compact/comfortable/spacious verified in the harness.

🤖 Generated with Claude Code

…umns)

Row height varies with how many multi-day events stack; sparse rows still had a
fixed 80px floor. Add a 'גודל' control in the view-settings group: a popover with
3 presets (דחוס / רגיל / מרווח) plus advanced sliders for row height, event bar
height, event font, and column width. Values are pushed as CSS variables on
:root and persisted to localStorage; the stylesheet keeps the current values as
fallbacks (so the default look is unchanged). A comfort floor prevents extreme
squeezing. Pure logic in src/lib/density.ts with tests (81 total).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alontu
alontu merged commit 9881b44 into master Jun 12, 2026
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