Re: [csswg-drafts] [css-view-transitions-2] keep ::view-transition-old(root) screenshot (#8830)

The snapshot API for non-live pixel snapshots would be useful for some advanced use cases.  While it's possible to use VT API for most of them with some careful configuration, VT is still largely created around the idea of a playable transition with a discrete start and end. 

Some use cases this could simplify:
- Gesture-linked animations where touch coordinates are used to position elements.  Many native apps utilize this when dismissing layers or performing other actions. This is possible but difficult with VT API.
- Caching snapshots of SPA views to provide previews while re-rendering previous content.  This is commonly used with native app switchers or mobile browsers when an app or page has been destroyed in the background, but the user is shown a snapshot of the previous state to be able to accurately select the desired app/page.  Native APIs equivalent to this are heavily used for that purpose.
- Precomputing transition elements to enhance responsiveness (especially when talking about draggable gestures which can easily feel sluggish on touch move) would not be possible with VT API, but could be possible with this API.  In general, keeping the page interactive can be difficult (though again not impossible) with the VT API especially if the transition only changes part of the page and the user can reasonably try to interact or scroll the rest of the page. 

The cross-origin restriction make sense, and should not affect most use cases since this would be used for visual animations to the user.  Inspecting the pixel data might be desired for certain use cases, but I don't see those overlapping closely with the animation case.

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


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

Received on Thursday, 17 August 2023 23:47:02 UTC