Dashboard grid: 1-col min width for stats, vertical compaction for make-room dragging
Build and push images / build-backend (push) Successful in 5s
Build and push images / build-worker (push) Successful in 5s
Build and push images / validate (push) Successful in 2s
Build and push images / build-frontend (push) Successful in 9s

- Stat widgets can now be resized down to a single column (minW 1)
- Switch to vertical compaction so dragging a widget pushes others down to reveal the drop spot, then settles (fixes both the no-move and fly-off behaviours)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 23:36:29 +01:00
parent bb09c37b3d
commit c05d27c115
+2 -3
View File
@@ -45,7 +45,7 @@ const STAT_DEFS = {
// Full widget registry: size defaults + palette label. Stats inherit from STAT_DEFS.
const WIDGETS = {
...Object.fromEntries(Object.entries(STAT_DEFS).map(([id, d]) => [id, { label: d.label, w: 2, h: 1, minW: 2, minH: 1 }])),
...Object.fromEntries(Object.entries(STAT_DEFS).map(([id, d]) => [id, { label: d.label, w: 2, h: 1, minW: 1, minH: 1 }])),
weekly: { label: 'Weekly distance', w: 6, h: 3, minW: 4, minH: 2 },
bodyBattery: { label: 'Body Battery', w: 4, h: 3, minW: 3, minH: 2 },
vo2maxTrend: { label: 'VO₂ max trend', w: 3, h: 3, minW: 2, minH: 2 },
@@ -629,8 +629,7 @@ export default function DashboardPage() {
isDraggable={editMode}
isResizable={editMode}
onLayoutChange={handleLayoutChange}
compactType={null}
preventCollision
compactType="vertical"
draggableCancel=".widget-delete"
>
{layout.filter(l => WIDGETS[l.i]).map(l => (