From 1f017caee5ea0e1826705e44cbba16b513f0eeec Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Sat, 5 Sep 2026 08:07:55 +0200 Subject: [PATCH] Remove redundant habit copy and document goal layouts --- README.md | 5 +++ src/components/HabitForm.tsx | 3 +- .../design-system/HabitColorPicker.tsx | 12 ++----- .../design-system/accessibility.test.tsx | 2 +- src/pages/Home.tsx | 36 +++++++++---------- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 59545bd..95d944f 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,11 @@ routines on days off; creating a habit or editing one out of today’s schedule it reachable in All habits. Saved calendars expand through **View history**, with historical corrections available inside the expanded view. +Each saved habit uses its own action layout: count goals have a prominent counter +and unit, simple check-ins place the checkbox beside the clickable heading, and +routines show their task list without an accordion. Daily schedule labels and +duplicate progress copy are omitted; days off stay explicit. + Count totals can be typed directly and saved with **Save** or Enter. Escape restores the recorded total; plus and minus remain available. Counts may exceed the target. New habits offer editable Reading, Get outside, and Evening routine starters, with diff --git a/src/components/HabitForm.tsx b/src/components/HabitForm.tsx index 850f25a..176c53d 100644 --- a/src/components/HabitForm.tsx +++ b/src/components/HabitForm.tsx @@ -93,11 +93,10 @@ export function HabitForm({ } return ( - Make it yours.} description="Choose what counts as complete. Your schedule follows your account’s timezone." onClose={onCancel} closeLabel="Close new habit" busy={busy} size="compact" initialFocus="input" returnFocus={() => document.getElementById("add-habit")}> + Make it yours.} description="Schedules follow your account’s timezone." onClose={onCancel} closeLabel="Close new habit" busy={busy} size="compact" initialFocus="input" returnFocus={() => document.getElementById("add-habit")}>
-

Start with an idea, then make it your own.

{STARTERS.map((starter) => ( diff --git a/src/components/design-system/HabitColorPicker.tsx b/src/components/design-system/HabitColorPicker.tsx index 092e66f..9acc8d8 100644 --- a/src/components/design-system/HabitColorPicker.tsx +++ b/src/components/design-system/HabitColorPicker.tsx @@ -40,7 +40,6 @@ export function isHabitColor(value: string) { export function HabitColorPicker({ value, onChange, - mode = "demo", compact = false, }: { value: string; @@ -55,8 +54,8 @@ export function HabitColorPicker({ return (
Habit color -

- {showDetails ? "Choose a suggested shade or enter a custom color for this habit’s calendar." : "Choose a color for your habit."} +

+ Custom colors use six-digit hex values, such as #426582.

{compact && ( <> @@ -156,13 +155,6 @@ export function HabitColorPicker({ 0 → complete
)} -

- {mode === "create" - ? "Saved with your habit." - : mode === "edit" - ? "Save to apply this color; Cancel restores the saved color." - : "Charts preview changes immediately. Save keeps the demo color; Cancel reverts it."} -

{!valid && (
    - {habit.requirements.tasks.map((config) => { - const occurrence = habit.tasks.find((task) => task.taskId === config.id); - return ( - void onUpdate(habit, { done }, config.id)} - onSave={(patch) => onManage(habit, patch, config.id)} - onDelete={() => onManage(habit, null, config.id)} - /> - ); - })} + {habit.requirements.tasks.map((config) => { + const occurrence = habit.tasks.find((task) => task.taskId === config.id); + return ( + void onUpdate(habit, { done }, config.id)} + onSave={(patch) => onManage(habit, patch, config.id)} + onDelete={() => onManage(habit, null, config.id)} + /> + ); + })}
{addingTask && (