Fix brand mobile nav contrast#3563
Conversation
|
@baseergroot is attempting to deploy a commit to the Dub Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThis PR adds dark mode text color variants to the mobile navigation component. The ChildItem title and description now include dark mode–specific color classes to improve text visibility in dark theme mode. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/ui/src/nav/nav-mobile.tsx (1)
263-267: Consider adding dark mode styling to the icon container.The icon container uses light-mode-only colors (
border-neutral-200,bg-gradient-to-t from-neutral-100). In dark mode, this light background may clash with the dark overlay, reducing the visual polish of the submenu items.♻️ Suggested enhancement for dark mode consistency
<div className={cn( - "flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100", + "flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100 dark:border-white/10 dark:from-white/5", size === "small" && "size-8", )} >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/ui/src/nav/nav-mobile.tsx` around lines 263 - 267, The icon container div in nav-mobile.tsx uses light-only utility classes (className on the div rendering the icon container) and needs dark-mode counterparts; update the className for that div (the element building the icon container in the nav-mobile component) to include appropriate dark: utilities for border and background (e.g., dark:border-..., dark:from-... or dark:from-.../opacity) so the border-neutral-200 and bg-gradient-to-t from-neutral-100 have matching dark-mode styles that keep contrast and polish in dark themes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/ui/src/nav/nav-mobile.tsx`:
- Around line 263-267: The icon container div in nav-mobile.tsx uses light-only
utility classes (className on the div rendering the icon container) and needs
dark-mode counterparts; update the className for that div (the element building
the icon container in the nav-mobile component) to include appropriate dark:
utilities for border and background (e.g., dark:border-..., dark:from-... or
dark:from-.../opacity) so the border-neutral-200 and bg-gradient-to-t
from-neutral-100 have matching dark-mode styles that keep contrast and polish in
dark themes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4313e4e4-7518-4dc7-9e53-ebc14da4a94e
📒 Files selected for processing (1)
packages/ui/src/nav/nav-mobile.tsx
Update: Improve dark-mode contrast for submenu items
Thanks for the review!
This update applies dark-mode text styles to the submenu rows as well, ensuring that the expanded navigation items maintain proper contrast within the dark mobile navigation overlay.
Changes
dark:text-white/90to submenu titlesdark:text-white/70to submenu descriptionsResult
Testing
/brandwith a mobile viewportSummary by CodeRabbit