Skip to content

refactor: replace infinite scroll intersection observers with manual load more buttons in post and community feeds#155

Merged
mbeps merged 2 commits into
mainfrom
dev
May 17, 2026
Merged

refactor: replace infinite scroll intersection observers with manual load more buttons in post and community feeds#155
mbeps merged 2 commits into
mainfrom
dev

Conversation

@mbeps

@mbeps mbeps commented May 17, 2026

Copy link
Copy Markdown
Owner

This pull request refactors the infinite scrolling mechanism for both the community and post feeds by removing the intersection observer-based auto-loading and replacing it with a manual "Load More" button. This simplifies the codebase and improves user control over loading additional content.

Feed Loading Refactor

  • Removed the usage of the useIntersectionObserver hook and all related logic from usePostsFeed and the communities feed, eliminating the automatic infinite scroll trigger. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated the return value and documentation of usePostsFeed to remove the ref and clarify the new manual loading approach. [1] [2]

UI Changes

  • Replaced the scroll-triggered loading indicator with a "Load More" button in the posts and communities UIs (app/page.tsx, components/posts/Posts.tsx, app/communities/page.tsx). The button calls the fetch function and displays a loading state. [1] [2] [3]
  • Removed the Spinner and related UI elements associated with the intersection observer in the affected components. [1] [2] [3]

These changes make the feed loading more explicit and maintainable, while reducing complexity and potential side effects from automatic infinite scrolling.

…load more buttons in post and community feeds
@vercel

vercel Bot commented May 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
circus-discussion Ready Ready Preview, Comment May 17, 2026 7:53pm

@mbeps
mbeps merged commit f7dc1dd into main May 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant