- From: Claudia Meadows via GitHub <sysbot+gh@w3.org>
- Date: Tue, 06 May 2025 18:35:28 +0000
- To: public-css-archive@w3.org
> Yea, `popstate`'s sync nature is a bit clunky. the navigation API is a better fit here and is being worked on for interop 2025. Have you considered switching to that? Yes, I've looked into it. [It's way too new for us to be depending on it right now](https://caniuse.com/mdn-api_navigation), and I'd prefer to wait for broader compatibility before doing it. Worth noting that React Router updates synchronously, why it *can* just do that `update(); flushSync()` sequence. Switching to the Navigation API would break that and cause them to be in the very situation Mithril is in right now with respect to view transitions. They do provide native support for view transitions, though. > Rendering is suppressed when there is a pending update callback, so this should be impossible. > The update callback, by design, is guaranteed to be called before any subsequent frame updates. Oh, okay. That explains the behavior that was being reported, and that's what it seemingly felt like was happening. Question: are updates held until after the callback resolves or until after the promise resolves? > Yea, that's unfortunate and requires integration of view transitions into the framework. I think that's a less error prone design than adding lower level knobs to the platform and expecting app developers to tweak all of them correctly. IMHO this should've been communicated from the start. I would've strongly preferred to receive a feature request citing a blog post saying it needed router integration than to be in this current situation. > What stops you from integrating view transitions into mithril in this way rather than expecting devleopers to integrate it from the outside? Ignorance. [The Chromium team's blog post made this seem like something users should be able to just integrate themselves](https://developer.chrome.com/docs/web-platform/view-transitions/same-document#working_with_frameworks), so it seemed like I didn't need to do anything on my end. -- GitHub Notification of comment by dead-claudia Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12125#issuecomment-2855552831 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 May 2025 18:35:29 UTC