#1003 Support new color themes#1065
Conversation
Both Dark and Charcoal are considered dark themes
📝 WalkthroughWalkthroughThis PR adds a ChangesTheme Dark-Mode Detection and Selector UI
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/components/TextAppearanceSelector.svelte`:
- Around line 207-215: The theme selector grid in TextAppearanceSelector.svelte
uses a runtime-built Tailwind class that won’t be generated, so replace the
dynamic grid-cols-{themes.length} usage with a supported approach such as an
inline grid-template-columns style or a fixed set of explicit grid-cols-*
classes. While updating the each block over themes in the selector, also give
each theme button an accessible name by adding an aria-label or visible text so
the controls are screen-reader friendly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 49312107-0402-495f-a5b7-fbbc994321c8
📒 Files selected for processing (7)
src/lib/components/BookTabs.sveltesrc/lib/components/BottomNavigationBar.sveltesrc/lib/components/SelectList.sveltesrc/lib/components/Sidebar.sveltesrc/lib/components/TextAppearanceSelector.sveltesrc/lib/components/TextSelectionToolbar.sveltesrc/lib/data/stores/theme.ts
benpaj-cps
left a comment
There was a problem hiding this comment.
Looks good. The Tailwind docs have a different way of dealing with the dynamic class name issue, but this also works.
This is... exactly what we discussed in Discord about the |
Right. This is also valid, and I just mentioned it for completeness' sake. I didn't look at the URL closely enough to realize that it was the same page lol |
Closes #1003
I know this probably could have been left, but there was a bug in main for any project that had additional color themes specified and the easiest way to fix it was to go ahead and support the other colors.
Summary by CodeRabbit
New Features
Bug Fixes
UI Improvements