From 5109e930973f1a044ec6f20e862bc13704dd3143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 16 May 2026 01:53:56 +0200 Subject: [PATCH] refactor(medications): collapse detail-page chrome to one heading scale Lift the section-header chrome on /medications/[id] to one canonical shape so the page reads as one document. Every section header now uses text-base font-semibold leading-6 tracking-tight via the shared primitive (which keeps the surrounding border-border/60 + px-3 py-2.5 + border-t contract). DrugLevelChart's standalone header migrates to

with the same classes. Sweep micro labels from text-[10px] / text-[11px] to the canonical text-xs scale across SchedulingSection, TitrationSection, SideEffectsSection, and the SideEffects timeline row. The detail page now lives on three sizes: one heading (text-base font-semibold), one body (text-sm), one micro (text-xs). Closes FB-F3 and FB-F4. Restores the FB-F2 row-layout adjustment (fixed-width date slot + line-clamped notes) that an adjacent commit had reverted. --- src/components/medications/DrugLevelChart.tsx | 17 ++++-- .../medications/SchedulingSection.tsx | 8 +-- .../medications/SideEffectsSection.tsx | 55 ++++++++++++------- .../medications/TitrationSection.tsx | 14 ++--- .../medications/medication-detail-section.tsx | 24 +++++--- 5 files changed, 74 insertions(+), 44 deletions(-) diff --git a/src/components/medications/DrugLevelChart.tsx b/src/components/medications/DrugLevelChart.tsx index 2c3e2c63d..22cb388ea 100644 --- a/src/components/medications/DrugLevelChart.tsx +++ b/src/components/medications/DrugLevelChart.tsx @@ -245,12 +245,21 @@ export function DrugLevelChart({ } as const; const body = ( <> + {/* v1.4.28 FB-F3 / F4 — align the standalone chart header to the + canonical `` heading scale so the + full `/medications/[id]` surface reads on one heading shape. + The Activity glyph + drug INN line stay as header chrome on + the right; the heading element is now `

` + canonical + classes to match the surrounding wave-4b sections. */} {!compact && (
-

+

{t("medications.researchMode.chart.title")} -

+

{drugId && ( · {t(`medications.glp1.drug.${drugId}.name`)} @@ -259,9 +268,9 @@ export function DrugLevelChart({ )} {compact && ( -

+

{t("medications.researchMode.chart.title")} -

+

)} {/* Decision tree: diff --git a/src/components/medications/SchedulingSection.tsx b/src/components/medications/SchedulingSection.tsx index 6553e9631..0dd0e1bae 100644 --- a/src/components/medications/SchedulingSection.tsx +++ b/src/components/medications/SchedulingSection.tsx @@ -183,7 +183,7 @@ export function SchedulingSection({ {/* 30-day timeline */}
-

+

{t("medications.scheduling.cadenceViz.title")}

{data.timeline.length === 0 ? ( @@ -232,7 +232,7 @@ export function SchedulingSection({ ); })}
-
+
{(["taken", "skipped", "missed", "upcoming"] as const).map( (s) => ( @@ -254,7 +254,7 @@ export function SchedulingSection({ {/* Compliance chips */}
-

+

{t("medications.scheduling.compliance.title")}

@@ -313,7 +313,7 @@ function ComplianceChip({ label, value, tooltip }: ComplianceChipProps) { title={tooltip} aria-label={`${label}: ${value}. ${tooltip}`} > -

+

{label}

{value}

diff --git a/src/components/medications/SideEffectsSection.tsx b/src/components/medications/SideEffectsSection.tsx index 0aa22425f..32ba14695 100644 --- a/src/components/medications/SideEffectsSection.tsx +++ b/src/components/medications/SideEffectsSection.tsx @@ -269,7 +269,7 @@ export function SideEffectsSection({ medicationId }: SideEffectsSectionProps) { {!isLoading && items.length > 0 && (
-

+

{t("medications.sideEffects.recentTitle")}