syntaxui icon indicating copy to clipboard operation
syntaxui copied to clipboard

[BUG]: Theme toggle flickering

Open The-CodeINN opened this issue 1 year ago • 2 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

The-CodeINN avatar May 09 '24 08:05 The-CodeINN

I am currently investigating what could be the problem

The-CodeINN avatar May 09 '24 08:05 The-CodeINN

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

Ansub avatar May 09 '24 08:05 Ansub

Can I work on this?

theaniketnegi avatar May 26 '24 18:05 theaniketnegi

Can I work on this?

sure

Ansub avatar May 27 '24 08:05 Ansub

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.

theaniketnegi avatar May 27 '24 15:05 theaniketnegi

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

Ansub avatar May 28 '24 05:05 Ansub

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.

theaniketnegi avatar May 28 '24 10:05 theaniketnegi

that makes sense

Ansub avatar May 28 '24 14:05 Ansub

I guess I should just let it be then.

theaniketnegi avatar May 28 '24 15:05 theaniketnegi