Would someone please explain how Discourse does infinite scrolling? It has already been described to me by devs that to disable it is extremely difficult and would take months of danger-prone changes to so, but I’m not asking anyone to do this. I’m just trying to get an understanding of the innards of Discourse so I can craft a plug-in to adjust how infinite scrolling works. Telling those of us trying to figure this out that it’s impossible or nearly so and then ending the conversation is not helpful. Let’s get a dialog going on this.
AI-generated summary
The discussion revolves around understanding infinite scrolling in Discourse. Goop seeks insight into its inner workings to create a plugin, as disabling it is complex and not feasible. Mittineague suggests starting with what is already known, and joebuhlig offers a non-recommended method to break infinite scrolling by overriding handlebars templates. Goop has discovered that server-side code enables pagination when JavaScript is turned off and plans to investigate further. Mittineague provides a link to the Discourse GitHub repository for topics views, which may be helpful. However, sam advises that the question is too complex and suggests starting with beginner tasks, such as setting up a dev environment and completing smaller tasks, before seeking guidance on more advanced topics.
As you know, it is very complex. More complex than a single topic or even several topics could cover adequately. To start off a discussion, how about starting with what you have figured out so far?
The easy (and not advisable) way to disable it is to override the handlebars templates where it exists and leave out the load-more pieces. That would break it in that specific location.
I’ve gathered so far that if Javascript is turned off, then pagination is turned on by something in the server-side code. I intend to identify what code produces that and investigate how to selectively activate it.
The files in this folder may be some help
discourse/app/views/topics at main · discourse/discourse · GitHub
I can help here:
See:
Then once you are done with that and have a dev environment up, work through 2-3 or so #starter-task’s , after that submit about 10-20 PRs that are pr-welcome, once you did all of that, please feel free to post a well framed technical question asking for guidance.
You are asking skyscraper construction level questions, got to start by building your first mud hut.