Re: [w3ctag/design-reviews] Cross-document View Transitions API (Issue #851)

Some details to add to @noamr's response.

> What happens when both documents opt in, but there is no JS to customize the transition?

Btw, you can see this in action on a prototype in Chrome by turning on chrome://flags/#view-transition-on-navigation. Transitions occur for any same-origin navigation where both Documents have the meta tag to opt-in. The opt-in syntax aside, transitions work using the same declarative method of adding `view-transition-name`s to elements and the root has a name by default because of UA styles. So if a new Document has the same transition irrespective of the old Document in the navigation, transitions can be done completely declaratively.

> What is the user experience on a very slow connection? We see there is an implementation-defined timeout, we do worry that clicking on a link, then nothing happening, then suddenly a transition could result in jarring user experience.

The old Document remains active and animating until the browser gets a response from the server. For example, when the user clicks a link they usually see some browser UI indicating that the navigation was initiated. The user sees content animating and they can scroll around until the browser receives a response, at which point the old Document is unloaded to be replaced by the new Document.

The flow remains exactly the same until the browser receives a response. But the browser caches a snapshot of the old Document before unloading it (or placing it in BFCache). Then there is a wait to stream in the new Document + sub-resources before the transition can start, which builds on top of [render-blocking](https://html.spec.whatwg.org/#render-blocking-mechanism). Render-blocking already has a timeout associated with it. We don't abort the transition if the timeout is hit for any sub-resource so devs have the option to design their own fallback (one of which can be aborting the transition).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/851#issuecomment-1620584016
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/851/1620584016@github.com>

Received on Tuesday, 4 July 2023 17:55:57 UTC