Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect UA Transitions on same-document Navigations #518

Closed
1 of 3 tasks
khushalsagar opened this issue Oct 3, 2023 · 2 comments
Closed
1 of 3 tasks

Detect UA Transitions on same-document Navigations #518

khushalsagar opened this issue Oct 3, 2023 · 2 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@khushalsagar
Copy link

khushalsagar commented Oct 3, 2023

Description

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.

Specification

whatwg/html#9579

Open Issues

No response

Tests

[Formerly:] web-platform-tests/wpt#41326 and web-platform-tests/wpt#41623.

https://wpt.fyi/results/?label=master&label=experimental&aligned&q=path%3A%2Fnavigation-api%2Fnavigate-event%2Fnavigate-navigation-back-same-document.html%20or%20path%3A%2Fnavigation-api%2Fnavigate-event%2Fevent-constructor.html%20or%20path%3A%2Fhtml%2Fbrowsers%2Fbrowsing-the-web%2Fhistory-traversal%2FPopStateEvent.html%20or%20path%3A%2Fhtml%2Fbrowsers%2Fbrowsing-the-web%2Fhistory-traversal%2Fpopstate_event.html

Note: The WPTs only test that the attribute is defined. When a UA transition is executed is left to the UA, so by design tests can't validate when the value should be set to true.

Current Implementations

  • Blink
  • Gecko
  • WebKit

Standards Positions

Webkit: WebKit/standards-positions#176
Mozilla: mozilla/standards-positions#783
Blink Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/OTGqhEZ7aug/m/tDfjCG4KAQAJ

Browser bug reports

No response

Developer discussions

This issue has come up for Webkit based browsers, example, since Webkit is the only engine shipping browser transitions for these navigations today.

Polls & Surveys

No response

Existing Usage

No response

Workarounds

Authors could try to polyfill it by listening to touchStart events, some details here. But there's no easy way to know whether the browser will turn a touch action stream into a navigation gesture which makes this approach brittle.

Accessibility Impact

No response

Privacy Impact

No response

Other

No response

@gsnedders
Copy link
Member

Tests

[Formerly:] web-platform-tests/wpt#41326 and web-platform-tests/wpt#41623.

https://wpt.fyi/results/?label=master&label=experimental&aligned&q=path%3A%2Fnavigation-api%2Fnavigate-event%2Fnavigate-navigation-back-same-document.html%20or%20path%3A%2Fnavigation-api%2Fnavigate-event%2Fevent-constructor.html%20or%20path%3A%2Fhtml%2Fbrowsers%2Fbrowsing-the-web%2Fhistory-traversal%2FPopStateEvent.html%20or%20path%3A%2Fhtml%2Fbrowsers%2Fbrowsing-the-web%2Fhistory-traversal%2Fpopstate_event.html

Note: The WPTs only test that the attribute is defined. When a UA transition is executed is left to the UA, so by design tests can't validate when the value should be set to true.

We might want to exclude the tests that rely on navigation-api (a proposal in its own right, #435).

@nairnandu
Copy link
Contributor

Thank you for proposing Detect UA Transitions on same-document Navigations for inclusion in Interop 2024.

We wanted to let you know that this proposal was not selected to be part of Interop 2024. This is because we got many more proposals than we could include in this year's project. Note that individual vendors may nevertheless choose to advance work in this area during the forthcoming year. We would welcome this proposal being resubmitted again next year, if necessary.

For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2024!

Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: Done
Development

No branches or pull requests

3 participants