From 4de296410c4dc79057da5f1bbe8a1a7e1df215f0 Mon Sep 17 00:00:00 2001 From: shafi54 <108669266+shafi-aviz@users.noreply.github.com> Date: Sun, 1 Nov 2026 12:38:48 +0530 Subject: [PATCH] enh --- .../app/(drawer)/(tabs)/home/index.tsx | 7 ++++- .../app/(drawer)/(tabs)/order-again/index.tsx | 8 +++--- change-log.txt | 27 +++++++++++++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx index a33e2f4..c53363b 100755 --- a/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx @@ -36,6 +36,9 @@ dayjs.extend(relativeTime); const { width: screenWidth } = Dimensions.get("window"); const itemWidth = screenWidth * 0.45; const heroItemWidth = (screenWidth - 72) / 3; +// Catalog rows sit on the page's 16px margin: 32px of gutter + two 8px gaps +// leaves each of the three cards this wide. +const catalogItemWidth = (screenWidth - 48) / 3; const gridItemWidth = (screenWidth - 48) / 2; const formatTimeRange = (deliveryTime: string) => { @@ -53,6 +56,8 @@ const formatTimeRange = (deliveryTime: string) => { const staticStyles = { flatListContent: { gap: 16 }, + // 16px page margin, matching the rest of the screen. With catalogItemWidth + // that leaves an 8px gap between the three cards, like the tag grid. columnWrapper: { justifyContent: 'space-between', paddingHorizontal: 16 }, slotsListContent: { paddingBottom: 24 }, } as const; @@ -359,7 +364,7 @@ const ProductItem = memo(({ item, onPress }: ProductItemProps) => { ) : ( <> - + {visible.map((item: any) => ( onProductPress(item.id)} showDeliveryInfo={false} useAddToCartDialog={true} diff --git a/change-log.txt b/change-log.txt index 1f6bcd9..68532af 100644 --- a/change-log.txt +++ b/change-log.txt @@ -66,3 +66,30 @@ ~ complaint.raise uses notifyRegionAdmins(complaint.regionId, ...). --- apps/backend/tests/unit/admin-notif.test.ts ~ Rewritten for region scoping + manual broadcast; asserts null region is a no-op. + +[2026-11-01 12:32:24 IST] user-ui home: match the All Available Products grid spacing to the tag grid. + +--- apps/user-ui/app/(drawer)/(tabs)/home/index.tsx +~ staticStyles.columnWrapper.paddingHorizontal 16 -> 28. Cards keep + heroItemWidth, so the horizontal gap becomes 8px, identical to the tag grid + (mx-4 + px-3 = 28px inset, same 8px gaps). +~ All Available Products heading row px-1 -> px-3 so the title sits on the same + 28px gutter as the rows. +No data, paging, or card changes. + +[2026-11-01 12:34:02 IST] user-ui home: give the catalog grid the extra space as card width. + +--- apps/user-ui/app/(drawer)/(tabs)/home/index.tsx +~ Reverts the 28px row gutter: columnWrapper.paddingHorizontal back to 16 so the + grid keeps the page's 16px margin (and the heading returns to px-1). ++ catalogItemWidth = (screenWidth - 48) / 3; ProductItem (catalog rows only) + uses it instead of heroItemWidth, so three cards fill the row with 8px gaps. + Tag grid keeps heroItemWidth inside its 28px inset card. + +[2026-11-01 12:37:54 IST] user-ui Offers/Combos: same compact 3-up grid as the home catalog. + +--- apps/user-ui/app/(drawer)/(tabs)/order-again/index.tsx +~ heroItemWidth -> catalogItemWidth = (screenWidth - 48) / 3. +~ Grid gap-5 (20px) -> gap-2 (8px); px-4 page margin unchanged. + Three cards now fill the row, matching the All Available Products grid. +Web offers page already uses a 12px grid gap (gap-3), so no web change.