Feature Request: Infinite Scroll

I realize you probably don’t want to allow for actual infinite scrolling because of server load on the DB, but maybe you could set the first 100 pages to automatically load when it gets close to the end of the page.

After importing Mastodon followers, the Timeline gets filled up quick. Having to click the Show more button every time is … not the best.

I’d rather just have everything in micro.blog instead of switching back to Mastodon to read stuff. Posting it here in case other people might feel similarly.

Thanks, Manton and Team.

Here are some implementation details thanks to chatgpt :slight_smile:

const dataContainer = document.getElementById('data-container');
let pageNumber = 1;

function loadInitialData() {
  // Load the initial data
  const data = fetchData(pageNumber);
  pageNumber++;

  // Display the data in the container
  dataContainer.innerHTML = renderData(data);
}
window.addEventListener('scroll', () => {
  if (window.innerHeight + window.scrollY >= document.body.offsetHeight) {
    loadMoreData();
  }
});
function loadMoreData() {
  // Load the next page of data
  const data = fetchData(pageNumber);
  pageNumber++;

  // Append the data to the container
  dataContainer.innerHTML += renderData(data);
}

Wow, ChatGPT might end of revolutionizing feature requests. :slightly_smiling_face:

To be honest I have mixed feelings about infinite scroll. I think in the age of TikTok and infinite content, it might be a good thing for Micro.blog to not encourage you to keep reading forever. The “Show More” link is a sort of reminder that you can stop reading if you want.

However, I agree that the “Show More” is too slow and clunky. I think the first step is we should make “Show More” much, much faster. Then we can see what other changes we should make.

I should add, we’ve also been talking about new account settings to help filter out the timeline when it’s too busy. For example, showing posts and replies but not replies from Mastodon users, just regular posts. Being able to toggle this kind of thing should help deal with overloaded timelines.

You already have the feature to hide Replies in the settings. It would be great to access this directly from the main timeline page.

FWIW, I’d want timeline syncing/read status before infinite scroll (and I think it accomplishes similar goals).

I mostly read Micro.blog via RSS of my timeline because I’m a completionist. I also kind of like that it creates a little friction for me when it comes to replies.

How do you reply to posts when reading via RSS?

I end up opening the app and scrolling to that post. Given that my timeline is roughly 50-100 posts a day and I usually check twice a day, it’s not that hard to scroll back to what I want to reply to. That friction, which is pretty considerable, helps me not be too much of a reply guy (I may have more replies on this forum than Micro.blog).

1 Like

I run experimental web feeds with “conversation on Micro.blog” links in them:

Please oh please don’t implement this and make it mandatory :frowning:

infinite_scrolling

Yeah I’ve considered adding this to my own feed to make it more convenient for folks. And I’ve thought about running something myself. But in the end, I prefer the friction.

Pre-caching the next page of content when scroll gets near the bottom would help speed things up for sure. Adding pagination would enable browser plugins to “auto paginate” through the content.

What is the current cache layer? Adding Redis (or something like it) to background the jobs and have a place for the page cache would take the load off the DB.

Is there a public roadmap somewhere, like Trello or something? Maybe we could vote on new features?

The RSS idea is good for keeping up to date on your MB feed. I can adapt if we can’t use MB to stay updated on Mastodon posts.

We do use Redis heavily and I’m happy to use it more. :slightly_smiling_face: Makes sense to pre-cache or try other optimizations to make “show more” as fast as possible.

1 Like