SyntaxUI/syntaxui

[BUG]: Theme toggle flickering

Closed this issue ยท 9 comments

Description ๐Ÿ“

When attempting to toggle the theme, the interface experiences rapid flickering, reverting back to the original theme almost immediately.

Though it is commented out in the code

Link ๐Ÿ”—

No response

Screenshots ๐Ÿ“ธ

image

I am currently investigating what could be the problem

yeah that's why i commented it out because it was not working and dark mode is not a priority atm.

But if you want to debug it, feel free to do so, as it will definitely help in the future as Dark Mode is in the roadmap

Can I work on this?

Can I work on this?

sure

Can I work on this?

sure

I did end up finding (and probably fixing) what could be causing the theme flickering, but I'm not sure as it seems intentional, because the dark mode hasn't been implemented yet.

where was the issue, can you lmk the file name?

where was the issue, can you lmk the file name?

It seems to be present in in the ThemeWatcher component in app/providers.tsx

The specific code snippet:
if (resolvedTheme === systemTheme) { setTheme('light') }

which seems to force the light theme whenever there's an attempt to change the theme.

that makes sense

I guess I should just let it be then.