From d9a3f74cb795165bc827df05e9a89a8dff757171 Mon Sep 17 00:00:00 2001 From: SAGAR KHATRI Date: Wed, 12 Nov 2025 20:50:44 +0530 Subject: [PATCH 1/2] Auto scroll to show this item when its tab becomes active --- .../Collections/Collection/CollectionItem/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index 5d5075e23..3532ade4a 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -85,6 +85,17 @@ const CollectionItem = ({ item, collectionUid, collectionPathname, searchText }) useEffect(() => { dragPreview(getEmptyImage(), { captureDraggingState: true }); }, []); + + // Auto-scroll to show this item when its tab becomes active + useEffect(() => { + if (isTabForItemActive && ref.current) { + try { + ref.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + } catch (err) { + // ignore scroll errors (some environments may not support smooth scrolling) + } + } + }, [isTabForItemActive]) const determineDropType = (monitor) => { const hoverBoundingRect = ref.current?.getBoundingClientRect(); From f7ea1f8dbbbf211b65f9ca4c7c832ba11dc6d22d Mon Sep 17 00:00:00 2001 From: SAGAR KHATRI Date: Thu, 13 Nov 2025 19:31:21 +0530 Subject: [PATCH 2/2] Added semi colon --- .../Sidebar/Collections/Collection/CollectionItem/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index 3532ade4a..a41a13024 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -85,7 +85,7 @@ const CollectionItem = ({ item, collectionUid, collectionPathname, searchText }) useEffect(() => { dragPreview(getEmptyImage(), { captureDraggingState: true }); }, []); - + // Auto-scroll to show this item when its tab becomes active useEffect(() => { if (isTabForItemActive && ref.current) { @@ -95,7 +95,7 @@ const CollectionItem = ({ item, collectionUid, collectionPathname, searchText }) // ignore scroll errors (some environments may not support smooth scrolling) } } - }, [isTabForItemActive]) + }, [isTabForItemActive]); const determineDropType = (monitor) => { const hoverBoundingRect = ref.current?.getBoundingClientRect();