I managed to finally find a solution. Spent sooooooooooo long on this and IMO it’s worth merging into core because honestly it feels like it should already exist anyway in core.
I added the code below to my theme component; what it does is adds a “loading” class to the body as soon as routing starts, and then removes it as soon as routing is complete. Maybe this would be simple/obvious for folks who know ember, but it took me an obscenely long time (and trying a million things + reading through all threads on here I could find) to figure out.
With this core code in place, I can add loading spinners and such to my different widgets that will have their css and visibility be driven by whether or not the body tag has the loading css class.
initialize() {
withPluginApi("0.8.8", (api) => {
const router = api._lookupContainer('router:main');
router.reopen({
addLoadingCSSClassToBody: function() {
document.body.classList.add("loading");
}.on('willTransition')
});
router.reopen({
removeLoadingCSSClassFromBody: function() {
document.body.classList.remove("loading");
}.on('didTransition')
});
});
},
};