Maybe… not sure. It’s relatively easy to add this class now to any component template, you just need to use the bodyClass
helper. For example, in a separate theme we do this:
<template>
{{bodyClass "custom-homepage"}}
...
</template>
It achieves the same as the onPageChange
hook, but it’s more reliable. It will only set that class to the body while the component is rendered.
If the component has all the data it needs already, then yes, no reason why it can’t rendered with the rest of the app. In most cases though, the component will need to make a request to get some extra data, which triggers the loading indicator. I can’t think of any easy way to make that load faster, tbh.
While we’re here, we made an additional improvement to this feature. Until very recently, the crawler view of the custom homepage was not customizable. Now it is, via a server-side HTML outlet: DEV: Fix custom homepage crawler display and override by pmusaraj · Pull Request #31841 · discourse/discourse · GitHub