style: one spacing, title and skeleton language across the app

Icons inside buttons drop their manual margins in favour of the
button's built-in gap (two hundred call sites), form field stacks settle
on one spacing step, card titles on exactly two sizes, inline field
errors on one text size, and a dozen hand-rolled loading pulses move
onto the shared skeleton primitive while keeping their silhouettes. The
intake dialog wording joins the rest of the app on 'übersprungen', and
the UI guidelines now document the two deliberate footer and
touch-target systems.
This commit is contained in:
Marc-André Bombeck committed 2026-06-10 16:54:15 +02:00
1 parent 4ca3de5ff3
commit 04765ea8ac
92 files changed
+1433 -1445

No files matched your search

@@ -121,10 +121,7 @@ describe("pickDefaultMedicationId — auto-select heuristic", () => {
// alphabetically sort and pick the leading id, "ramipril".
const now = new Date("2026-05-12T01:00:00Z"); // 03:00 Berlin
const result = pickDefaultMedicationId(
[
makeMed("z", { name: "Zolpidem" }),
makeMed("r", { name: "Ramipril" }),
],
[makeMed("z", { name: "Zolpidem" }), makeMed("r", { name: "Ramipril" })],
now,
);
expect(result).toBe("r");
@@ -169,10 +166,15 @@ describe("<MedicationIntakeQuickAdd> — SSR contract", () => {
expect(html).toContain(
'data-testid="medication-intake-quick-add-taken-at"',
);
// 44 px touch floor on every interactive field + the footer Save
// button (WCAG 2.5.5). v1.4.37 W10 added the floor to the footer
// buttons; the form fields already carried it.
expect(html.match(/min-h-11/g)?.length ?? 0).toBeGreaterThanOrEqual(3);
// 44 px touch floor (WCAG 2.5.5). The form controls inherit it from
// the Input / SelectTrigger primitives' `h-11 sm:h-10` base — no
// per-call-site `min-h-11` override (which would force 44 px on
// desktop too). The footer buttons keep the explicit
// `min-h-11 sm:min-h-9` floor.
expect(html.match(/h-11/g)?.length ?? 0).toBeGreaterThanOrEqual(3);
expect(
html.match(/min-h-11 sm:min-h-9/g)?.length ?? 0,
).toBeGreaterThanOrEqual(1);
});
it("does not leak raw i18n keys in either locale", () => {
@@ -298,9 +298,9 @@ export function MedicationIntakeQuickAdd({
className="min-h-11 sm:min-h-9"
>
{loading ? (
<Loader2 className="mr-2 h-4 w-4 animate-spin motion-reduce:animate-none" />
<Loader2 className="h-4 w-4 animate-spin motion-reduce:animate-none" />
) : (
<Plus className="mr-2 h-4 w-4" />
<Plus className="h-4 w-4" />
)}
{t("common.save")}
</Button>
@@ -382,7 +382,6 @@ export function MedicationIntakeQuickAdd({
<SelectTrigger
id="medication-intake-medication"
data-testid="medication-intake-quick-add-medication"
className="min-h-11"
>
<SelectValue
placeholder={t(
@@ -427,7 +426,7 @@ export function MedicationIntakeQuickAdd({
t("dashboard.medicationIntakeQuickAdd.dosePlaceholder")
}
autoComplete="off"
className="min-h-11 bg-muted/40"
className="bg-muted/40"
/>
<p className="text-muted-foreground text-xs">
{t("dashboard.medicationIntakeQuickAdd.doseHint")}