From ecb46992d77e788c2119831a288ba1c195906b8d Mon Sep 17 00:00:00 2001 From: Jez Date: Sat, 8 Nov 2025 15:53:34 +1100 Subject: [PATCH] refactor: replace hard-coded colors with semantic theme colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: - todo-card.tsx: - text-gray-500/400/600 → text-muted-foreground (with opacity variants) - text-blue-600 → text-primary (image badge) - text-red-600 → text-destructive (overdue indicators) - todo-list.page.tsx: - text-gray-600/500/400 → text-muted-foreground (with opacity variants) Benefits: - Theme-aware: Colors adapt to light/dark mode automatically - Consistent: Uses shadcn/ui semantic color system - Maintainable: Change theme by editing CSS variables - Professional: Avoids arbitrary hard-coded colors Note: Priority/status badge colors (green/yellow/red/etc) kept as-is since they're functional semantic indicators, not UI colors. --- src/modules/todos/components/todo-card.tsx | 10 +++++----- src/modules/todos/todo-list.page.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/todos/components/todo-card.tsx b/src/modules/todos/components/todo-card.tsx index 561ba94..db45442 100644 --- a/src/modules/todos/components/todo-card.tsx +++ b/src/modules/todos/components/todo-card.tsx @@ -68,13 +68,13 @@ export function TodoCard({ todo }: TodoCardProps) {

{todo.title}

{todo.description && (

{todo.description}

@@ -120,7 +120,7 @@ export function TodoCard({ todo }: TodoCardProps) { {todo.categoryName} )} {todo.imageUrl && ( - + Image @@ -129,12 +129,12 @@ export function TodoCard({ todo }: TodoCardProps) { {todo.dueDate && (
Due: {formatDate(todo.dueDate)} {isOverdue && ( - + (Overdue) )} diff --git a/src/modules/todos/todo-list.page.tsx b/src/modules/todos/todo-list.page.tsx index 0939b82..e852a33 100644 --- a/src/modules/todos/todo-list.page.tsx +++ b/src/modules/todos/todo-list.page.tsx @@ -13,7 +13,7 @@ export default async function TodoListPage() {

Todos

-

+

Manage your tasks and stay organized

@@ -27,11 +27,11 @@ export default async function TodoListPage() { {todos.length === 0 ? (
-
📝
-

+
📝
+

No todos yet

-

+

Create your first todo to get started