DevPath icon indicating copy to clipboard operation
DevPath copied to clipboard

Dark Mode Toggle Button Not Working

Open Auro993 opened this issue 5 months ago • 5 comments

Bug Description

The Dark Mode toggle button (moon icon) in the navbar is not changing the website theme when clicked.

Current Behavior

  • Clicking the moon icon does not switch between light and dark themes.
  • The button is visible and clickable, but no theme change occurs.

Expected Behavior

  • Clicking the moon icon should toggle the application theme between light and dark mode.
  • The selected theme should be applied across the application.

Steps to Reproduce

  1. Open the homepage.
  2. Locate the moon icon in the navbar.
  3. Click the icon.
  4. Observe that the theme does not change.

Possible Cause

  • Theme toggle handler may not be firing.
  • ThemeProvider may not be configured correctly.
  • Theme state may not be updating or persisting.

Environment

  • Browser: Chrome
  • Device: Desktop

Auro993 avatar Jun 10 '26 14:06 Auro993

/assign

Hi @komalharshita , I would like to work on this issue.

Proposed Solution Approach Based on the reported behavior, the issue likely stems from a failure in state management or the theme toggle handler. My plan to debug and fix this is as follows:

Reproduce & Debug: I will first reproduce the issue locally to confirm if the onClick event is firing. I will check the console for any errors and use React DevTools to inspect the theme state.

Verify Handler: I will examine the Navbar component to ensure the moon icon is correctly calling the toggle function.

Check ThemeProvider: I will review the ThemeProvider implementation (likely in App.js or a context wrapper) to ensure it correctly holds the theme state and provides the toggle function to the rest of the application.

Persistent State: If the toggle works but doesn't persist, I will check the localStorage implementation to ensure the theme preference is saved and retrieved correctly on page reload.

Implementation: Apply the fix, verify that the theme class/style updates across the application, and test against both light and dark mode requirements.

Please assign this issue to me so I can get started!

anjalikumari45 avatar Jun 10 '26 14:06 anjalikumari45

I would like to contribute under GSSOC'26

sayan-netizen avatar Jun 10 '26 18:06 sayan-netizen

Hi @komalharshita , I would like to work on this issue under GSSoc'26 . Kindly assign . Thanks !

Satyam2307 avatar Jun 11 '26 07:06 Satyam2307

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Nov 08 '26 06:11 github-actions[bot]

This issue was closed because it has been inactive for an extended period. If this issue is still relevant, feel free to reopen it or create a new one.

github-actions[bot] avatar Nov 15 '26 07:11 github-actions[bot]