Inserts a “Load More” button to make sure Discourse does not qualify as “DISPLAYS ADDITIONAL MEDIA AT THE BOTTOM OF SUCH FEED OR LANDING PAGE WITHOUT ANY MANUAL INPUT FROM A COVERED USER.”
This is very nice - thanks! I do have a bug report which is clearly manifest at my Discourse site:
This site is quite small and most of the content is hidden until one signs on as a student. Thus, the landing page has only five posts. Nonetheless, the “Load more” button appears, which it shouldn’t. If you press it, it goes away. If you scroll up a bit and then back down, then it’s back again.
It works great, though, on the topic pages. You’ll have to trust me on that since they’re hidden from public view.
Of course, I understand that you did this in your spare time but I thought I should let you know. And thanks again!
The button merely exposes a bug in core where DiscoveryTopicsdoes not pass the canLoadMore model property to the LoadMore component. Unfortunately this is not something that can be handled in this theme component.
That’s quite interesting. One question: does this affect Core Web Vitals? It’s almost like a middle ground for pagination. I like giving users the power to load more content, reducing reliance on DOM scrolling, while I assume it also results in slightly lower loading latency. Or am I mistaken?
All it does is insert a button into the flow. I don’t see how this reduces core web vitals, or loading latency (it’s not preloading anything). Also, it still uses the IntersectionObserver to know when and where the button needs to appear, so it still relies on DOM scrolling.