Skip to content
SprecherEast
Issue 1191

feat: HeatMap, a shared week strip and four-week calendar

Back to our plan
Done
enhancementfrontenduxpriority: medium

Summary

A shared heat map piece in two sizes: a small one-week strip that spans the full width of its card (seven squares, weekday letters above), and a medium four-week calendar (Monday to Sunday rows, today ringed, future days dashed).

Details

Part of #1188; chosen design in its comments and the mockups. Plain HTML in a CSS grid (ADR 0018: grids of squares need no chart library). Darker means more finished that day; the shade steps scale to the largest value in the series so a quiet group still reads, and a zero is a faint square, never missing. Squares use theme tokens at fixed opacity steps, not inline colour. Each square is named with its day and count for screen readers, and the whole map has one label that lists the values. The strip stretches to the card; the calendar keeps medium squares and is centered.

Acceptance criteria

  • Not done: HeatMap renders the week strip and the calendar form from a list of dated counts, in theme tokens only, light and dark.
  • Not done: Tests first: shading steps, all-zero and single-day series, today's ring, future days, Monday alignment, and the full-width strip.
  • Not done: Every map has an accessible name that lists the values; axe passes; the strip holds from 320 px up.
  • Not done: Gallery entry, component-set row, the generated component references and the UI kit note change in the same PR.
  • Not done: Nothing uses it yet.

Files likely touched

src/platform/ui/HeatMap.tsx and its test, src/platform/ui/README.md, src/app/(frontend)/dev/gallery/, docs/ui/component-set.md, docs/reference/

Must not touch

The roadmap module, pages, the chart port and its adapters.


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab