refactor: replace hard-coded colors with semantic theme colors#26
refactor: replace hard-coded colors with semantic theme colors#26jezweb wants to merge 1 commit intoifindev:mainfrom
Conversation
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.
|
Warning Rate limit exceeded@jezweb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 53 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Replaces hard-coded Tailwind color classes with shadcn/ui semantic theme colors for better dark mode support and maintainability.
Changes
todo-card.tsx
text-gray-500/text-gray-400/text-gray-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/text-gray-500/text-gray-400→text-muted-foreground(with opacity variants)What Stayed the Same
Priority and status badge colors (
bg-green-100,bg-yellow-100,bg-red-100, etc.) were intentionally kept as they're functional semantic indicators:These are data visualization colors, not UI theme colors.
Benefits
✅ Theme-aware: Colors automatically adapt to light/dark mode
✅ Consistent: Uses shadcn/ui semantic color system
✅ Maintainable: Change entire theme by editing CSS variables in one place
✅ Professional: Avoids arbitrary hard-coded color choices
Before vs After
Before (hard-coded):
After (semantic):
Semantic Colors Used
text-muted-foreground- Subtle/secondary texttext-muted-foreground/70- Even more subtle (70% opacity)text-muted-foreground/40- Very subtle (40% opacity for emoji)text-primary- Primary accent colortext-destructive- Error/warning statesTesting
Part of UX improvement phase to follow shadcn/ui best practices.