feat(router): Add feature to support the View Transitions API#51314
feat(router): Add feature to support the View Transitions API#51314atscott wants to merge 2 commits intoangular:mainfrom
Conversation
82c9144 to
68c20e5
Compare
|
Updating risk to medium since the view transition adds a delay to where code was synchronous before. Exact timings in the Router have historically been fragile. It is technically possible to keep the code synchronous if the feature is not enabled, but avoiding "sometimes synchronous, sometimes asynchronous" branch in the code would be ideal. |
4c36be8 to
e813133
Compare
1293543 to
1b9bc6e
Compare
bf34e47 to
f275113
Compare
|
Removing risk label since I ended up going with the sometimes sync, sometimes async behavior so that the default behavior is unchanged. |
e071790 to
0c58b90
Compare
|
TGP shows no failures for the current approach. I ran a quick test to enable view transitions unconditionally and it appears that test failures are generally due to ZoneJS and the fact that it doesn't patch the |
8927fbe to
009b5e3
Compare
jessicajaniuk
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
AndrewKushnir
left a comment
There was a problem hiding this comment.
Looks great, just a few minor comments.
There was a problem hiding this comment.
I'm not sure this is reflected on AIO, should we use @developerPreview instead?
There was a problem hiding this comment.
I'm not sure either but @jelbourn did mention this tag and we believe it's more appropriate given the state of the view transition API in general.
There was a problem hiding this comment.
@jelbourn It does appear that the @experimental tag doesn't show up on AIO (https://ng-dev-previews-fw--pr-angular-angular-51314-y5diongs.web.app/api/router/withViewTransitions)
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
5014f17 to
e8b5d0b
Compare
|
Deployed aio for b3a240f to: https://ng-dev-previews-fw--pr-angular-angular-51314-y5diongs.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
The View Transitions API enables easy animations when transitioning between different DOM states. This commit adds an opt-in feature to the Router which runs the component activation and deactivation logic in the document.startViewTransition callback. If the browser does not support this API, route activation and deactivation will happen synchronously. resolves angular#49401
b822a0e to
c92bcac
Compare
c92bcac to
b3a240f
Compare
|
This PR was merged into the repository by commit 73e4bf2. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…r#51314) The View Transitions API enables easy animations when transitioning between different DOM states. This commit adds an opt-in feature to the Router which runs the component activation and deactivation logic in the document.startViewTransition callback. If the browser does not support this API, route activation and deactivation will happen synchronously. resolves angular#49401 PR Close angular#51314
The View Transitions API enables easy animations when transitioning between different DOM states. This commit adds an opt-in feature to the Router which runs the component activation and deactivation logic in the
document.startViewTransitioncallback. If the browser does not support this API, route activation and deactivation will happen synchronously.resolves #49401