From e23fa462eba748b0a657ea39752b2ac696209987 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 29 Aug 2025 10:59:22 +0000 Subject: [PATCH] Improve video carousel scrolling for a smoother user experience Add console logs to the `CategoryRow` component in `netflix-grid.tsx` to debug and improve the infinite scrolling behavior of video carousels. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/mZpi7Z1 --- client/src/components/netflix-grid.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 4337471..84175a1 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -145,10 +145,13 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { let targetScroll; + console.log('Scroll debug:', { direction, currentScroll, maxScroll, scrollAmount }); + if (direction === 'left') { if (currentScroll <= 5) { // Jump to end for infinite loop targetScroll = maxScroll; + console.log('Jumping to end:', targetScroll); } else { targetScroll = Math.max(0, currentScroll - scrollAmount); } @@ -156,6 +159,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { if (currentScroll >= maxScroll - 50) { // Jump to beginning for infinite loop targetScroll = 0; + console.log('Jumping to beginning:', targetScroll); } else { targetScroll = Math.min(maxScroll, currentScroll + scrollAmount); }