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

Nuxt 3 only #173

Open
Atinux opened this issue Nov 7, 2022 — with Volta.net · 8 comments
Open

Nuxt 3 only #173

Atinux opened this issue Nov 7, 2022 — with Volta.net · 8 comments
Labels
enhancement New feature or request

Comments

Copy link
Contributor

Atinux commented Nov 7, 2022

I want to take the opportunity to simplify the code base and make it nuxt 3 only with some breaking changes:

  • classSuffix will be '' by default

That's it for now 😃

@Atinux Atinux added the enhancement New feature or request label Nov 7, 2022 — with Volta.net
@P4sca1
Copy link

P4sca1 commented Dec 20, 2022

@Atinux For your planned refactoring: Could you consider bringing back cookie storage, so that we know the user preference during SSR? This is useful to set the correct theme-color header, or to render the correct icon for the color mode menu on the server for example. Otherwise it leads to a flash.
Maybe there could be an option to decide which storage to use.

Also, there is an issue for a while related to the typings, which destroys Nuxt DX. I hope it can be fixed by only using Nuxt 3 syntax. #138

@Atinux
Copy link
Contributor Author

Atinux commented Dec 21, 2022

Thanks for linking as well @P4sca1

We actually add a script in the <head> to update the value of the data-theme and class. This way you should not see any styling issue.

We had some issues with Cookies and Safari on mobile too: #38

When do you have the flash?

@P4sca1
Copy link

P4sca1 commented Dec 21, 2022

E.g. you have theme-color blue for dark mode and white for light mode.
When you reload the page with dark mode enabled, the header in safari (compact mode) will first be white and then switch to blue after the meta value has been updated on the client.
That is, because the server can't know the user preference during SSR and does not know which value to set for the theme-color meta tag.

Copy link
Contributor Author

Atinux commented Dec 21, 2022

I see @P4sca1, are you using a node.js server to run your Nuxt app?

The hard thing is to find a solution that works for all the deployment modes (hybrid for instance)

@P4sca1
Copy link

P4sca1 commented Dec 21, 2022

Yes, I am using a Node.js server to deploy my app. I agree that for some deployments, cookies are not an option. So maybe the storage backend could be configurable in some way.

@cdwmhcc
Copy link

cdwmhcc commented Jan 15, 2023

Any updates?

Copy link
Contributor Author

Atinux commented Jan 16, 2023

@cdwmhcc as soon as I get some time for it.

Copy link
Contributor Author

Atinux commented Feb 2, 2023

But PR welcome ❤️‍🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants