WebKit / standards-positions

WebKit's positions on emerging web specifications
https://webkit.org/standards-positions/
242 stars 19 forks source link

View Transitions: list of types #266

Closed vmpstr closed 1 month ago

vmpstr commented 11 months ago

WebKittens

No response

Title of the spec

View Transitions, Level 2 (list of types)

URL to the spec

https://drafts.csswg.org/css-view-transitions-2/#the-active-view-transition-pseudo

URL to the spec's repository

https://github.com/w3c/csswg-drafts/

Issue Tracker URL

No response

Explainer URL

https://github.com/vmpstr/web-proposals/blob/main/explainers/view-transition-types.md

TAG Design Review URL

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

Mozilla standards-positions issue URL

https://github.com/mozilla/standards-positions/issues/905

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=276801

Radar URL

No response

Description

View Transitions Module Level 2 has a number of new features being worked on in parallel. This particular issue is about the "list of types" component which allows developers to specify types when calling startViewTransition. The initial issue that spawned this spec change is https://github.com/w3c/csswg-drafts/issues/8960

In short, it's an ability for developers to specify "types" of transition when calling startViewTransition, and be able to style their page based on which type of a transition is currently active.

miketaylr commented 10 months ago

FYI, it's proposed that we (Chromium) ship this in M121 (hitting Stable in early January), so if you have any feedback on the design now would be a good time to give it.

nt1m commented 10 months ago

This does look useful, though my first look at the API confused the types with view transition names. The :active-view-transition() selector has a very similar syntax to the ::view-transition-*() pseudo elements which makes the confusion even more likely.

nt1m commented 10 months ago

@miketaylr @vmpstr It would be good to delay shipping this in stable releases. The view transition 2 spec is still under development, with new concepts like view transition "classes" being introduced. It would be good to ensure a coherent developer story with all of these concepts to make sure developers can't confuse them with each other and prevent any potential redundancy between the concepts.

cc @fantasai

noamr commented 6 months ago

I think this is a lot more coherent now? Planning to ship this together with classes in Chrome 125. Also gave the spec a big editorial pass, see https://drafts.csswg.org/css-view-transitions-2/#selective-vt

nt1m commented 1 month ago

The DX has improved since, with the renaming of :active-view-transition to :active-view-transition-type() which makes things significantly less confusing.

We'll mark this as support pending objections in a week.