fix(client): one bar thickness, and every dashboard card half-width
Bars came in two weights — 4px for the plain proportional bar and 8px for the segmented one — so the lines in Monitors by type, Slowest monitors and Lowest uptime were visibly thinner than the one in Monitor status. They sit side by side across cards, so the difference read as an inconsistency rather than as emphasis. There is now a single BAR_HEIGHT of 8 for both. Monitor status and Team members drop to half-width, which makes every card half-width. The grid is now uniform in both dimensions. That also removes the last reason for the stretch rule. A trailing card on an odd-numbered dashboard keeps its declared width instead of being promoted to full: widening one card to fill its row makes it look more important than it is, and an odd count is a property of the selection, not something the layout should paper over. layoutCards is now a straight pass-through, and HALF_WIDTH is gone with the logic that needed it. Verified across the full catalogue, the non-admin subset, the defaults and a single card: no card renders full-width in any configuration. Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
This commit is contained in:
1 parent
74d859b877
commit
8398a0300d
4 files changed
+24
-43
No files matched your search
@@ -2,16 +2,14 @@ import type { ComponentType } from "react";
|
||||
|
||||
// The 12-column grid the dashboard lays cards out on.
|
||||
//
|
||||
// Only two widths exist. Cards are half-width by default and pair up down the
|
||||
// page; a card is full-width only when its content genuinely needs the room,
|
||||
// which makes the wide cards read as a deliberate signal rather than as an
|
||||
// inconsistent grid. Width is declared per card type in code and is never a
|
||||
// user setting.
|
||||
// Every card is currently half-width, so they pair up down the page and the
|
||||
// grid reads as one system. Full width stays in the type for a card whose
|
||||
// content genuinely needs it. Width is declared per card type in code and is
|
||||
// never a user setting.
|
||||
export const CardWidths = [6, 12] as const;
|
||||
export type CardWidth = (typeof CardWidths)[number];
|
||||
|
||||
export const GRID_COLUMNS = 12;
|
||||
export const HALF_WIDTH: CardWidth = 6;
|
||||
|
||||
// Picker groups mirror the sidebar sections: you look for a card where you
|
||||
// look for the feature it belongs to.
|
||||
|
||||
Reference in new issue
Block a user