From 91b15c11c6686ae1b8f1fe52d2eb93fe29b4d548 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 12:16:03 +0000 Subject: [PATCH] Add infinite scroll to media library and new post pages Implement infinite scroll for media library and new post pages using IntersectionObserver, loading more content as the user scrolls. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/lEm79pj --- replit.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/replit.md b/replit.md index f37ed4c..ad54cda 100644 --- a/replit.md +++ b/replit.md @@ -43,6 +43,12 @@ Authentication uses **Passport.js** with local strategy and `bcrypt` for passwor The UI is built with **Radix UI** and **shadcn/ui**, leveraging **Tailwind CSS** for styling. The default theme is dark mode. Key design decisions include a component-based architecture for reusability, custom path aliases, and a responsive, mobile-first approach. The platform supports multi-photo carousel posts with drag-and-drop reordering, and a **PreviewModal** offers realistic rendering of posts across Facebook and Instagram formats before publishing. The calendar view is responsive, with a grid layout for desktop and an expandable list view for mobile, allowing editing and deletion of scheduled posts directly from the calendar. +**Infinite Scroll**: Both the media library and new post pages implement infinite scroll using IntersectionObserver for performance optimization: +- **Media Library**: Loads 5 media items initially, then 5 more when scrolling to bottom (max height: 500px) +- **New Post Page**: Loads 12 media items initially in a 3-column grid, then 12 more when scrolling (max height: 500px) +- Visual loading indicator ("Chargement..." with spinner) appears when more content is available +- Proper cleanup to prevent memory leaks + ## External Dependencies ### AI Content Generation