fix(client): dashboard hover controls, card widths and font sizes
Reorder controls stayed visible after a click. The reveal used `:focus-within`, and clicking a button leaves it focused, so that card's controls stayed pinned open long after the pointer left — Failed checks being wherever focus happened to land. Now `:has(:focus-visible)`, which matches keyboard focus only, so a mouse click no longer pins them. Widths: Currently down was full-width and Recent incidents 8-wide, both with more whitespace than content. Currently down carries six columns per row so it is the densest card, but it does not need all twelve; it is now 8. Recent incidents carries four and is now 4, as are Recent errors. Declaring a narrower width is not enough on its own: a card left alone in a row gets stretched to fill it, so Currently down at 8 still rendered at 12 while it was the only card in its row. Registry and default order are now sequenced so widths pair into full rows — 8 beside 4, 6 beside 6 — which is what actually makes the narrow cards render narrow. Verified across the full catalogue, the non-admin subset and the defaults: every mid-page row fills exactly 12 with no gaps. Fonts: every secondary line used typographyLevels.s, which is 11px — body2, a de-emphasis size. The theme's body1 is 13px, so all 24 uses are now typographyLevels.m. Nothing in a card renders below body size any more; only the large figures differ, at xxl. Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
This commit is contained in:
1 parent
49af07009d
commit
c46ead515b
15 files changed
+52
-39
No files matched your search
@@ -24,7 +24,10 @@ import type { CardDefinition, CardId } from "./cards";
|
||||
// Declared width is the minimum number of columns a card needs. The grid may
|
||||
// stretch the last card of a short row; nothing here is a user setting.
|
||||
//
|
||||
// Order is the order the picker lists them in, grouped by sidebar section.
|
||||
// Order is the render order, and the order the picker lists them in. Cards are
|
||||
// sequenced so their declared widths pair into full rows: a card left alone in
|
||||
// a row gets stretched to fill it, so an 8-wide card is kept next to a 4-wide
|
||||
// one rather than being widened back to 12.
|
||||
export const CARD_REGISTRY: CardDefinition[] = [
|
||||
{
|
||||
id: "monitorStatus",
|
||||
@@ -37,9 +40,18 @@ export const CARD_REGISTRY: CardDefinition[] = [
|
||||
id: "currentlyDown",
|
||||
key: "currentlyDown",
|
||||
group: "uptime",
|
||||
width: 12,
|
||||
// Six columns per row — the densest card — but it does not need the
|
||||
// full width, and 8 leaves room for a 4-wide card beside it.
|
||||
width: 8,
|
||||
component: CurrentlyDownCard,
|
||||
},
|
||||
{
|
||||
id: "failedChecks",
|
||||
key: "failedChecks",
|
||||
group: "checks",
|
||||
width: 4,
|
||||
component: FailedChecksCard,
|
||||
},
|
||||
{
|
||||
id: "slowestMonitors",
|
||||
key: "slowestMonitors",
|
||||
@@ -79,7 +91,7 @@ export const CARD_REGISTRY: CardDefinition[] = [
|
||||
id: "recentIncidents",
|
||||
key: "recentIncidents",
|
||||
group: "incidents",
|
||||
width: 8,
|
||||
width: 4,
|
||||
component: RecentIncidentsCard,
|
||||
},
|
||||
{
|
||||
@@ -110,13 +122,6 @@ export const CARD_REGISTRY: CardDefinition[] = [
|
||||
width: 4,
|
||||
component: StatusPagesCard,
|
||||
},
|
||||
{
|
||||
id: "failedChecks",
|
||||
key: "failedChecks",
|
||||
group: "checks",
|
||||
width: 4,
|
||||
component: FailedChecksCard,
|
||||
},
|
||||
{
|
||||
id: "checkmateServer",
|
||||
key: "checkmateServer",
|
||||
@@ -137,7 +142,7 @@ export const CARD_REGISTRY: CardDefinition[] = [
|
||||
id: "recentErrors",
|
||||
key: "recentErrors",
|
||||
group: "logs",
|
||||
width: 6,
|
||||
width: 4,
|
||||
adminOnly: true,
|
||||
component: RecentErrorsCard,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user