Replay view transitions on browser Back/Forward #7698
KurtGokhan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What
Today a view transition only plays when a navigation goes through the router —
<Link viewTransition>ornavigate({ viewTransition }). When the user presses the browser's Back/Forward buttons, the same navigation plays a hard cut instead of the transition.I'd like an opt-in that replays the transition an entry was created with whenever the user traverses to it, so the animation is symmetric: a transition opted into on
A → Bplays on bothB → A(back) and a laterA → B(forward).Why
A → Bvia aLink, then hard-cut when the user hits Back to return. Users notice the inconsistency.defaultViewTransitionis all-or-nothing. The only way to animate traversals today is to turn on transitions for every navigation. There's no way to opt one flow in and have it round-trip.Open questions
defaultViewTransition?Prototype
Implementation, tests, and a runnable example are in #7697. Feedback on the direction and the two questions above would be very welcome before it moves forward.
Beta Was this translation helpful? Give feedback.
All reactions