-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
View Transitions - transition not coming through once deployed #7956
Comments
Can you provide a minimal reproduction? Don't see how deployment could affect things. Does this happen locally with preview? |
Hi @matthewp I think this should do:
When running "vercel dev" on the project, I can seem to reproduce it, when running "npm run dev" (so "astro dev"), I can't. |
@thomasledoux1 thanks, and just to reiterate, you don't see these issues in dev? |
Seems to be working fine there. If you open the StackBlitz you can see it
works as expected, when you open the Vercel link, it doesn't.
|
Here's where the transitions are used: https://github.com/search?q=repo%3Athomasledoux1%2Fgithub-1bim5r-x9eb3b%20transition%3Aname&type=code just a side note, the |
Yes it is indeed.
And good point, will take that into account!
|
After navigating some pages on the vercel app, there are multiple instances of the event handler. Looks like copies of the script are loaded/executed multiple times. Chrome also shows strange source code positions for the handlers. |
@martrapp Ah, I was wondering why that weird double-loading thing was happening that a lot of people ran into. That explains it perfectly. We'll probably need to prevent re-execution of scripts, but I'll have to think about how to do so. |
PR is up: #8033 |
Hi @matthewp , I still seem to be encountering the problem where I don't see the transitions on specific elements once deployed. When using "npm run dev", all works fine, I see the image on my blog overview transition to the blog detail when clicking through. But once deployed (to both Netlify & Vercel), I don't see the transition on the images at all. I do see the transition between the pages though. |
@martrapp Here's my deployed site url. |
Hi @satnaing, the problem on the deployed site was a bug I introduced in 3.0.13 and fixed in 3.1.0. |
@martrapp for me at least this didn't solve it. https://website-thomas-astro-git-feature-vt-thomasledoux1.vercel.app/blog is now running on 3.1.0 and no difference. |
@thomasledoux1 I can confirm that your problem is of a different nature. On your /blog page with the cards, the images do not have a view-transition-name, although you have set the transition:name correctly. It works with |
@martrapp Thanks! |
@martrapp I don't think it's linked to the Image component either, because I tried to switch it up to put the VT on the title of the blog instead, but that doesn't work either. |
@martrapp @matthewp I upgraded to the latest version which contains the fix for #8392, but the issue persists for me.. Link above still valid, now contains latest version of Astro. tags get a "data-astro-transition-scope", but the CSS on the page doesn't include a transition-name for that data attribute. |
@thomasledoux1 can you file a new issue? |
What version of
astro
are you using?2.10.1
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Chrome 115.0.5790.114
Describe the Bug
When running my site in development mode, I can see the transitions on the titles of my blog posts working fine. When you click a preview of a blog post on the blog overview, the title should be transitioned to the title at the top of the blog detail page.
Once deployed, this does not seem to work though.
Not sure what's going wrong here.
Can be reproduced by going to /blog and clicking on 1 of the previews there.
Source code: https://github.com/thomasledoux1/website-thomas-astro/tree/feature/view-transitions
Deployed URL: https://website-thomas-astro-git-feature-view-transitions-thomasledoux1.vercel.app/blog
What's the expected result?
The transition to also work when deployed.
Link to Minimal Reproducible Example
https://github.com/thomasledoux1/website-thomas-astro/tree/feature/view-transitions
Participation
The text was updated successfully, but these errors were encountered: