mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
fix(ui): card density is a Card prop, and compact is compact on desktop
Nineteen cards spelled the compact tier by hand as gap-2 py-3 md:py-4, which left the base md:gap-6 in place: a compact card opened a 24 px gap between header and body on a desktop. Card takes density="compact" now and pins the gap on both breakpoints; every hand-written compact card, the priority card, the document card and the sample briefing move onto it, and a test refuses the class list on a Card. The precision guard on the steps page now reads rendered text only: the page header's grid template (minmax(0,1fr)) matched its pattern.
This commit is contained in:
1 parent
6885377f35
commit
3cc3829fba
27 files changed
+111
-47
No files matched your search
@@ -181,13 +181,11 @@ describe("assessment presentation contract", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(cardSource).toContain(
|
||||
'className="animate-insight-in gap-2 py-3 md:py-4"',
|
||||
);
|
||||
expect(cardSource).toContain('density="compact"');
|
||||
expect(cardSource).toContain('className="animate-insight-in"');
|
||||
expect(cardSource).toContain('className="text-foreground text-sm"');
|
||||
expect(moodSource).toContain(
|
||||
'className="animate-insight-in gap-2 py-3 md:py-4"',
|
||||
);
|
||||
expect(moodSource).toContain('density="compact"');
|
||||
expect(moodSource).toContain('className="animate-insight-in"');
|
||||
expect(moodSource).toContain('data-slot="insight-assessment"');
|
||||
expect(moodBodySource).toContain(
|
||||
'className="text-foreground mb-2 text-sm"',
|
||||
|
||||
@@ -204,7 +204,7 @@ export default function InsightsBlutdruckPage() {
|
||||
// edge, ~16–24 px left of every neighbouring card's text) — and
|
||||
// foreground, not muted: multi-sentence explainer prose is
|
||||
// content, muted stays reserved for meta.
|
||||
<Card data-slot="bp-derived-caption" className="gap-2 py-3 md:py-4">
|
||||
<Card data-slot="bp-derived-caption" density="compact">
|
||||
<CardContent>
|
||||
<p className="text-sm leading-relaxed">
|
||||
{t("insights.subPage.bpDerived.pulsePressure", {
|
||||
|
||||
@@ -351,11 +351,7 @@ export default function MetricCatalogPage() {
|
||||
// it ever probes for rows, so a module-off account never saw
|
||||
// the in-context enable CTA; this row is the fix).
|
||||
return (
|
||||
<Card
|
||||
key={group}
|
||||
data-slot="catalog-group"
|
||||
className="gap-2 py-3 md:py-4"
|
||||
>
|
||||
<Card key={group} data-slot="catalog-group" density="compact">
|
||||
<CardHeader>
|
||||
<TileHeader
|
||||
icon={Icon}
|
||||
|
||||
@@ -248,7 +248,7 @@ export default function InsightsMedikamentePage() {
|
||||
med.categoryLabel,
|
||||
);
|
||||
return (
|
||||
<Card key={med.id} className="gap-2 py-3 md:py-4">
|
||||
<Card key={med.id} density="compact">
|
||||
<CardHeader>
|
||||
<TileHeader icon={Pill} title={med.name} />
|
||||
<div className="text-muted-foreground mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs">
|
||||
|
||||
Reference in new issue
Block a user