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

Client:only Svelte 4 or 5 component does not remove fallback slot after it loaded #12513

Open
1 task
zenshindm opened this issue Nov 24, 2024 · 3 comments
Open
1 task
Labels
needs triage Issue needs to be triaged

Comments

@zenshindm
Copy link

Astro Info

Astro                    v4.16.5
Node                     v20.15.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/sitemap
                         @astrojs/tailwind
                         @astrojs/svelte
                         @astrojs/partytown

If this issue only occurs in one browser, which browser is a problem?

Chrome

Describe the Bug

https://docs.astro.build/en/reference/directives-reference/#clientonly

according to the docs, you can do fallback slot with client only svelte component

Loading

but the after the component loaded , the fallback "loading" still there

i have test on svelte 4 and 5 , it does not work
but it work on react
see the codesandbox for example

What's the expected result?

i expected the fallback gone after Client Component loaded

Link to Minimal Reproducible Example

https://codesandbox.io/p/devbox/5ts6ky?file=%2Fsrc%2Fcomponents%2FButton.jsx%3A4%2C5

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 24, 2024
@zenshindm zenshindm changed the title Client:only Svelte 4 or 5 component does not have fallback slot Client:only Svelte 4 or 5 component does not remove fallback slot after it loaded Nov 24, 2024
@haltcase
Copy link

I'm seeing this too with a Svelte 5 component. At first I thought it might be because Svelte also uses <slot /> (though deprecated in v5), but I can't reproduce with a Vue component (which also supports <slot />).

@dually8
Copy link

dually8 commented Dec 16, 2024

I'm seeing the same. I've been working in the Astro blog template. I have a toggle button written in Svelte 5 and the fallback isn't being removed on load.

image

@dominiwe
Copy link

I have observed the same issue. Seems this is currently broken entirely for Svelte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants