Open khushalsagar opened 1 year ago
Friendly ping. Would appreciate some feedback on this proposal.
@smaug---- IIRC, your feedback at the html triage meeting was wanting ensure this will work well if we choose to provide the functionality outlined in https://github.com/w3c/csswg-drafts/issues/8747 which makes sense. This API was structured with that in mind, happy to answer any questions/concerns with this aspect.
That said, a proposal to disable UA transitions is lot more nuanced because of the need to introduce more concepts (around navigation triggers), and it's unclear whether there will be consensus on giving that kind of control to authors (and to what extent). We're aiming to ship this API earlier to give authors an easy immediate fix.
I would expect there to be some easy way from JS, or at least some way, to disable the transition. https://github.com/whatwg/html/issues/8782 doesn't provide that. https://github.com/WICG/view-transitions/blob/main/default-ua-transitions.md does have the css rules for that, and makes sense from performance point of view that it is in css.
But I wonder, there is also the possibility to do this similarly to history.scrollRestoration. That was after all designed for very similar case. If the page is going to do its own scrolling / transition, then scrollRestoration should be set to "manual". The explainer doesn't explain why so different API is needed now.
Thanks for the feedback @smaug----! I left a comment here to keep the discussion on that issue. Hope that answers why the scroll restoration pattern doesn't work for transitions.
Request for Mozilla Position on an Emerging Web Specification
Other information
This API would help with issues like this. Chromium is planning to ship similar browser UX and we're looking forward to fixing this problem in an interoperable way.