Re: [csswg-drafts] [css-shared-element-transitions-1] Define transitions over changing viewport (#7859)

The CSS Working Group just discussed `Define transitions over changing viewport`, and agreed to the following:

* `RESOLVED:  Use "snapshot viewport" for root element snapshot and UA CSS to size and position ::page-transition at snapshot viewport.`

<details><summary>The full IRC log of that discussion</summary>
&lt;emeyer> Topic: Define transitions over changing viewport<br>
&lt;emeyer> Github: https://github.com/w3c/csswg-drafts/issues/7859<br>
&lt;TabAtkins> bokan<br>
&lt;JakeA> "Bokan"<br>
&lt;emeyer> bokan: This relates to view transitions<br>
&lt;emeyer> …The issue is that when you’re performing a transitoin, the viewport size could change during the transition<br>
&lt;TabAtkins> +1 to this proposal<br>
&lt;emeyer> …For example, the mobile navigation bar or virtual keyboard could appear/disappear during transition<br>
&lt;emeyer> …Proposing a “snapshot viewport” that’s a rect which stays stabel in all cases<br>
&lt;emeyer> …We could position and size this so it goes under all the UI<br>
&lt;emeyer> …On desktop, we can have similar issues with scrollbars<br>
&lt;emeyer> …We would position this viewport under all that as well<br>
&lt;emeyer> …The coordinate space comes from ::page-transition<br>
&lt;emeyer> …When we capture elements, they’re all positioned relative to that rect, so it doesn’t matter if UI is shown or not<br>
&lt;emeyer> …The root snapshot is extended to fill the entire rectangle<br>
&lt;emeyer> …We don’t want page content to stretch because scrollbars appeared or disappeared<br>
&lt;Rossen_> q?<br>
&lt;emeyer> …There’s pretty good consensus amnong those working on this, but looking for feedback<br>
&lt;emeyer> astearns: Can things be padded with background rather than background color?<br>
&lt;emeyer> bokan: Yes, agreed.<br>
&lt;emeyer> argyle: This sounds a little hectic with things appearing and disappearing during a transition<br>
&lt;emeyer> …Should we define things appearing or disappearing to come before or after the transition?<br>
&lt;ydaniv> q+<br>
&lt;emeyer> …Second question: what if I want to keep UI elements in place until after the transition?<br>
&lt;flackr> q+<br>
&lt;emeyer> bokan: The URL bar in particular isn’t under author control for security reasons<br>
&lt;emeyer> …It is tricky with the URL bar coming in and being animated, the browser will have to coordinate things<br>
&lt;emeyer> …Idea is that when the URL bar comes in, it slides over content rather than pushing it around<br>
&lt;emeyer> …We thought about whether you can wait for UI elements to disappear before starting the transition<br>
&lt;emeyer> …We don’t want to delay animations, though<br>
&lt;Rossen_> q?<br>
&lt;iank_> for the cross origin case - is it ok that they might be at different (page) zoom levels?<br>
&lt;emeyer> argyle: What do Android apps do?<br>
&lt;emeyer> …Are there patterns we can look at there?<br>
&lt;emeyer> bokan: That’s a good idea, but if you’re doing an SPA, you can keep the keyboard up, but the URL bar is most out of authors’ control<br>
&lt;emeyer> ydaniv: You’re talking about the sizing of the viewport, it doesn’t matter if you have to scroll during the transition?<br>
&lt;emeyer> bokan: I don’t think we have to consider scroll here<br>
&lt;jensimmons> Please do research on iOS as well, not just Android.<br>
&lt;emeyer> ydaniv: Say I’m at the bottom of a list, and on the new page I need to scroll to the top<br>
&lt;emeyer> Rossen: Another example would be an anchor navigation<br>
&lt;emeyer> bokan: Normally we’d take a screenshot of where you are and another for where you’re going and then allow crossfade<br>
&lt;Rossen_> ack ydaniv<br>
&lt;Rossen_> ack flackr<br>
&lt;emeyer> flackr: Overall I think this looks good, one comment: whether we can show content behind the keyboard will depend on painted content<br>
&lt;jensimmons> q+<br>
&lt;emeyer> …The page has laid out to the size with the keyboard showing, so content underneath the keyboard was never intended to be exposed<br>
&lt;emeyer> …You can]t scroll to it or otherwise access it as a user<br>
&lt;emeyer> bokan: You can consider it’s as if you scrolled it up<br>
&lt;emeyer> …I think it’s fairly rare for pages to rely on height like that<br>
&lt;emeyer> flackr: I dfon’t think it’s that rare for application-like interfaces<br>
&lt;emeyer> s/dfon’t/don’t/<br>
&lt;emeyer> …The other thing is that offsets will be relative to top left of the new viewport; what if those change during the transition, say by hiding the URL bar<br>
&lt;emeyer> bokan: Input is blocked while transitioning, so you can’t hide the URL bar<br>
&lt;emeyer> …The three things affected are scrollbar, virtual keyboard, and URL bar<br>
&lt;emeyer> flackr: Maybe it’s a non-issue then<br>
&lt;PaulG> q+<br>
&lt;emeyer> bokan: I think if that becomes possible we’d have to have a way to fix the rect<br>
&lt;Rossen_> ack jensimmons<br>
&lt;emeyer> jensimmons: Since we’re designing for the web, we need to look at all the mobile OSes, so please do also look at iOS and other mobile OSes<br>
&lt;astearns> if we can do better than Android and iOS, then we definitely should (rather than matching current app behavior)<br>
&lt;emeyer> bokan: As far as we know, things work similarly between Android and iOS<br>
&lt;emeyer> …We are by default trying to make things more consistent<br>
&lt;Rossen_> ack PaulG<br>
&lt;emeyer> PaulG: A Bluetooth keyboard connected to a mobile device can immediately hide the virtual keyboard, so make sure you’re testing that case<br>
&lt;fremy> +1, this sounds good to me<br>
&lt;JakeA> khush:<br>
&lt;emeyer> khush: I put up a proposed resolution<br>
&lt;astearns> proposed resolution: Use "snapshot viewport" for root element snapshot and UA CSS to size and position ::page-transition at snapshot viewport.<br>
&lt;emeyer> Rossen: What doe sthe WG think about that proposed resolution?<br>
&lt;emeyer> fremy: I think this is a solid proposal and adjust as we find problems<br>
&lt;emeyer> Rossen: Any objections?<br>
&lt;emeyer> RESOLVED:  Use "snapshot viewport" for root element snapshot and UA CSS to size and position ::page-transition at snapshot viewport.<br>
</details>


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


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

Received on Wednesday, 26 October 2022 14:49:15 UTC