Re: [csswg-drafts] [css-animations-2, css-transitions-2] Entry and exit animations for top-layer elements (#8189)

The CSS Working Group just discussed `Entry and Exit Animations for top-layer elements`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Entry and Exit Animations for top-layer elements<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/8189<br>
&lt;fantasai> flackr: When certain elements go in/out of top layer<br>
&lt;fantasai> flackr: if devs want to have an naimation on the, they need the element to remain in the top layer for duration of the animation<br>
&lt;fantasai> flackr: so proposal is that we allow specifying top layer in the transition properties<br>
&lt;fantasai> flackr: but that it's otherwise not a developer-stylable property<br>
&lt;fantasai> flackr: essentially, you can specify transition: top-layer<br>
&lt;fantasai> flackr: and give it a duratoin<br>
&lt;fantasai> flackr: and this is the duration during which the element stays in the top layer<br>
&lt;Rossen_> q?<br>
&lt;ntim> q+<br>
&lt;Rossen_> ack ntim<br>
&lt;fantasai> ntim: I've always been against the top-layer CSS property concept<br>
&lt;fantasai> ntim: The concept should really stay abstracted away from the developer<br>
&lt;fantasai> ntim: even just introducing this property is a bad first step, I think<br>
&lt;lea> q?<br>
&lt;lea> q+<br>
&lt;emilio> q+<br>
&lt;fantasai> lea: I wanted to as ntim why he thinks this concept should be abstracted away from the developer<br>
&lt;fantasai> lea: there's a lot of reasons it should controllable in CSS<br>
&lt;Rossen_> ack lea<br>
&lt;fantasai> lea: we keep seeing use cases that could be solved if could be controlled in CSS<br>
&lt;fantasai> ntim: If you allow controlling top layer with CSS, you end up with same issues as z-index<br>
&lt;fantasai> ntim: the appeal of top layer right now is that it's controlled by order of JS API calls<br>
&lt;lea> q?<br>
&lt;flackr> q+<br>
&lt;fantasai> ntim: but once you start allowing random elements to put top-layer, then what order is actually used in the end?<br>
&lt;fantasai> lea: I think that depends on how we design the feature<br>
&lt;fantasai> lea: maybe it's a property that just the UA controls<br>
&lt;fantasai> lea: though I hope to avoid that<br>
&lt;fantasai> ntim: I think it needs a real design<br>
&lt;fantasai> ntim: just exposing this concept...<br>
&lt;chrishtr> Note that the proposal is not incompatible with ntim's concern. I agree with his concern.<br>
&lt;fantasai> lea: yes, absolutely, does need design work to do it properly to not have problems of z-index<br>
&lt;fantasai> lea: total +1 to that<br>
&lt;lea> q?<br>
&lt;Rossen_> ack emilio<br>
&lt;fantasai> emilio: I don't think I have a strong feeling wrt top layer property<br>
&lt;fantasai> emilio: but basically the use case seems to be transitioning modal dialogs and so on when opening and closing<br>
&lt;fantasai> emilio: and I assume other elements in the top layer<br>
&lt;fantasai> emilio: to me that seems like a use case that non-modal dialogs also need<br>
&lt;fantasai> emilio: there are dialogs that may not be  in the top layer<br>
&lt;fantasai> emilio: so feels to me that this is a clever hack to avoid having closing/closed state on the dialog and fullscreen things<br>
&lt;fantasai> emilio: not sure if that's been considered<br>
&lt;fantasai> emilio: so why is this property better<br>
&lt;fantasai> emilio: why not say that it goes from open to non-open, have an intermediate state, and define that intermediat state transition as when all its transitions have finished<br>
&lt;Rossen_> ack flackr<br>
&lt;fantasai> flackr: Wrt tim's concern about exposing top-layer to the user, we have these stackign questions<br>
&lt;fantasai> flackr: this proposal nicely avoids, because things remain in their current stacking position<br>
&lt;fantasai> flackr: so we don't have to change any of that or figure out those definitions yet<br>
&lt;fantasai> flackr: I don't understand what non-modal dialogs have a problem, they can continue to apply their desired z-index<br>
&lt;fantasai> emilio: but you still have the issue of if you want a close animation on a dialog, you need to do it manuall<br>
&lt;Rossen_> q?<br>
&lt;fantasai> flackr: dialog element, which is top-layer?<br>
&lt;fantasai> emilio: dialog may or may not be top layer depending on show vs showModal<br>
&lt;masonf> If the dialog isn't modal, it isn't in the top layer, and you don't need this.<br>
&lt;fantasai> flackr: It would maintain its top layer state during transition, but still have to define the animation<br>
&lt;chrishtr> q+<br>
&lt;fantasai> emilio: idea is you can do opacity or transform or whatever to hide the dialog, right?<br>
&lt;fantasai> emilio: right now that's not easy to do with non-modal dialogs either<br>
&lt;fantasai> emilio: why not have ...<br>
&lt;fantasai> emilio: Firefox has all its panels as well, we have animations when you use menus<br>
&lt;fantasai> emilio: and those are just web elements<br>
&lt;fantasai> emilio: internally we have 5 states<br>
&lt;fantasai> emilio: open, opening, closing, closed<br>
&lt;fantasai> emilio: we ahve intermediate states so that the front end can actually use transitions for this stuff<br>
&lt;fantasai> emilio: my question is, why is this specific to top-layer and not to elements that pop in and out<br>
&lt;fantasai> flackr: you can't reasonably establish entry animations is resolved by setting inital styles<br>
&lt;fantasai> flackr: with that, should be possible to do on non-modal dialogs<br>
&lt;fantasai> flackr: top-layer is the only thing they don't have access to<br>
&lt;fantasai> flackr: the model is consistent with other things taht have a state change trigger an animation<br>
&lt;fantasai> flackr: state changes immediately, even though animation continues to run<br>
&lt;masonf> non-modal dialogs need the ability to animate to/from display:none, but that's a separate issue.<br>
&lt;fantasai> emilio: when non-modal dialog closes, you want to ?? animation to displaY:none<br>
&lt;fantasai> emilio: you transitoin display, which we resolved to do but don't yet do<br>
&lt;fantasai> emilio: so your proposeal would be to animation display directly and also transition opacity<br>
&lt;fantasai> flackr: I have proof of concept for Chrome<br>
&lt;lea> q?<br>
&lt;fantasai> emilio: so this proposal is to explicitly allow z-order to remain while transitioning<br>
&lt;lea> q+<br>
&lt;fantasai> emilio: like transitioning display<br>
&lt;fantasai> emilio: on one hand, I thin it would be less weird to have these intermediate states<br>
&lt;fantasai> emilio: when you open dialog, you transition to opening state<br>
&lt;fantasai> emilio: when you update style and don't have transitions running you're open<br>
&lt;fantasai> emilio: etc.<br>
&lt;fantasai> emilio: when no pending ransitions transition to closed<br>
&lt;fantasai> emilio: only targetted to dialogs/popovers/etc. but I think that's the main use case<br>
&lt;fantasai> emilio: I think that would be slightly less weird for authors<br>
&lt;fantasai> emilio: rather than transitioning display ...<br>
&lt;fantasai> emilio: having magic property seems weird<br>
&lt;fantasai> emilio: I guess this proposal weird, but I think maybe having intermediate pseudo-classes could be more elegant and usable for authors<br>
&lt;fantasai> flackr: I think this is more consistent with other state changes for the Web<br>
&lt;Rossen_> ack fantasai<br>
&lt;fantasai> fantasai: why not have things just stay in the top layer until their transitions are done automatically?<br>
&lt;fantasai> ntim: That seems to make sense<br>
&lt;fantasai> chrishtr: Having a transitioning state and this automatically detect what they're happening and preserve top layer during UA was thoroughly explored during popover design<br>
&lt;fantasai> chrishtr: and prototyped in Chromium<br>
&lt;fantasai> chrishtr: was specific to popover and dialog, and why not have a generic mechanism in animations<br>
&lt;fantasai> chrishtr: this is what lead to these proposals for display:none animations and specifying top-layer duration<br>
&lt;fantasai> chrishtr: without specifying UA magic to detect length of animations<br>
&lt;Rossen_> ack chrishtr<br>
&lt;ntim> q+<br>
&lt;fantasai> chrishtr: discussed at length in popover API proposal<br>
&lt;Rossen_> ack lea<br>
&lt;fantasai> lea: firstly, it seems weird to have a property that only works in transitions<br>
&lt;fantasai> lea: if devs want to put things in the top layer, what prevents them from adding an animation that puts them in the top layer?<br>
&lt;fantasai> emilio: ....<br>
&lt;fantasai> lea: so only available in transitions?<br>
&lt;fantasai> lea: what prevents having a transition that lasts 999999s?<br>
&lt;fantasai> emilio: you'd need to call modal<br>
&lt;fantasai> lea: trying to prevent devs by adding only to transitions, it's a hack and can be worked around<br>
&lt;fantasai> emilio: I agree<br>
&lt;Rossen_> q?<br>
&lt;fantasai> emilio: internally, how we implement top layer<br>
&lt;fantasai> emilio: I'm not sure how I feel about this<br>
&lt;flackr> q+<br>
&lt;fantasai> [missed]<br>
&lt;fantasai> Rossen_: let's end this topic right here<br>
&lt;fantasai> Rossen_: we coered quite a bit, but this doesn't seem ready for resolution<br>
&lt;fantasai> Rossen_: was well articulated and proposed, and good path forward for addressing some of the TAG review comments<br>
&lt;fantasai> Rossen_: shoudl take conversation back to GH, and should bring it back when it's more developed<br>
&lt;flackr> q-<br>
</details>


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


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

Received on Wednesday, 11 January 2023 17:41:13 UTC