Skip to content

feat: add global theme toggle and fix light mode consistency #1655

Merged
Priyanshu-byte-coder merged 5 commits into
Priyanshu-byte-coder:mainfrom
bhavyanjain3004:issue-964
May 31, 2026
Merged

feat: add global theme toggle and fix light mode consistency #1655
Priyanshu-byte-coder merged 5 commits into
Priyanshu-byte-coder:mainfrom
bhavyanjain3004:issue-964

Conversation

@bhavyanjain3004
Copy link
Copy Markdown
Contributor

Description

Fixes #964 by adding a theme toggle to the public profile page and fixing light mode across the app.

Key Changes:

  • Theme Toggle: Added <ThemeToggle /> to the global AppNavbar so it's accessible on public profiles and the landing page.
  • Light Mode Fixes: Replaced hardcoded dark colors with proper CSS variables (var(--background), var(--foreground)) in the Navbar, Landing Page, and Footer so light mode is fully supported.
  • Code Cleanup: Removed redundant LandingNav and LandingFooter components.
  • Tests: Updated Playwright tests to cover the new toggle locations.
Screenshot 2026-05-30 at 6 49 08 PM Screenshot 2026-05-30 at 6 49 37 PM

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@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.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels May 30, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has merge conflicts with main. Please rebase your branch against the latest main and force-push to resolve. Run: git fetch upstream && git rebase upstream/main

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level2 GSSoC Level 2 - Medium complexity (25 points) labels May 31, 2026
…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.
@bhavyanjain3004
Copy link
Copy Markdown
Contributor Author

merge conflict are now solved. it can be re viewed.

@Priyanshu-byte-coder Priyanshu-byte-coder merged commit 5667faa into Priyanshu-byte-coder:main May 31, 2026
10 of 11 checks passed
@github-actions
Copy link
Copy Markdown

🎉 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level2 GSSoC Level 2 - Medium complexity (25 points) type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add dark/light theme toggle on public profile page

2 participants