dreamonkey / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
1 stars 0 forks source link

Themes get reset and broken on reload (related to SSR) #114

Closed yusufkandemir closed 2 years ago

yusufkandemir commented 2 years ago

Description Clearly and concisely explain the problem. You can mention unclear or missing information, typos, grammatical mistakes, etc. Any contributions and suggestions are welcome!

Go to any page that supports dark mode. Let's use the main docs page.

  1. Select dark or light mode.
  2. Confirm the mode is successfully changed.
  3. Refresh the page.
  4. The UI gets displayed in brand mode, but the state is not(check the theme picker).
  5. If the theme you've picked was the light mode, then some other weird stuff happens. This might indicate that some of the components use a class depending on the mode, some of them might be using another strategy. image

The source of the problem is probably this(because we are using SSR): https://github.com/dreamonkey/quasar/blob/3c4dea8f30833318d25d45f56d8a4804797a8cd6/docs/src/components/landing-page/use-theme.js#L4

Website Section URL Website live preview, paste the page URL or section name (eg. Docs, if it happens on all docs page) below.

Everywhere that supports dark mode, https://quasar.beget.it/docs

IlCallo commented 2 years ago

I think this is due to SSR pollution as you said, will find a way to make it work

IlCallo commented 2 years ago

This should be fixed