fix: dark mode text colors on Settings page#36
Conversation
The manual `require` declaration collided with jiti's injected `require` when Tailwind loaded the config in production, causing "Identifier 'require' has already been declared".
|
Caution Review failedFailed to post review comments WalkthroughDark-mode text color classes were added to Settings UI headers and LinkManager labels/empty state. Separately, ChangesDark Mode Styling for Settings Pages
Repository and Config Changes
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
🧹 Nitpick comments (1)
resources/js/Components/Settings/LinkManager.tsx (1)
139-139: ⚡ Quick winAdd dark mode color variants to the drag handle for consistency.
The drag handle icon is missing dark mode text color classes. While
text-gray-400has reasonable contrast on dark backgrounds, the hover state (hover:text-gray-600) becomes darker in dark mode, reducing visibility. For consistency with the edit and delete buttons (lines 161, 168) that include dark mode variants, please add dark mode classes.🎨 Proposed fix to add dark mode support
<div {...provided.dragHandleProps} - className="mr-2 cursor-grab text-gray-400 hover:text-gray-600 active:cursor-grabbing" + className="mr-2 cursor-grab text-gray-400 hover:text-gray-600 active:cursor-grabbing dark:text-gray-400 dark:hover:text-gray-300" >🤖 Prompt for 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. In `@resources/js/Components/Settings/LinkManager.tsx` at line 139, The drag-handle element in the LinkManager component uses className="mr-2 cursor-grab text-gray-400 hover:text-gray-600 active:cursor-grabbing" but lacks dark-mode variants; update that className on the drag handle to include matching dark mode classes (for example add dark:text-gray-400 and dark:hover:text-gray-300) so its base and hover colors match the edit/delete buttons' dark variants — locate the className on the drag handle in LinkManager and append the dark:... color classes to the existing string.
🤖 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.
Nitpick comments:
In `@resources/js/Components/Settings/LinkManager.tsx`:
- Line 139: The drag-handle element in the LinkManager component uses
className="mr-2 cursor-grab text-gray-400 hover:text-gray-600
active:cursor-grabbing" but lacks dark-mode variants; update that className on
the drag handle to include matching dark mode classes (for example add
dark:text-gray-400 and dark:hover:text-gray-300) so its base and hover colors
match the edit/delete buttons' dark variants — locate the className on the drag
handle in LinkManager and append the dark:... color classes to the existing
string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b4eeccf9-611c-4324-9cef-f281ec8144e6
📒 Files selected for processing (2)
resources/js/Components/Settings/LinkManager.tsxresources/js/Pages/Admin/Settings/Index.tsx
03de745 to
ecdce0a
Compare
Summary
Pages/Admin/Settings/Index.tsx) only hadtext-gray-800, so it disappeared on a dark background.Components/Settings/LinkManager.tsxwas missing dark variants on the section header, the empty-state copy, and each link's label/URL — making them near-invisible in dark mode.Added matching
dark:text-gray-100/dark:text-gray-400classes alongside the existing light-mode colors.Fixes #31
Test plan
Summary by CodeRabbit