Skip to content

feat: implement persistent dark mode toggle in navbar#339

Open
Dev1822 wants to merge 1 commit into
anubhavxdev:mainfrom
Dev1822:feature/dark-mode
Open

feat: implement persistent dark mode toggle in navbar#339
Dev1822 wants to merge 1 commit into
anubhavxdev:mainfrom
Dev1822:feature/dark-mode

Conversation

@Dev1822
Copy link
Copy Markdown

@Dev1822 Dev1822 commented May 27, 2026

📝 Description

**Closes #330 **

This PR introduces full, persistent dark mode support across the Event.One platform, resolving issues with the theme toggle and system preference detection.

🚀 Changes Made

  • Fixed Theme Context Override: Removed the conflicting local darkMode state in App.jsx that was aggressively overriding the global ThemeContext on mount and preventing the theme from persisting.
  • Prevented FOUC (Flash of Unstyled Content): Added a lightweight inline script to the <head> of index.html. This ensures the user's saved preference (or their system's prefers-color-scheme) is applied before the React app mounts, preventing the screen from blinding the user with a flash of light mode on initial load.
  • Navbar Integration: Verified that the ☀️/🌙 toggle in the Navbar (header-2.jsx) correctly hooks into the useTheme context and persists the selection to localStorage.
  • System Preference on First Visit: The app now correctly defaults to the user's system OS theme setting if they have not manually toggled the theme before.

📋 Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have tested the changes locally and they work as expected
  • There are no merge conflicts with the main branch

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@Dev1822 is attempting to deploy a commit to the anubhav12302387's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

❌ PR Format Check — Failed — Please Fix Below

Hi @Dev1822! Please fix the issues below before your PR can proceed to mentor review.

❌ Must Fix Before Proceeding

Issue #330 is not assigned to you (@Dev1822) — You must be assigned to the issue before submitting a PR.

Comment /assign on Issue #330 or ask a maintainer to assign it to you.

⚠️ Warnings (recommended)

⚠️ No testing steps mentioned — Add how reviewers can verify your changes


📋 EventOne PR Guidelines (click to expand)

Title format — Conventional Commits:
feat: · fix: · docs: · style: · refactor: · test: · chore: · perf:

Always link an issue: Closes #number

Use a feature branch — never PR directly from main

Write your own description — AI-generated content = gssoc:ai-slop label

EventOne × GSSoC Pipeline — Stage 1 Automated Check

@github-actions
Copy link
Copy Markdown

👋 Thanks for opening a PR, @Dev1822!

Your PR has entered the 🎯 EventOne GSSoC PR Review Pipeline.

🟢 GSSoC PR detected — your PR will be routed to an approved GSSoC mentor for Stage 2 review.

What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot Title format · Issue link · AI Slop · Branch check
Stage 2 — Mentor Review 🧑‍🏫 GSSoC Mentor Code + Quality Review
Stage 3 — Admin Final Gate 🔑 @anubhavxdev Label check + Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits using git commit -s
  • Link your issue with Closes #123
  • Use a feature branch — not main
  • Avoid unrelated changes in the same PR
  • Write your own description — no AI-generated content

This comment is posted only once.

EventOne × GSSoC Automated Pipeline

@Dev1822 Dev1822 closed this May 27, 2026
@Dev1822 Dev1822 reopened this May 27, 2026
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.

[Feature]: Add Dark Mode toggle with persistent theme preference

1 participant