fix(web): space the admin stat cards on the page rhythm #490
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-367-card-spacing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The reported symptom is dashboard cards sitting a pixel or two into each other instead of having spacing between them. Measuring the current markup in a headless browser (Chrome, 500/768/1024/1400/1920px) shows no container that actually overlaps: every card grid and card stack in the authenticated shells separates its cards by exactly 24px. BUNYIP-472 (F1/F25) already pulled /dashboard off
space-y-8andgap-4 lg:grid-cols-2, which is the cramped-layout half of this report.What was left is the last card grid still off that rhythm: the admin dashboard's four stat tiles were
gap-4, so they sat 16px apart, a third closer than the Datasets and Recent Activity cards directly below them. Aligned togap-6(measured 16px -> 24px). The tiles moved into a purestats_gridalongside the existingdatasets_card, and the /dashboard "Your Applications" grid intodashboard_apps_grid, so both card containers are unit-testable instead of being buried in an async handler.Nothing enforced the rhythm mechanically, which is how one grid drifted and stayed drifted.
views::ui::assert_cards_are_spacedis the guard: it walks rendered markup, and fails when a container of two or more sibling cards declares nogap-6/space-y-6(cards whose 1px borders touch are exactly what reads as a one-or-two-pixel overlap), or when a card carries a negative margin that pulls it over its neighbour. Applied to the /dashboard application grid, the admin stat grid,admin_block_grid, and the onboarding step stack; two should_panic tests prove the guard rejects both failure shapes rather than passing vacuously.Card containers swept across bunyip-web: every authenticated stack (/dashboard, /applications, /membership, /settings, the 2FA flows, onboarding, and all eleven admin screens) is
space-y-6; every authenticated grid isgap-6after this change. Single-card pages and the fixed feedback launcher have no sibling to overlap. The public marketing pages keep their own wider rhythm (gap-8on pricing and the apps strip) and are out of scope here.#BUNYIP-367