Skip to content

Commit 29a4e5f

Browse files
sarg3ntclaude
andcommitted
fix(#103): match chart-grid spacing to the KPI band (12px both axes)
After the previous height:100% fix exposed the real margin spacing, 48px vertical felt too generous compared to the KPI band's tight 12px gap-3 grid directly above. Drop GridStack margins to 6 on every side → 12px gap on both axes, matching the KPI band exactly so the whole metrics page reads as one consistently-spaced surface. Verified via Chrome MCP after fix: horizontal gap between adjacent inner cards: 12px vertical gap between adjacent inner cards: 12px Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bc7f99a commit 29a4e5f

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

gearbox/static/js/metrics-layout.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@
7070
// 12-column grid matches the templ's default coordinates (half-
7171
// width tiles are gs-w=6, the full-width Sessions tile is gs-w=12).
7272
//
73-
// Asymmetric margins so rows breathe more than columns: chart
74-
// axis labels live at the top/bottom of each tile so adjacent
75-
// rows' visible content edges approach each other faster than
76-
// adjacent columns. 24 top/bottom (= 48px between rows) +
77-
// 12 left/right (= 24px between side-by-side) is the ratio that
78-
// reads right after multiple feedback passes on PR #104.
73+
// Margins set to 6 on every side → 12px visible gap between
74+
// tiles on both axes. Matches the KPI band's Tailwind gap-3
75+
// (12px) directly above the grid, so the whole metrics page
76+
// reads as one consistently-spaced surface rather than two
77+
// grids with different rhythms.
7978
//
8079
// ALSO: keep getCellHeight(false) (not cellHeight()) anywhere we
8180
// need the cell height — the bare cellHeight() getter side-
@@ -86,10 +85,10 @@
8685
{
8786
column: 12,
8887
cellHeight: 80,
89-
marginTop: 24,
90-
marginBottom: 24,
91-
marginLeft: 12,
92-
marginRight: 12,
88+
marginTop: 6,
89+
marginBottom: 6,
90+
marginLeft: 6,
91+
marginRight: 6,
9392
float: false,
9493
staticGrid: true, // read-only until edit mode toggles
9594
acceptWidgets: false,

0 commit comments

Comments
 (0)