-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: implement view transition functionality #2175
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
base: v4
Are you sure you want to change the base?
Conversation
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
7ddd4ee to
82abc95
Compare
aarnphm
left a comment
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'm fine with this, maybe cc @jackyzha0 and @saberzero1 on this as well. not really a big fan of animation, but this will break the progress bar logic?
|
@aarnphm I didn't encounter any issues with the progress bar when I tested it using network throttling. If there's something I've missed, please let me know 💪 |
I'm not a fan of the graph flashing white on page transition. Perhaps the transition should be configurable? Both whether it is enabled/disabled and the exact transition. |
8f3e2c1 to
0787a46
Compare
|
I've addressed the mentioned issues and concerns:
Let me know what you think! ✌️ |
Co-authored-by: Aaron Pham <[email protected]>
jackyzha0
left a comment
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.
|
@jackyzha0 The provided implementation is backwards-compatible and has been set up according to an MDN example. I tested the implementation on Firefox 130.0 (released on 3 September 2024) with both view transitions enabled and disabled, and found no issues with fallback behavior. The stack ordering issue has been resolved and the feature is now disabled by default. As the issue occurred even with the feature disabled, this should not affect the review. Additionally, I encountered a pre-existing issue while inspecting the global graph view, whereby the graph overflowed on smaller viewports. I have also addressed this:
|


Description
This pull request implements View Transitions API support for smoother page navigation in Quartz's SPA functionality.
Changes
startViewTransitionutility function inquartz/components/scripts/util.tsthat wraps code execution with the View Transitions API when availablequartz/components/scripts/spa.inline.tsto use view transitions during page morphingquartz/styles/base.scssto disable pointer events during transitionsDetails
The implementation wraps the existing
micromorphdocument body update and related DOM operations within astartViewTransitioncall. This creates smooth, animated transitions between pages when the View Transitions API is supported.For browsers without View Transitions API support, the code gracefully falls back to the original behavior, ensuring backward compatibility.
Rationale
System