From b6cf715e10a66f64d45a1fb0ce6fe8ae50ff4825 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Jul 2026 09:09:34 +0000 Subject: [PATCH] refactor(mode-home): tighten hero subtitles to a single phone line Shorten every mode-home subtitle to ~30-40 characters so it renders on one line at phone widths. Verified in Chromium at 320/360/390px that each subtitle occupies a single line box. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Gb9jucaNMEQDmRKXEN7SRV --- src/components/applications-launcher-page.tsx | 2 +- .../clinical-dashboard/differentials-home.tsx | 2 +- src/components/clinical-dashboard/favourites-hub.tsx | 2 +- .../medication-prescribing-workspace.tsx | 2 +- src/components/dsm/dsm-home-page.tsx | 2 +- src/components/factsheets/factsheets-home-page.tsx | 2 +- src/components/forms/forms-home-page.tsx | 2 +- src/components/formulation/formulation-home-page.tsx | 2 +- src/components/services/services-home-page.tsx | 2 +- src/components/specifiers/specifiers-home-page.tsx | 2 +- .../therapy-compass/screens/home-screen.tsx | 4 ++-- tests/therapy-compass-data-recovery.dom.test.tsx | 12 +++++------- 12 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/components/applications-launcher-page.tsx b/src/components/applications-launcher-page.tsx index a1d1b5635..5bc8fb10c 100644 --- a/src/components/applications-launcher-page.tsx +++ b/src/components/applications-launcher-page.tsx @@ -107,7 +107,7 @@ function launcherAppsForSession(canAccessFavourites: boolean): LauncherApp[] { const toolsLauncherCopy = { heading: "Tools", - description: "Assessment, prescribing, and clinical workflows.", + description: "Assessment, prescribing, workflows.", allSectionLabel: "All tools", countNoun: "tools", emptyTitle: "No tools match", diff --git a/src/components/clinical-dashboard/differentials-home.tsx b/src/components/clinical-dashboard/differentials-home.tsx index 9c4bb75c4..6018bb029 100644 --- a/src/components/clinical-dashboard/differentials-home.tsx +++ b/src/components/clinical-dashboard/differentials-home.tsx @@ -1267,7 +1267,7 @@ export function DifferentialsHome({ diff --git a/src/components/clinical-dashboard/medication-prescribing-workspace.tsx b/src/components/clinical-dashboard/medication-prescribing-workspace.tsx index 574bcd7d7..fa04f1633 100644 --- a/src/components/clinical-dashboard/medication-prescribing-workspace.tsx +++ b/src/components/clinical-dashboard/medication-prescribing-workspace.tsx @@ -218,7 +218,7 @@ function MedicationHome({ diff --git a/src/components/forms/forms-home-page.tsx b/src/components/forms/forms-home-page.tsx index f3ab30ad6..1ae8febde 100644 --- a/src/components/forms/forms-home-page.tsx +++ b/src/components/forms/forms-home-page.tsx @@ -116,7 +116,7 @@ export function FormsHomePage() { diff --git a/tests/therapy-compass-data-recovery.dom.test.tsx b/tests/therapy-compass-data-recovery.dom.test.tsx index 9e3e9eeee..0fd27ae73 100644 --- a/tests/therapy-compass-data-recovery.dom.test.tsx +++ b/tests/therapy-compass-data-recovery.dom.test.tsx @@ -60,17 +60,15 @@ describe("Therapy Compass required data recovery", () => { expect(await screen.findByRole("status")).toHaveTextContent("Loading therapy library…"); expect(screen.getAllByRole("main")).toHaveLength(1); - expect(screen.queryByText(/Source-grounded therapy records and clinical pathways/)).not.toBeInTheDocument(); + expect(screen.queryByText(/Source-grounded therapy records\./)).not.toBeInTheDocument(); expect(screen.queryByRole("heading", { name: "Therapy" })).not.toBeInTheDocument(); release(undefined); - await waitFor(() => - expect(screen.getByText(/1 source-grounded therapy record and clinical pathways/)).toBeInTheDocument(), - ); + await waitFor(() => expect(screen.getByText(/1 source-grounded therapy record\./)).toBeInTheDocument()); expect(screen.getByRole("heading", { name: "Therapy" })).toBeInTheDocument(); expect(screen.getAllByRole("main")).toHaveLength(1); - expect(screen.queryByText(/Source-grounded therapy records and clinical pathways/)).not.toBeInTheDocument(); + expect(screen.queryByText(/Source-grounded therapy records\./)).not.toBeInTheDocument(); }); it("shows an honest load error, retries all required files, and recovers", async () => { @@ -91,7 +89,7 @@ describe("Therapy Compass required data recovery", () => { ); expect(screen.getByRole("status")).toHaveTextContent("Loading therapy library"); - expect(screen.queryByText(/Source-grounded therapy records and clinical pathways/)).not.toBeInTheDocument(); + expect(screen.queryByText(/Source-grounded therapy records\./)).not.toBeInTheDocument(); expect(screen.queryByRole("heading", { name: "Frequently used therapies" })).not.toBeInTheDocument(); expect(await screen.findByRole("alert")).toHaveTextContent("Therapy Compass could not load"); @@ -101,7 +99,7 @@ describe("Therapy Compass required data recovery", () => { fireEvent.click(screen.getByRole("button", { name: "Retry" })); expect(await screen.findByRole("heading", { name: "Therapy" })).toBeInTheDocument(); - expect(screen.getByText(/1 source-grounded therapy record and clinical pathways/)).toBeInTheDocument(); + expect(screen.getByText(/1 source-grounded therapy record\./)).toBeInTheDocument(); expect(screen.queryByRole("alert")).not.toBeInTheDocument(); await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2)); });