feat: add global theme toggle and fix light mode consistency #1655
Conversation
|
@bhavyanjain3004 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
This PR has merge conflicts with |
…lic profile and all non-dashboard pages - Add ThemeToggle to AppNavbar desktop nav and mobile menu - Conditionally hidden on /dashboard/* routes where DashboardHeader already provides it - Ensures unauthenticated visitors on /u/:username can toggle dark/light mode - Theme preference persisted to localStorage via existing ThemeContext E2E test coverage: - Add 'public profile page theme toggle works without authentication' test in theme.spec.js - Scope contribution graph range button click to #contribution-activity (strict mode fix) - Fix notifications spec: use correct NEXTAUTH_SECRET and proper mock shapes - Fix theme spec: use .first() selector to handle multiple ThemeToggle instances Closes Priyanshu-byte-coder#964
- Replaced hardcoded #050505 background with var(--background) in globals.css for the landing page - Swapped hardcoded dark theme colors (borders, text, backgrounds) in LandingPage.tsx to use CSS variables from globals.css - Updated AppNavbar scrolled state and mobile menu background to use color-mix with var(--background) instead of hardcoded rgba dark colors This ensures that when a user switches to light mode, the landing page and navbar fully respect the theme.
- Removed forced 'dark' class from the global Footer - Replaced hardcoded #e8e8e8 and white text with var(--foreground) - Replaced hardcoded #9ca3af with var(--muted-foreground) This fixes the issue where the footer was stuck in dark mode on some pages or had invisible white-on-white text on the landing page in light mode.
15a7d99 to
ad32ade
Compare
ad32ade to
cf9e274
Compare
|
merge conflict are now solved. it can be re viewed. |
5667faa
into
Priyanshu-byte-coder:main
|
🎉 Merged! Thanks for contributing to DevTrack. If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers. Keep an eye on open issues for your next contribution! |
Description
Fixes #964 by adding a theme toggle to the public profile page and fixing light mode across the app.
Key Changes:
<ThemeToggle />to the globalAppNavbarso it's accessible on public profiles and the landing page.var(--background),var(--foreground)) in the Navbar, Landing Page, and Footer so light mode is fully supported.LandingNavandLandingFootercomponents.