- From: Noam Rosenthal via GitHub <sysbot+gh@w3.org>
- Date: Tue, 26 Sep 2023 13:30:56 +0000
- To: public-css-archive@w3.org
Thanks for the demo! I see that we were talking about two different meanings of "interruptible". ## About describing the problem In the first image, there are less long tasks, so the main thread is in fact responsive in that way. That's what `use-view-transition` does. It doesn't solve what you're presenting here though - "non-interruptible" here is the fact that the view is frozen after `startVT`. What you want to do here is to postpone the call to `startVT` as much as possible to prevent a long duration of *frozen rendering* rather than *blocked main thread*. I see how this would be hard without something like global lifecycle hooks in React. ## About the proposed solution First of all, I can't find any mention of these snapshot callbacks in the React documentation. Do you have a link? Is this some deprecated thing? I suspect that the thing with snapshotting here is that the DOM might be updated by someone other than React while React does all this "work" and perhaps updates suspense-fallbacks (loading spinners etc). For example, you have these CSS animations running. If we do some sync snapshotting at the start, and then let animations keep running until we're ready to commit, wouldn't that create a jump? Could be that I'm not entirely getting the sync snapshotting thing yet. I still think that the solution for this is something like `React.startViewTransition` that does this internally, if React doesn't want to expose those hooks. /cc @khushalsagar on this. -- GitHub Notification of comment by noamr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9400#issuecomment-1735549871 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 26 September 2023 13:30:57 UTC