Use style color instead of hardcoding white#985
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a derived ChangesAction Bar Icon Color Theming
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
292224a to
f8866c2
Compare
f8866c2 to
f03527c
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/data/stores/theme.ts`:
- Line 71: The derived selector actionBarColor can throw if intermediate objects
are undefined; update its accessor to safely optional-chain the intermediate
property (use $s?.['ui.bar.action']?.['color'] ?? 'inherit' inside the derived
callback so the lookup won't throw when ui.bar.action is missing), keeping the
same derived(s, ($s) => ...) structure and default 'inherit'.
In `@src/routes/lexicon/`+layout.svelte:
- Line 8: The lexicon top-bar title still uses the hardcoded CSS class
"text-white", which breaks themed text color; locate the title element(s) in
+layout.svelte (the elements mentioned around the lexicon title and the lines
flagged) and remove the "text-white" class, instead bind the color to the
existing actionBarColor store (e.g. replace the hardcoded class with a class or
style that uses $actionBarColor) so the title text follows the same theme as the
icons; ensure all occurrences (the title and the other elements referenced
around the same block) are updated consistently.
🪄 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: 9371c3c9-7ed4-44f8-acf6-186458c461d8
📒 Files selected for processing (17)
src/lib/components/BookSelector.sveltesrc/lib/components/ChapterSelector.sveltesrc/lib/components/Navbar.sveltesrc/lib/components/SortMenu.sveltesrc/lib/components/TabsMenu.sveltesrc/lib/data/stores/theme.tssrc/routes/bookmarks/+page.sveltesrc/routes/contents/[id]/+page.sveltesrc/routes/highlights/+page.sveltesrc/routes/history/+page.sveltesrc/routes/image/+page.sveltesrc/routes/image/upload/+page.sveltesrc/routes/lexicon/+layout.sveltesrc/routes/notes/+page.sveltesrc/routes/notes/edit/[noteid]/+page.sveltesrc/routes/quiz/[collection]/[id]/+page.sveltesrc/routes/text/+page.svelte
|
There are issues with the colors when changing themes. |
|
What should I do to review this? Should I test it locally, or just look through the code? |






Fixes #984
Summary by CodeRabbit
New Features
Refactor