fix(design): heatmap cells should be square with consistent gap #
Area: Dashboard + Diagrams · Heatmap · assets/css/marathon-components.css
Type: bug (visual)
Priority: p2
Summary #
Heatmap points currently have inconsistent width/height gaps and don't look like the GitHub contribution graph. Width and height (including gaps) must be identical and visually match GitHub.
Current behavior #
Both pages/dashboard.vue:231 and pages/diagrams.vue:64:
<div class="grid grid-cols-12 gap-[3px]">
<div class="heatmap-cell" :class="count>0 ? … : 'bg-base-300'"></div>
</div>
.heatmap-cell { width:1.75rem; height:0.75rem; } /* 12px */
grid-cols-12stretches cells to fill container width → gap is only3pxbetween columns but row gap may differ as container resizes; cells can render as rectangles when grid stretches.- No
aspect-square, noborder-radius. - Does not match GitHub: ~10–12px squares,
gap:3pxuniform,border-radius:2px, 7 rows × N week-columns.
Expected behavior #
- Cells must be provably square: enforce
aspect-square+ fixedw-3 h-3(orw-[10px] h-[10px]). - Gap must be uniform on both axes —
gap-[3px]forrow-gapandcolumn-gap. - Add subtle rounding like GitHub:
rounded-[2px]orrounded-sm. - Prefer
grid-auto-flow: column+grid-rows-7(week columns) or keepgrid-cols-12but addjustify-start+auto-rows: 12pxso cells don't stretch. Either is fine if square is guaranteed. - Colors unchanged:
bg-base-300(none) /bg-primary/40(some) /bg-primary(many). - Keep
role="img"+aria-label/titleper cell.
Files to touch #
assets/css/marathon-components.css:.heatmap-cell— addaspect-ratio:1/border-radius:2pxpages/dashboard.vue:231— grid classespages/diagrams.vue:64— grid classes (keep in sync)
Acceptance criteria #
How to test #
- Run
npm run dev, open dashboard + diagrams, inspect a.heatmap-cell→ computed size must be square. - Resize viewport 320→1280 → cells stay square, gap uniform.
- Compare side-by-side with git contributions graph.