Intent to Prototype: Detect UA Transitions on same-document Navigations

62 views
Skip to first unread message

Khushal Sagar

unread,
Apr 21, 2023, 7:50:57 PM4/21/23
to blink-dev, Hannah Van Opstal, William Liu

Contact emails

khusha...@google.comliuwi...@google.comhvano...@google.com

Explainer

https://github.com/WICG/view-transitions/blob/main/default-ua-transitions.md

Specification

None

Summary

Smooth visual transitions as users navigate on the web can lower cognitive load by helping users stay in context. However, the user experience is bad if both the site author and the UA add these transitions: the transitions may conflict and cause confusion for the user. This API avoids such cases to ensure only one visual transition is executed at a time. The API adds a boolean on `PopStateEvent` and `NavigateEvent` to indicate whether the UA has executed a visual transition for this navigation. Authors can use this to skip their custom transition.


Blink component

Blink>DefaultNavigationTransitions

Motivation

Smooth visual transitions as users navigate on the web can lower cognitive load by helping users stay in context. It can also provide a visual cue about the destination before initiating the navigation. Both site authors and user-agents (UAs) add visual transitions to their navigations for these use-cases. However, the user experience is bad if both the site author and the UA add these transitions: the transitions may conflict and cause confusion for the user. The goal of this proposal is to avoid such cases to ensure only one visual transition is executed at a time.


Initial public proposal

https://github.com/whatwg/html/issues/8782

TAG review

https://github.com/w3ctag/design-reviews/issues/834

TAG review status

Pending

Risks



Interoperability and Compatibility

This feature is a progressive enhancement. In the absence of the feature, the author has to either conservatively assume there is a UA transition (and not do a custom transition) or risk visual glitches from double transition. As such there is no interop risk.


Gecko: No signal (https://github.com/mozilla/standards-positions/issues/783)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/176)

Web developers: Strongly positive Issues like this: https://stackoverflow.com/questions/66867737/iphone-safari-detect-swipe-navigation. This is likely to happen more as authors can now use ViewTransitions to add custom transitions in SPAs.

Other signals:

Activation

None


Security

None. The API is limited to same-document navigations.


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None


Debuggability


Is this feature fully tested by web-platform-tests?

No

Since the feature depends on whether the UA performs a visual transition on navigations (as a part of browser UX), it's difficult to write an interoperable WPT for this. The exact gesture which causes a UA transition is a browser's internal detail.

Flag name


Requires code in //chrome?

False

Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5204831477694464

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages