feat(view-transitions): implement View Transition API for smoother pa…#12276
feat(view-transitions): implement View Transition API for smoother pa…#12276soheilnikroo wants to merge 1 commit into
Conversation
…ge navigation - Added support for the View Transition API to enable animated transitions between routes during client-side navigation. - Updated `PendingNavigation` to utilize the new API, allowing for smoother visual transitions. - Introduced `viewTransitionUtils` for managing view transitions and added corresponding CSS for animations. - Added documentation and a guide on how to enable and customize view transitions in the Docusaurus configuration. - Updated tests to cover new functionality and ensure proper behavior of view transitions. This feature is experimental and can be enabled via the `experimental_viewTransitions` flag in the configuration.
|
Hi @soheilnikroo! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
…ge navigation
PendingNavigationto utilize the new API, allowing for smoother visual transitions.viewTransitionUtilsfor managing view transitions and added corresponding CSS for animations.This feature is experimental and can be enabled via the
experimental_viewTransitionsflag in the configuration.Pre-flight checklist
Motivation
View Transitions improve SPA navigation UX. Client modules can't implement this because
onRouteUpdatefires before the DOM swap.PendingNavigationalready keeps the previous route mounted during preload — this PR wraps the final commit instartViewTransition()+flushSync().#12223
Test Plan
viewTransitionUtils(8 tests)@docusaurus/corebuilds successfullyprefers-reduced-motion: reduceTest links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs