-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ViewTransitions animations do not work with Server Islands #12406
Comments
@jonaspm Your repo uses Astro v3 where server components are not supported. Please provide a reproducible example with a supported Astro version. https://astro.build/blog/astro-4120/ |
Hello @jonaspm. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Please reopen, here is the repository, I have forked and updated to latest dependency versions: Repo: https://github.com/jonaspm/spotify-astro-transitions StackBlitz: https://stackblitz.com/~/github.com/jonaspm/spotify-astro-transitions |
Hi @jonaspm 👋🏼, I’m afraid what you’re aiming for can't work. By the time the server islands load, it’s too late for them to participate in the view transition. When using view transitions, you transitioned already to the new page before the first island will load. |
Hi @jonaspm 👋🏼, I close this issue because we can not meet your expectations. The behavior you observe also matches that of server islands in combination with browser-native cross-document view transitions. A HTML element that should participate in view transitions must be present in the DOM when the transition starts. You can't achieve this with server islands. Maybe you can craft a custom solution for your use case by redefining the loader within a listener to the |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Edge
Describe the Bug
ViewTransitions animations do break when server:defer is used.
What's the expected result?
Animations work like in here:
https://spotify-astro-transitions.vercel.app/
Just add server:defer to a component from the example repo and animations won't work.
Link to Minimal Reproducible Example
https://github.com/jonaspm/spotify-astro-transitions
https://stackblitz.com/~/github.com/jonaspm/spotify-astro-transitions
Participation
The text was updated successfully, but these errors were encountered: