Re: [csswg-drafts] [css-view-transitions-2] Allow an auto-generated `view-transition-name` that doesn't default to ID (#10995)

The CSS Working Group just discussed ``[css-view-transitions-2] Allow an auto-generated `view-transition-name` that doesn't default to ID``, and agreed to the following:

* ``RESOLVED: use the `match-element` keyword for this and disallow it as a value in vt1 spec``

<details><summary>The full IRC log of that discussion</summary>
&lt;bramus> noamr: we have a way to generate v-t-names with the keyword `auto`.<br>
&lt;bramus> … auto generates name based on the id attribute or element identity when two elements on both end of the VT are the same.<br>
&lt;bramus> … the id approach also works cross-document<br>
&lt;bramus> … are proposing other value where it does not try to do the `[id]` check first. only uses element identity, only working in same-doc VTs<br>
&lt;JakeA> q+<br>
&lt;bramus> … in the breakout for VTs a few weeks ago elika proposed match-element which we like<br>
&lt;bramus> … are proposing to put that as a function for the purpose of feature detection<br>
&lt;bramus> … because right now `v-t-n: match-element` parses as supported<br>
&lt;bramus> … important to ship both things together. bigger groups of people who ship sites need a better layering.<br>
&lt;Rossen1> q?<br>
&lt;bramus> … auto has a better default behavior, but want to allow people to use a cleane rseparation if they so choose<br>
&lt;Rossen1> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to comment on parsin and to comment on parsing<br>
&lt;bramus> fantasai: so the v-t-n accepts none an dcustom ident, which start with double dash<br>
&lt;bramus> … browsers should be rejecting any value that does not start with --<br>
&lt;bramus> … dont think we should introduce `()`<br>
&lt;bramus> bramus: dashed idents are subset of custom idents<br>
&lt;emilio> q+<br>
&lt;vmpstr> +1<br>
&lt;bramus> fantasai: oh, right. still dont like the parenthesis<br>
&lt;Rossen1> ack JakeA<br>
&lt;fantasai> fantasai: implies there's argument, but definitely there's none<br>
&lt;bramus> JakeA: I think we should unship/unspec `auto` as it exists now<br>
&lt;bramus> … aim of VTs was to have same behavior for same-doc and cross-doc<br>
&lt;bramus> … `match-element` is a useful departure from that but need to make it clear that the behavior only works in one of the two<br>
&lt;bramus> … `auto` muddies the water as it has `match-elemetn` but also `[id]` and creates this half-working feature but definitely different between MPA and SAP<br>
&lt;bramus> … I dont think that `auto` as “will do it all for you” here<br>
&lt;bramus> … might come up with other triggers like hover - should make sure definition of a transition is the same<br>
&lt;Rossen1> ack emilio<br>
&lt;bramus> emilio: strong agree with fantasai. no need for (). lot of other props with similar syntax restrict which idents they can parse<br>
&lt;JakeA> q+<br>
&lt;noamr> q+<br>
&lt;bramus> … am sure we can come up with an ident that is not a compat conceren<br>
&lt;Rossen1> ack fantasai<br>
&lt;bramus> fantasai: like to focus on noam’s ask of whether we add match element.<br>
&lt;bramus> … lets discuss meaning of auto later<br>
&lt;Rossen1> ack JakeA<br>
&lt;bramus> JakeA: i want to make sure that `match-element` is not as useful as people think it is<br>
&lt;bramus> … similar in codepen/tech demos<br>
&lt;bramus> … but if you are doing a page transition, its common for simple case to replace large parts of the DOM using innerHTML, which are different elements<br>
&lt;bramus> … element equality is not guaranteed<br>
&lt;Rossen1> ack noamr<br>
&lt;JakeA> That's an argument for not adding this behaviour into something like `auto`<br>
&lt;bramus> noamr: regarding compat: we could go back to CSS vt-1 and make it an illegal keyword<br>
&lt;JakeA> …because it's a complex behaviour and you need to know what you're opting into<br>
&lt;bramus> … think about compat is not about whether sites use it, its whether sites would catch it<br>
&lt;dbaron> For what it's worth, I think I have different opinions about element equality: https://dbaron.org/log/20200221-dom-identity<br>
&lt;JakeA> q+<br>
&lt;bramus> … to go back to vt-1 then say that its illegal, then new implementations can do that<br>
&lt;bramus> … instead of try and parsing it as a name<br>
&lt;bramus> … but right now in current implementations it does parse<br>
&lt;bramus> q+<br>
&lt;Rossen1> ack fantasai<br>
&lt;bramus> fantasai: there is a wide grey area in types of ?? and web apps between a demo page and sth that is using a particular framework style<br>
&lt;bramus> … we should be designing CSS to be usable and comfortable to it<br>
&lt;bramus> … I reject his argument that element identity is not useful at all<br>
&lt;Rossen1> ack JakeA<br>
&lt;bramus> JakeA: didnt say it wasnt usefull at all, but that it is less useful<br>
&lt;fantasai> s/at all/at all on real websites/<br>
&lt;bramus> … I covered other ground of simple page changes that fetch data and innerHTML it<br>
&lt;noamr> agree that match-element is useful for a lot of the spectrum, but attr() and ident() can cover a lot of the more complex/frameworky cases<br>
&lt;bramus> … in all simple demos I created they use innerHTML<br>
&lt;bramus> … widely used pattern, outside of frameworks<br>
&lt;bramus> JakeA: I am worrried about kicking the auto discussion down the road<br>
&lt;bramus> … concerns were raised in october and safari shipped in december<br>
&lt;bramus> … not covering now could leave us stuck with it<br>
&lt;bramus> fantasai: given that chrome is not even shipping can indicatate that its a really useful feature<br>
&lt;astearns> -1 to the practice of allowing browsers to ship things and then see if compat issues come up<br>
&lt;bramus> … if we both shippped it and it was harmful then ???<br>
&lt;bramus> … fine to discuss, but dont think we need to resolve<br>
&lt;JakeA> q+<br>
&lt;fantasai> s/???/it would be urgent to remove/<br>
&lt;fantasai> s/resolve/resolve today necessarily/<br>
&lt;Rossen1> ack JakeA<br>
&lt;bramus> JakeA: agree with it just being safari then there is less of a riks<br>
&lt;bramus> … but dont like that being used as an excuse<br>
&lt;bramus> … more worried about that if it does get used, it’s sold as a “we’ll do things for you” but it has footguns detailed in the thread<br>
&lt;astearns> q+<br>
&lt;bramus> … could block us from doing useful things in the future<br>
&lt;Rossen1> ack bramus<br>
&lt;noamr> bramus: re match-element being a function, it solves a short term, while in the long term a keyword would be best<br>
&lt;noamr> bramus: fine with match-element as a keyword, even without it being feature-detectable<br>
&lt;fantasai> +1 let's design for hte ong term<br>
&lt;fantasai> s/hte ong/the long/<br>
&lt;Rossen1> ack astearns<br>
&lt;bramus> astearns: at the very least I would appreciate it if the Safari would stop talking about the `auto` value until we figure out whether we can support it long term or want it to go away<br>
&lt;noamr> astearns: at the very least I would appreciate it if the Safari folks would not talk about the auto value until we figure out if we want to support it long term<br>
&lt;bramus> … the less it gets evanglized the more options we have in the future<br>
&lt;bramus> Rossen1: ok, let’s see if we can wrap this up<br>
&lt;bramus> noamr: proposed resolution would be then to have match-element as keyword and thus to disallow it as a name in v-t-1<br>
&lt;JakeA> +1 to `match-element`<br>
&lt;bramus> Rossen1: Any additional feedback or objections?<br>
&lt;bramus> fantasai: overall sounds good<br>
&lt;bramus> … did we call the other names? `self` and `match-element`<br>
&lt;bramus> … tab commented we should have a keyword that also works equally well in `random()`<br>
&lt;bramus> Rossen1: which one of the two is currently being used int he issue or spec?<br>
&lt;bramus> fantasai: mostly `match-element` is used<br>
&lt;bramus> Rossen1: can we stick to that for now and bikshed later?<br>
&lt;vmpstr> +1 to `match-element`<br>
&lt;Rossen1> ack fantasai<br>
&lt;bramus> noamr: this is already result of a lot of bikshedding inthe issue and a breakout before<br>
&lt;bramus> … I suggested `self` but like `match-element` today<br>
&lt;bramus> Rossen1: OK<br>
&lt;JakeA> (I'm not tied to the name `match-element`, as long as it's a name that suggests the behaviour as much as possible)<br>
&lt;bramus> RESOLVED: use the `match-element` keyword for this and disallow it as a value in vt1 spec<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10995#issuecomment-2551949161 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 18 December 2024 17:57:46 UTC