From f57fe4e9d65980dcb98a200ec29ce4ddc755802a Mon Sep 17 00:00:00 2001 From: Arda Samadi Date: Sun, 14 Jun 2026 22:19:40 +0330 Subject: [PATCH] Desktop polish: seller header contrast, collection image crop, infinite scroll - seller: only the logo overlaps the cover now; name/handle/stats sit below the cover on white (fixes low-contrast name on the gradient) - collections (home rail, /collections grid, /collection cover): portrait 3/4 images so full-body figures aren't cropped; detail cover uses object-contain - MondrianProductList: add IntersectionObserver sentinel for reliable infinite scroll on desktop (window-scroll math missed under the footer) Co-Authored-By: Claude Opus 4.8 --- app/components/HorizontalCollectionsList.tsx | 2 +- app/components/MondrianProductList.tsx | 19 +++++++++++++++++++ app/routes/collection.$id.tsx | 4 ++-- app/routes/collections.tsx | 2 +- app/routes/seller.$sellerId._index.tsx | 8 ++++---- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/app/components/HorizontalCollectionsList.tsx b/app/components/HorizontalCollectionsList.tsx index 5ddb1bd..aaba63b 100644 --- a/app/components/HorizontalCollectionsList.tsx +++ b/app/components/HorizontalCollectionsList.tsx @@ -131,7 +131,7 @@ const HorizontalCollectionsList = ({ >
{/* Collection Image */} -
+
{collection.coverImageUrl ? ( window.removeEventListener("scroll", handleScroll); }, [fetchNextPage, hasNextPage, isFetchingNextPage]); + // Sentinel-based trigger — more reliable than scroll math on desktop, where + // the footer can keep the window-scroll threshold from being reached. + const loadMoreRef = useRef(null); + useEffect(() => { + const el = loadMoreRef.current; + if (!el) return; + const observer = new IntersectionObserver( + (entries) => { + if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) { + fetchNextPage(); + } + }, + { rootMargin: "600px" } + ); + observer.observe(el); + return () => observer.disconnect(); + }, [fetchNextPage, hasNextPage, isFetchingNextPage]); + // Memoize expensive filtering operations const { oddProducts, evenProducts } = useMemo(() => { const odd = products.filter((_, index) => index % 2 === 0); @@ -177,6 +195,7 @@ const MondrianProductList = ({
{hasNextPage && } +
)} diff --git a/app/routes/collection.$id.tsx b/app/routes/collection.$id.tsx index 1b35ddc..6002fb2 100644 --- a/app/routes/collection.$id.tsx +++ b/app/routes/collection.$id.tsx @@ -143,12 +143,12 @@ export default function CollectionDetail() { {/* Collection Header */}
{/* Cover Image */} -
+
{collection.coverImageUrl ? ( {collection.title ) : (
diff --git a/app/routes/collections.tsx b/app/routes/collections.tsx index f349ecd..b360846 100644 --- a/app/routes/collections.tsx +++ b/app/routes/collections.tsx @@ -148,7 +148,7 @@ export default function Collections() { >
{/* Collection Image - بزرگ */} -
+
{collection.coverImageUrl ? (
-
-
+
+
{seller?.storeLogo ? ( ) : null}
-
+

{seller?.storeName} {seller?.isVerified ? ( @@ -246,7 +246,7 @@ export default function Seller() {

-
+