svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.29k stars 63 forks source link

Slow UI rendering #482

Closed cvelasco88 closed 9 months ago

cvelasco88 commented 9 months ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

I have a simple html on the layout (it can be on the page the same), and during some ms it doesn't load the styles, so it glitches the loading of the website

https://youtu.be/ADwgf3reHTE

In which browser(s) did the problem occur?

No response

Steps To Reproduce

Make a simple html Use the Svelte UI Beta components (Button for example) refresh the website

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Relevant Assets

https://youtu.be/ADwgf3reHTE

cvelasco88 commented 9 months ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

I have a simple html on the layout (it can be on the page the same), and during some ms it doesn't load the styles, so it glitches the loading of the website

https://youtu.be/ADwgf3reHTE

In which browser(s) did the problem occur?

No response

Steps To Reproduce

Make a simple html Use the Svelte UI Beta components (Button for example) refresh the website

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Relevant Assets

https://youtu.be/ADwgf3reHTE

I've been checking the issue deeper. Maybe is related to Vite https://github.com/vitejs/vite/issues/7608

My impression is that it's related to this late styles update. Maybe you can investigate more about image

BeeMargarida commented 9 months ago

This is related to the SSR setup we have, see here. Basically we need to inject our CSS when the page is being built and not only when it's passed to the client. We are in the process of moving away from our style solution, so this will change in the near future.