-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat: support view transitions #1207
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
1f3aefc
to
8a87982
Compare
8a87982
to
95d4437
Compare
95d4437
to
11d5c27
Compare
packages/waku/src/router/client.ts
Outdated
}); | ||
}; | ||
|
||
if ('startViewTransition' in document && !skipRefetch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need skipRefetch
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took over conditions to not start the transition if it wouldn't change anything, but that's completely wrong here.
I'm struggling to resolve the one remaining issue: When clicking a broken link, we fall back to loading the RSC payload for 404 pages here: waku/packages/waku/src/router/client.ts Line 470 in b9031fe
I stepped through the debugger. The 404 data is there, and for the remaining process it should be the same as a regular route change. But for some reason we eventually end up here: waku/packages/waku/src/minimal/client.ts Line 280 in b9031fe
|
7784f9a
to
2e1bd24
Compare
More findings: It seems like react rendering continues while |
Adjust the client side router to use
startViewTransition
if available and provide and example.Does not work in Firefox, since it does not support that API yet.
Also there is no automated test since I really have no idea how to test that.