From 833d5673eb7e6d48d1c9fe6c7a4a95b632757529 Mon Sep 17 00:00:00 2001
From: syntaxbullet
Date: Tue, 8 Sep 2026 15:42:47 +0200
Subject: [PATCH] Refactor HabitColorPicker to use HABIT_COLOR_CHOICES, update
styles and tests
- Replaced HABIT_PALETTES with HABIT_COLOR_CHOICES in HabitColorPicker component and related tests.
- Adjusted the layout and styles of the color picker for improved usability.
- Updated tests to reflect changes in color selection logic.
- Modified WorkspacePanel and SettingRow components to allow optional eyebrow and description props.
- Enhanced accessibility tests for calendar navigation.
- Updated calendar model to include a 1-month view option.
- Refined styles across various components for consistency and improved responsiveness.
---
src/components/AccountSettings.tsx | 8 +-
src/components/ArchivedHabits.tsx | 2 +-
src/components/HabitForm.test.tsx | 32 ++---
src/components/HabitForm.tsx | 47 +------
src/components/HabitHistory.tsx | 2 +-
src/components/InlineHabitEditor.tsx | 7 +-
src/components/InlineItemForm.tsx | 6 +-
src/components/InlineTaskEditor.tsx | 4 +-
src/components/LiveDiscordShare.tsx | 4 +-
src/components/ReminderSettings.tsx | 4 +-
src/components/ShareProgress.tsx | 10 +-
src/components/ThemeProvider.tsx | 4 +-
.../design-system/CalendarHeatmap.tsx | 5 +-
src/components/design-system/HabitChart.tsx | 2 +-
.../design-system/HabitColorPicker.test.ts | 11 +-
.../design-system/HabitColorPicker.tsx | 70 +++-------
.../design-system/WorkspacePanel.tsx | 4 +-
.../design-system/accessibility.test.tsx | 4 +-
.../design-system/calendar-model.test.ts | 5 +-
.../design-system/calendar-model.ts | 2 +-
src/components/design-system/primitives.tsx | 4 +-
src/lib/habit-palette.test.ts | 4 +-
styles/design-system.css | 127 +++++++++++-------
styles/live-discord.css | 22 +--
24 files changed, 175 insertions(+), 215 deletions(-)
diff --git a/src/components/AccountSettings.tsx b/src/components/AccountSettings.tsx
index de34dfa..4ef924f 100644
--- a/src/components/AccountSettings.tsx
+++ b/src/components/AccountSettings.tsx
@@ -24,9 +24,9 @@ export function AccountSettings({ user, onChanged, onClose }: { user: PublicUser
catch (error) { setError(error instanceof Error ? error.message : "Could not save. Try again."); }
finally { saving.current = false; setBusy(false); }
}
- return
- Follow your device or choose a theme for this browser.
}>
- Your timezone sets the start and end of each day. Earlier deadlines stay as recorded.}>
+ return
+
+ Sets day boundaries. Earlier deadlines stay unchanged.}>
- Take your profile, habits, history, and sharing records with you. Sessions and credentials are excluded.}>
+ Download your profile, habits, and history.}>
Export my dataJSON file
Permanently remove your account and habit history, and sign out every device.}>
diff --git a/src/components/ArchivedHabits.tsx b/src/components/ArchivedHabits.tsx
index 9c0cbbb..0952382 100644
--- a/src/components/ArchivedHabits.tsx
+++ b/src/components/ArchivedHabits.tsx
@@ -56,7 +56,7 @@ export function ArchivedHabits({ date, revision, onChanged, onExpired, onClose }
setDeleteError(message); if (message.includes("session has expired")) expired.current();
} finally { saving.current = false; setBusy(false); }
}
- return
+ return