Skip to content

Commit 79c1b33

Browse files
petervachonclaude
authored andcommitted
fix(apollo-vertex): scope dashboard card padding to a dedicated variant
Previously this PR added `gap-6 py-6` to the base `cardVariants` class, which made every Card consumer in the codebase get 24px vertical padding by default. metric-card already provides its own inner `p-6`, so metric cards rendered with stacked padding — a visual regression. Move the dashboard-specific rhythm to a `variant="dashboard"` option on cardVariants. Dashboard cards can opt in; other Card consumers (metric-card, queue cards, comms cards, etc.) keep their previous behavior. Addresses review feedback on #730. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 13851ca commit 79c1b33

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • apps/apollo-vertex/registry/card

apps/apollo-vertex/registry/card/card.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ export const GLASS_CLASSES = [
1010
"dark:shadow-[0_2px_24px_2px_rgba(0,0,0,0.12),inset_0_1px_0_0_color-mix(in_srgb,var(--sidebar)_5%,transparent)]",
1111
] as const;
1212

13-
const cardVariants = cva("flex flex-col gap-6 py-6 text-card-foreground", {
13+
const cardVariants = cva("flex flex-col text-card-foreground", {
1414
variants: {
1515
variant: {
1616
default: GLASS_CLASSES,
1717
solid: "bg-card rounded-xl border",
1818
glass: GLASS_CLASSES,
19+
// Dashboard cards have a consistent inner rhythm — gap between
20+
// sections + outer vertical padding — that other Card consumers
21+
// (metric-card, queue cards, comms cards, etc.) don't want.
22+
// Opt in with variant="dashboard"; everything else stays unaffected.
23+
dashboard: [...GLASS_CLASSES, "gap-6 py-6"],
1924
},
2025
},
2126
defaultVariants: {

0 commit comments

Comments
 (0)