Getting off of using Swup, so I looked into adding page transitions on the <main>
element to a Turbo config and ended up using the visit and load events. bridgetown/turbo_transitions.js at 13a9c4faf4df8efa1b1a00bd08929e32f66e5f8b · bridgetownrb/bridgetown · GitHub
The only drawback with this approach is if a request takes a long time, you’ll be looking at an empty main part of the page, but it’d be easy enough to overlay some kind of spinner or loading skeleton after a couple seconds if need be. I also added the ability to turn on/off animations from page to page by using a data attribute.
Feel pretty slick to me now.
P. S. Thanks to @evenreven for some initial code to try out.