Open Addyvan opened 2 years ago
Yeah definitely into this. Need to think about how it plays with Suspense Transitions but my gut is it happens right at switch time. So while we are loading stuff in the background during Suspense Transition we don't do the browser version yet. When Suspense finishes we use the browser API at that point to smooth it in.
I guess I will need to study it up more, but is a boolean really sufficient? If so I'd be inclined to default it. I assumed there is more configuration needed.
They have now landed in chrome url, What's the plan for this ? Is it still considered ?
Really want to be able to use this too but I don't think this belongs in the router, i think this should be a core SolidJS feature because this is very useful for many dom updates outside of routing
This is likely out of the scope for the time being, especially since the feature is still locked behind the
chrome://flags/#document-transition
flag in chrome canary.Some resources on the incoming API in question:
The transitions function by rendering the soon to be page as a separate DOM structure (kinda similar to solid's Portal) then taking a screenshot of both the previous element and the new element. These screenshots get animated in some form before the new page's contents become interactable again.
It would be really cool to see this feature power solid SPAs as soon as browsers begin to support it.
High level, this could look like: