Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark/Light Theme Toggler Not Working... #59

Open
Devanshukoli opened this issue Nov 5, 2024 · 3 comments
Open

Dark/Light Theme Toggler Not Working... #59

Devanshukoli opened this issue Nov 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Devanshukoli
Copy link
Contributor

Devanshukoli commented Nov 5, 2024

Describe the bug

  • So, In Navbar when I click on theme toggler then it's not working properly.

To Reproduce

  • Go to navbar.
  • Then click on Dark/Light theme toggler.

Expected behavior

  • It should switch between Dark/Light theme accordingly.

Screenshots

Recording.2024-11-05.142852.mp4

Desktop (please complete the following information):

  • OS: Window
  • Browser: Edge
  • Version: latest

Additional context

  • I would like to work on this issue. 😃
@MOHAMMED-IQRAMUL MOHAMMED-IQRAMUL added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Nov 5, 2024
@MOHAMMED-IQRAMUL
Copy link
Owner

Great Idea,
You can Work on this,
After Contributing add your details in Contributing/Readme.md

@Devanshukoli
Copy link
Contributor Author

Devanshukoli commented Nov 8, 2024

Hey! so, I have been working on this issue for a while and have debugged quite a lot. And stuck on this:
image

Debugging things

  • Here, I'm correctly able to check if the button is working or not.
  • The Theme Toggler is also changing from dark theme to light theme.

issue still arises.

  • I'm still unable to check on where the breaking changes are occurring.

can you give me few directions on which it might help me.
cc: @MOHAMMED-IQRAMUL

@MOHAMMED-IQRAMUL
Copy link
Owner

MOHAMMED-IQRAMUL commented Nov 9, 2024

@Devanshukoli Hello,

Kindly refer to the following:

Issue #35 : This is where the feature was first implemented. The problem that arose was that the current theme was not loaded from the system's default settings, causing an error.

Issue #38 : This issue was intended to fix the problem mentioned above but introduced some bugs later on.

Additional Context:

  • Review ThemeToggle.js
  • Check localStorage or sessionStorage Usage

For both issues, please ensure:

  • The theme data is correctly stored as a JSON string in local storage.
  • Proper error handling is implemented when reading and parsing the theme data.
  • The theme toggle functionality correctly updates and persists the theme state.
  • By addressing these areas, we can ensure the theme toggle feature works reliably and without errors.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants