Re: [csswg-drafts] [css-view-transitions-2] Ignore offscreen elements from participating in transitions (#8282)

The CSS Working Group just discussed `[css-view-transitions-2] Ignore offscreen elements from participating in transitions`, and agreed to the following:

* `RESOLVED: UA is allowed to capture old elements in low resolution if they are off-screen`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> noamr: We were discussing optimization to render new live element in place of old element snapshot for when it's offscreen<br>
&lt;fantasai> noamr: but there were some concerns from WebKit wrt having two live images<br>
&lt;noamr> https://github.com/w3c/csswg-drafts/issues/8282#issuecomment-2245542731<br>
&lt;fantasai> noamr: Discussed using transparent image, but that would create a cross-fade that's not necessarily what's wanted<br>
&lt;fantasai> s/cross-fade/fade-in/<br>
&lt;fantasai> noamr: could make it implementation defined, but we lose compatibility here<br>
&lt;fantasai> noamr: another option is to figure out the implementation<br>
&lt;fantasai> noamr: Option I like the best is keep spec as-is, but say that if an element is off-screen, the UA can capture it at low resolution<br>
&lt;fantasai> noamr: so if you have elements cross-fading from far away, might appear blurry<br>
&lt;fantasai> noamr: also, using view-timeline, authors that want to override can do so<br>
&lt;fantasai> noamr: by giving a different view transition class and use a different animation<br>
&lt;fantasai> noamr: other option that was raised was to make one capture at the beginning of the new element, and use that as the old element<br>
&lt;khush> q+<br>
&lt;Rossen2> ack khush<br>
&lt;fantasai> khush: I like idea of having UA decide the rasterization range<br>
&lt;fantasai> khush: and browser can make trade-offs based on, is this a low-end device, etc.<br>
&lt;TabAtkins> fantasai: I think the idea of doing [missed] and a capture of the new state is interesting. not sure what makes the msot sense, tryign to get Tim to sign on<br>
&lt;fantasai> s/[missed]/low-res captures<br>
&lt;fantasai> noamr: Concern with using new image as old image is the semantic difference<br>
&lt;fantasai> noamr: Want to also not create junk<br>
&lt;flackr> s/junk/jank<br>
&lt;fantasai> fantasai: You mentioned could capture low-res or not at all<br>
&lt;TabAtkins> fantasai: If you have something that isnt' captyured; you're saying an opt is a low-res or not capturing at all, if you realize partway thru that you need the old image and didn't capture it, what do you do<br>
&lt;vmpstr> q+<br>
&lt;noamr> you'd see whatever it is you've captured<br>
&lt;fantasai> flackr: you'd either capture or not up front, and then have transparency if didn't capture<br>
&lt;Rossen2> ack vmpstr<br>
&lt;fantasai> vmpstr: Another option is we don't capture anything in the old, but we also don't do the cross-fade by default<br>
&lt;fantasai> vmpstr: only display the new pseudo-element<br>
&lt;noamr> (rejoining call)<br>
&lt;Rossen2> ack fantasai<br>
&lt;TabAtkins> fantasai: for "only dispaly the new element", I think in that case you'd need to somehow allow the author to select those cases<br>
&lt;TabAtkins> fantasai: so if *they're* doing a cross-fade they'll realize they can't do it<br>
&lt;khush> q+<br>
&lt;TabAtkins> fantasai: if their animation depends on the old image existing, so they can adapt to it<br>
&lt;TabAtkins> fantasai: So on the "this is an optimization" perspective, doing a low-res capture makes more sense to me<br>
&lt;TabAtkins> fantasai: In cases where the UA didn't capture the old el and realized they need it, I think transparent might be problematic<br>
&lt;TabAtkins> fantasai: So instead in that case, if you optimzie too hard, just take a cpature of the new dom and use that instead<br>
&lt;fantasai> vmpstr: Low-res capture cross-fading to that might have artifacts that are unappealing<br>
&lt;TabAtkins> fantasai: to be clear, not saying... you'd only use the new dom in place of the old if you'd *failed* to catpure anything at all. if you have a lowres capture you shoudl use that<br>
&lt;fantasai> khush: On aspect of authors should be able to detect this"<br>
&lt;fantasai> khush: for not capturing the old<br>
&lt;fantasai> khush: would it be enough to give the author a pseudo-class?<br>
&lt;fantasai> khush: UA would not do a cross-fade, and the author can then do a customization<br>
&lt;vmpstr> +1<br>
&lt;Rossen2> ack khush<br>
&lt;fantasai> khush: [something] is not trivial to do<br>
&lt;fantasai> khush: implementation concerns were raised on WK side<br>
&lt;noamr> q+<br>
&lt;fantasai> noamr: aside from being detectable, also want good default<br>
&lt;fantasai> noamr: I like the idea of having one capture of new element in the rare case where we didn't capture anything<br>
&lt;Rossen2> ack noamr<br>
&lt;fantasai> ntim: I would prefer low-res capture of the old state<br>
&lt;fantasai> ntim: I think that's the easiest thing to implement<br>
&lt;noamr> q+<br>
&lt;fantasai> ntim: for authors [garbled]<br>
&lt;fantasai> ntim: show nothing solution is more disruptive to the user<br>
&lt;fantasai> noamr: I would suggest something<br>
&lt;Rossen2> ack noamr<br>
&lt;fantasai> noamr: we say that you can display low-resolution image of the element<br>
&lt;fantasai> noamr: that way we discourage showing totally transparent images<br>
&lt;fantasai> noamr: we don't have to resolve on what happens when we didn't capture anything right now<br>
&lt;fantasai> noamr: we can capture a low-res image, and we discourage capturing fully transparent<br>
&lt;fantasai> noamr: if there's an issue, we can resolve on it then; might not be necessary<br>
&lt;khush> q+<br>
&lt;fantasai> ntim: low-res of old capture seems reasonable to me<br>
&lt;Rossen2> ack khush<br>
&lt;fantasai> khush: do we want authors to be able to detect this?<br>
&lt;fantasai> khush: low-res cross-fade could be looking bad<br>
&lt;fantasai> vmpstr: use case would be e.g. grid-reorder where image is coming in from far off the screen<br>
&lt;fantasai> khush: right now you see the same content, but now you'd see cross-fade between low-res and high-res<br>
&lt;fantasai> vmpstr: can detect if something came from offscreen using view-timeline<br>
&lt;fantasai> vmpstr: e.g. in grid-reordering case<br>
&lt;fantasai> vmpstr: maybe we can resolve on the degradation in a different resolution<br>
&lt;khush> i'm ok with that<br>
&lt;vmpstr> yep., that's fine<br>
&lt;fantasai> ntim: agree with noamr, detecting degradation should be a separate issue so we can get the syntax right<br>
&lt;fantasai> ntim: but right now you can detect animations from off-screen<br>
&lt;fantasai> s/vmpstr/noamr/<br>
&lt;fantasai> s/vmpstr/noamr/<br>
&lt;fantasai> s/vmpstr/noamr/<br>
&lt;flackr> q+<br>
&lt;fantasai> noamr: proposed resolution, if old element is off-screen, UA can capture in low resolutoin<br>
&lt;fantasai> flackr: should we change the UA animation at least to use the new image, since we know that's better?<br>
&lt;fantasai> noamr: That defeats the purpose<br>
&lt;fantasai> flackr: developer animation would still work using old image<br>
&lt;fantasai> flackr: but the UA animation would not need cross-fade..<br>
&lt;Rossen2> ack flackr<br>
&lt;fantasai> flackr: so this doesn't fix not needing to capture issue?<br>
&lt;fantasai> noamr: it fixes a perf issue, a lot less memory etc.<br>
&lt;fantasai> RESOLVED: UA is allowed to capture old elements in low resolution if they are off-screen<br>
</details>


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


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

Received on Wednesday, 24 July 2024 16:47:47 UTC