From b6332a96d912a2fe860449f1b7560b6d24637444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 9 Aug 2026 11:03:43 +0200 Subject: [PATCH 1/6] refactor(ui): route hand-rolled card headers through the shared header primitives Move the last hand-rolled tile and section headers onto TileHeader and SectionHeading so every card speaks one header language: the vorsorge dashboard tile, the three illness cards, the metric-correlation section, and the custom-metric list group. The mood-chart title drops to the primitive semibold weight and its bucket label becomes a TagChip. Align the in-card sub-headings of the integration cards to the one sanctioned section-label tier (muted uppercase eyebrow) instead of a second text-sm font-semibold dialect. Keep the onboarding and mental-health wizard hero H1s at their deliberate semibold weight, now marked inline as an intentional exception so a future heading sweep leaves them alone. --- src/app/onboarding/[step]/page.tsx | 1 + src/components/charts/mood-chart.tsx | 9 ++--- .../custom-metrics/custom-metric-list.tsx | 38 +++++++++---------- .../illness/illness-correlation-card.tsx | 12 +++--- .../illness/illness-day-timeline.tsx | 5 +-- .../illness/illness-insights-card.tsx | 12 +++--- .../insights/metric-correlation-card.tsx | 10 +++-- .../vorsorge-dashboard-card.tsx | 12 +++--- .../mental-health/check-in-wizard.tsx | 1 + src/components/onboarding/baseline-form.tsx | 1 + src/components/onboarding/done-screen.tsx | 1 + .../onboarding/goals-chip-picker.tsx | 1 + .../onboarding/source-card-grid.tsx | 1 + .../onboarding/welcome-carousel.tsx | 1 + .../integrations/apple-health-card.tsx | 4 +- .../settings/integrations/fitbit-card.tsx | 2 +- .../integrations/google-health-card.tsx | 2 +- .../integrations/oauth-provider-card.tsx | 2 +- .../settings/integrations/whoop-card.tsx | 2 +- .../settings/integrations/withings-card.tsx | 2 +- 20 files changed, 64 insertions(+), 55 deletions(-) diff --git a/src/app/onboarding/[step]/page.tsx b/src/app/onboarding/[step]/page.tsx index 393118a6f..14b825d5d 100644 --- a/src/app/onboarding/[step]/page.tsx +++ b/src/app/onboarding/[step]/page.tsx @@ -101,6 +101,7 @@ export default async function OnboardingStepPage({ params }: PageProps) { aria-labelledby="onboarding-welcomeback-title" className="space-y-4" > + {/* Onboarding hero H1: intentionally semibold, not the app-wide bold PageHeader H1 (UI-STANDARDS §5 hero exception). Do not sweep to font-bold. */}

- - {displayTitle} - + {displayTitle} {activeBucket !== "day" && ( - + {t( activeBucket === "week" ? "charts.bucketWeekly" : "charts.bucketMonthly", )} - + )} {/* v1.4.16 B8 — comparison caption (mood). v1.4.19 A2 — hidden on mobile to free up the title row. */} diff --git a/src/components/custom-metrics/custom-metric-list.tsx b/src/components/custom-metrics/custom-metric-list.tsx index 4bc676958..9363e4511 100644 --- a/src/components/custom-metrics/custom-metric-list.tsx +++ b/src/components/custom-metrics/custom-metric-list.tsx @@ -11,6 +11,7 @@ import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { QueryErrorCard } from "@/components/ui/query-error-card"; import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; +import { SectionHeading } from "@/components/ui/section-heading"; import { Skeleton } from "@/components/ui/skeleton"; import { apiGet } from "@/lib/api/api-fetch"; import { formatDate } from "@/lib/format"; @@ -63,26 +64,23 @@ export function CustomMetricList() { className="border-border space-y-3 border-t pt-6" data-slot="custom-metric-list" > -
-
-

- {t("customMetrics.sectionTitle")} -

-

- {t("customMetrics.sectionSubtitle")} -

-
- -
+ setAddOpen(true)} + aria-label={t("customMetrics.add")} + > + + {t("customMetrics.add")} + + } + /> {isLoading ? (