From 37f922af9733ab0b09be0ffdf0b4e7b7f0cc741a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 8 Oct 2026 20:20:03 +0200 Subject: [PATCH] Fix settings field rows, defaults and narrow layouts Module rows drop the field-label colon and inset, the reminder number fields align, target defaults print at their own precision, the appointment offer wraps instead of squeezing to one word per line, the export format legend matches its neighbour label, and the profile-photo explainer reads as body text. --- .../__tests__/password-card-placement.test.tsx | 2 +- .../__tests__/thresholds-editor-glucose-unit.test.tsx | 9 +++++++++ .../settings/account-section/avatar-section.tsx | 4 ++-- src/components/settings/low-stock-card.tsx | 8 ++++---- src/components/settings/module-toggle-row.tsx | 5 ++++- src/components/settings/mood-reminder-card.tsx | 6 +++--- src/components/settings/password-card.tsx | 4 ++-- .../settings/report-selection/report-visit-offer.tsx | 9 ++++++--- .../settings/report-selection/selection-panel.tsx | 2 +- src/components/settings/thresholds-editor-section.tsx | 11 +++++++++-- 10 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/components/settings/__tests__/password-card-placement.test.tsx b/src/components/settings/__tests__/password-card-placement.test.tsx index e08ced3b9..57618e9ff 100644 --- a/src/components/settings/__tests__/password-card-placement.test.tsx +++ b/src/components/settings/__tests__/password-card-placement.test.tsx @@ -113,7 +113,7 @@ describe("change-password card placement", () => { "utf8", ); for (const marker of [ - "settings.passwordReset", + "settings.passwordTitle", "settings.changePassword", "/api/auth/password", // A change-password form is the pair current + new. The Account form diff --git a/src/components/settings/__tests__/thresholds-editor-glucose-unit.test.tsx b/src/components/settings/__tests__/thresholds-editor-glucose-unit.test.tsx index 362d029b6..134ed4e60 100644 --- a/src/components/settings/__tests__/thresholds-editor-glucose-unit.test.tsx +++ b/src/components/settings/__tests__/thresholds-editor-glucose-unit.test.tsx @@ -73,4 +73,13 @@ describe(" glucose unit", () => { expect(html).toContain('value="72"'); expect(html).toContain('min="40"'); }); + + it("prints a whole-number default without a trailing .0", () => { + // A bound reads at its own precision: the fixed one decimal printed + // "70.0–99.0 mg/dL" and "8,000.0–15,000.0 steps". + authUser.current = { glucoseUnit: "mg/dL", unitPreference: "metric" }; + const html = render(); + expect(html).toMatch(/70–99 mg\/dL/); + expect(html).not.toMatch(/70\.0–99\.0/); + }); }); diff --git a/src/components/settings/account-section/avatar-section.tsx b/src/components/settings/account-section/avatar-section.tsx index 2ed7576a1..1da325672 100644 --- a/src/components/settings/account-section/avatar-section.tsx +++ b/src/components/settings/account-section/avatar-section.tsx @@ -114,7 +114,7 @@ export function AvatarSection() { Two strings rather than one merged key: the same wording is the upload's own constraint copy, and a translator keeps the shorter unit either way. */} -

+

{t("settings.avatar.description")} {t("settings.avatar.hint")}

@@ -171,7 +171,7 @@ export function AvatarSection() { {msg && (

diff --git a/src/components/settings/low-stock-card.tsx b/src/components/settings/low-stock-card.tsx index df910d221..d6a49c46e 100644 --- a/src/components/settings/low-stock-card.tsx +++ b/src/components/settings/low-stock-card.tsx @@ -244,7 +244,7 @@ export function LowStockCard({ />

{t("notifications.lowStock.detail")}

{enabled && ( -
+
@@ -254,7 +254,7 @@ export function LowStockCard({ inputMode="numeric" min={MIN_DAYS} max={MAX_DAYS} - className="w-auto" + className="w-24 text-right tabular-nums" value={draft ?? String(days)} disabled={!isAuthenticated || saving} onChange={(e) => setDraft(e.target.value)} @@ -275,7 +275,7 @@ export function LowStockCard({ own supply tab. */} {enabled && (
-
+
@@ -285,7 +285,7 @@ export function LowStockCard({ inputMode="numeric" min={MIN_LEAD} max={MAX_LEAD} - className="w-auto" + className="w-24 text-right tabular-nums" value={leadDraft ?? String(leadDays)} disabled={!isAuthenticated || saving} onChange={(e) => setLeadDraft(e.target.value)} diff --git a/src/components/settings/module-toggle-row.tsx b/src/components/settings/module-toggle-row.tsx index 912739990..557fa074b 100644 --- a/src/components/settings/module-toggle-row.tsx +++ b/src/components/settings/module-toggle-row.tsx @@ -98,7 +98,10 @@ export function ModuleToggleRow({ aria-hidden="true" />
-