Re: [csswg-drafts] [css-view-transitions-1] How should scroll timeline animations be treated? (#9901)

The idea of a VT not automatically finishing SGTM. We already had a use-case for this with rAF driven animations in https://github.com/w3c/csswg-drafts/issues/8132 and its trivial to implement. There's an alternate API suggestion there which does both: indicate that the transition shouldn't automatically finish and a promise to listen to for finishing it.

With the above, I'm assuming we wouldn't need to change anything about our logic for how "auto finish" works. Both conditions need to happen for a transition to finish:

1. All animations with a monotonic animation timeline, which IIUC is limited to document timeline, have to finish.
2. If there are any `waitUntil` promises, they have to settle.

I think 2) also helps with: "The hard part is undoing the DOM update". If the transition needs to be aborted, the author plays the animation in reverse. Now the DOM is only showing `::view-transition-old` snapshots. The author updates the DOM and resolves the `waitUntil` promises. The DOM state should match the old snapshots being displayed so flip from VT pseudo-DOM to live old DOM is seamless.

-- 
GitHub Notification of comment by khushalsagar
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9901#issuecomment-1932450969 using your GitHub account


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

Received on Wednesday, 7 February 2024 16:44:07 UTC