Skip to content

fix(ui): fix TabNav appearance in light theme#42

Merged
BenediktSchackenberg merged 1 commit intodevfrom
fix/ui-theme-bugs-40-41
Apr 17, 2026
Merged

fix(ui): fix TabNav appearance in light theme#42
BenediktSchackenberg merged 1 commit intodevfrom
fix/ui-theme-bugs-40-41

Conversation

@BenediktSchackenberg
Copy link
Copy Markdown
Owner

Problem

Dashboard tabs appeared dark even when the light theme was selected (#41).

The TabNav component used bg-white/5 (5% white opacity) which renders as a dark semi-transparent overlay in light mode.

Fix

Replaced with theme-aware CSS classes via .tabnav-container:

  • Dark mode: keeps the original subtle dark background
  • Light mode: uses a visible slate background with readable text colors

Closes #41

TabNav was using bg-white/5 (transparent white) which renders as a
dark semi-transparent overlay in light mode, making tabs hard to see.

Replaced with theme-aware CSS classes:
- Dark mode: keeps the original subtle dark background
- Light mode: uses a visible slate background with readable text colors

Closes #41
Copilot AI review requested due to automatic review settings April 17, 2026 17:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes TabNav styling so the dashboard tabs render appropriately in light theme by moving the container/inactive styling to theme-aware CSS overrides driven by the existing .light-mode root class.

Changes:

  • Add global CSS rules for .tabnav-container and .tabnav-inactive with light-mode overrides.
  • Update TabNav to use the new CSS hook classes instead of bg-white/5 and the previous hover background utility.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/index.css Adds theme-aware TabNav container + inactive hover/text styles, including .light-mode overrides.
frontend/src/components/TabNav.tsx Switches TabNav markup to use .tabnav-container / .tabnav-inactive classes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/index.css
Comment on lines +113 to +115
.tabnav-inactive:hover {
background: rgba(51, 65, 85, 0.5);
}
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says dark mode keeps the original TabNav styling, but the inactive hover background has changed from hover:bg-slate-800/50 (≈ rgba(30,41,59,0.5)) to rgba(51,65,85,0.5) (slate-700). If the goal is to preserve the prior dark-mode appearance, align this value with the previous slate-800/50 (or keep the Tailwind class for dark mode and only override in .light-mode).

Copilot uses AI. Check for mistakes.
active === tab.key
? 'bg-blue-500/20 text-blue-400 shadow-sm'
: 'text-gray-400 hover:text-gray-200 hover:bg-slate-800/50'
: 'tabnav-inactive text-gray-400 hover:text-gray-200'
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabnav-inactive is intended to be theme-aware, but the button still hard-codes dark-mode Tailwind colors (text-gray-400 hover:text-gray-200) in the JSX while light-mode colors live in global CSS. This splits a single concern across two places and makes future styling changes error-prone. Consider moving the default (dark) text/hover colors into the .tabnav-inactive CSS alongside the light-mode overrides, and keep the JSX to structural/spacing classes plus tabnav-inactive.

Suggested change
: 'tabnav-inactive text-gray-400 hover:text-gray-200'
: 'tabnav-inactive'

Copilot uses AI. Check for mistakes.
@BenediktSchackenberg BenediktSchackenberg merged commit 3a65e0d into dev Apr 17, 2026
10 checks passed
@BenediktSchackenberg BenediktSchackenberg deleted the fix/ui-theme-bugs-40-41 branch April 17, 2026 18:20
BenediktSchackenberg added a commit that referenced this pull request Apr 17, 2026
Merge pull request #42 from BenediktSchackenberg/fix/ui-theme-bugs-40-41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants