From 61001188b7c04a3902bf848548b5c81fe988a3e5 Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Sun, 25 Oct 2026 14:42:39 +0100 Subject: [PATCH] Simplify application copy and improve landing page spacing --- src/App.test.tsx | 6 +- src/components/ArchivedHabits.tsx | 2 +- src/components/CheckInEditor.tsx | 2 +- src/components/CreateHabit.tsx | 19 +---- src/components/DeleteHabit.tsx | 1 - src/components/PwaControls.tsx | 5 +- src/components/ShareProgress.tsx | 5 +- .../design-system/ContainerShowcase.tsx | 21 +++-- .../design-system/EditingWorkbench.tsx | 13 +-- src/components/design-system/PageLayout.tsx | 1 - src/components/design-system/WelcomePanel.tsx | 3 +- src/index.html | 2 +- src/pages/DesignSystem.tsx | 14 ++-- src/pages/Home.tsx | 79 ++++--------------- styles/design-system.css | 7 ++ 15 files changed, 53 insertions(+), 127 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 971ac6e..42d603e 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -255,7 +255,7 @@ describe("homepage", () => { test("signed-out visitors can try progress without calling private habit APIs", async () => { await render("/"); - expect(container.querySelector("h1")?.textContent).toBe("Small steps.Lasting rhythm."); + expect(container.querySelector("h1")?.textContent).toBe("Track your habits"); expect(fetchMock.mock.calls.map(call => call[0])).toEqual(["/api/me"]); await act(async () => buttonNamed("Increase glasses of water").click()); await settleDeferred(); @@ -278,7 +278,7 @@ describe("homepage", () => { let resolve!: (response: Response) => void; fetchMock.mockImplementation(Object.assign(() => new Promise(done => { resolve = done; }), { preconnect: fetch.preconnect })); await render("/"); - expect(container.textContent).toContain("Getting things ready"); + expect(container.textContent).toContain("Loading account"); expect(container.querySelector("#welcome-title")).toBeNull(); await act(async () => resolve(new Response(null, { status: 401 }))); expect(container.querySelector("#welcome-title")).not.toBeNull(); @@ -298,7 +298,7 @@ describe("homepage", () => { const f = connectAccount(); await render("/"); expect(container.textContent).toContain("Welcome back, alice."); - expect(container.textContent).toContain("Start with one habit."); + expect(container.textContent).toContain("No habits yet."); await act(async () => buttonNamed("Add a habit +").click()); await settleDeferred(); const input = container.querySelector("form input")!; diff --git a/src/components/ArchivedHabits.tsx b/src/components/ArchivedHabits.tsx index 4cd0db1..1511165 100644 --- a/src/components/ArchivedHabits.tsx +++ b/src/components/ArchivedHabits.tsx @@ -60,7 +60,7 @@ export function ArchivedHabits({ date, revision, onChanged, onExpired, onClose }
{notice}
{error} {error && } - {loading ?

Loading archive…

: !habits.length &&
} + {loading ?

Loading archive…

: !habits.length &&
}
{habits.map(habit =>
diff --git a/src/components/CheckInEditor.tsx b/src/components/CheckInEditor.tsx index b07c902..848cdee 100644 --- a/src/components/CheckInEditor.tsx +++ b/src/components/CheckInEditor.tsx @@ -40,7 +40,7 @@ export function CheckInEditor({ habitId, date, disabled, onSaved, onExpired, onB } finally { saving.current = false; setBusy(false); onBusyChange?.(false); } } return
-

EDITING CHECK-IN

{formatTrackingDate(date)}

+

{formatTrackingDate(date)}

{error} {!day ? error ? :

Loading check-in…

: day.future ?

Future check-ins cannot be edited.

diff --git a/src/components/CreateHabit.tsx b/src/components/CreateHabit.tsx index fc98222..31010f9 100644 --- a/src/components/CreateHabit.tsx +++ b/src/components/CreateHabit.tsx @@ -114,9 +114,6 @@ export function CreateHabit({ }} >
-

- {editing ? "SHAPE YOUR RHYTHM" : "A LITTLE ROOM FOR SOMETHING GOOD"} -

- {editing ? ( - <> - Edit your habit. - - ) : ( - <> - Make it yours. - - )} + {editing ? "Edit habit" : "Create habit"}

-

- {editing - ? "Changes start today. Earlier targets and schedules stay as they were." - : "Start small. You don’t need a perfect plan."} -

+ {editing &&

Changes apply from today. Earlier history is kept.

}
diff --git a/src/components/DeleteHabit.tsx b/src/components/DeleteHabit.tsx index 3e6a64f..c3e3755 100644 --- a/src/components/DeleteHabit.tsx +++ b/src/components/DeleteHabit.tsx @@ -47,7 +47,6 @@ export function DeleteHabit({ if (!saving.current) onClose(); }} > -

MAKE A LITTLE ROOM

Delete this habit?

diff --git a/src/components/PwaControls.tsx b/src/components/PwaControls.tsx index c2fbfb8..a0e15c6 100644 --- a/src/components/PwaControls.tsx +++ b/src/components/PwaControls.tsx @@ -9,13 +9,12 @@ export function InstallApp() { if (!enabled || installed) return null; return <> - {help && setHelp(false)}> + {help && setHelp(false)}>
-

Open Mina Habits from your home screen or dock.

iPhone or iPad: open the Share menu, then choose Add to Home Screen.

Mac Safari: choose File → Add to Dock.

Chrome or Edge: use the install icon in the address bar, or Install app in the browser menu.

-

Installation options depend on your browser. Your habits still need a connection to load and save.

+

An internet connection is required to load and save habits.

} diff --git a/src/components/ShareProgress.tsx b/src/components/ShareProgress.tsx index 25378c8..0bf3939 100644 --- a/src/components/ShareProgress.tsx +++ b/src/components/ShareProgress.tsx @@ -91,7 +91,6 @@ export function ShareProgress({ user, today, revision, onClose }: { user: Public
{error ?
: ready ? {ready.alt} :
}
-

Your preview matches the shared image.

{ready?.avatarMissing &&

Your avatar couldn’t load. A neutral profile icon is used.

}
@@ -112,13 +111,13 @@ export function ShareProgress({ user, today, revision, onClose }: { user: Public
Discord destination - {connectionError ?

{connectionError}

: connection?.connected ? <>{connection.name}

Posted by the Mina Habits bot.

:

{connection?.message ?? "Loading channel…"}

} + {connectionError ?

{connectionError}

: connection?.connected ? <>{connection.name} :

{connection?.message ?? "Loading channel…"}

}