From 692d385d09b633f99d0e8958c8eb9ec0ff3936cf Mon Sep 17 00:00:00 2001 From: Arda Samadi Date: Sat, 27 Jun 2026 15:06:54 +0330 Subject: [PATCH] =?UTF-8?q?feat(product):=20mobile=20redesign=20=E2=80=94?= =?UTF-8?q?=20brand=20below=20image,=20floating=20back,=20circular=20color?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per design feedback, restructure the mobile product page (desktop layout unchanged except color swatches): - remove the top seller bar; the seller/brand (logo + name + ارسال پیام) now sits in a row below the gallery. - add a floating circular back button over the image (safe-area aware). - move the rating out of the action row into a prominent body row, shown only when the average rating is > 0. - color swatches are now circles with a selection ring (shared with desktop for consistency) instead of squares. - make the افزودن به سبد خرید button full-width/taller with a compact price beside it. - the action row keeps save / share / add-to-collection / try-on. - the red discount icon is kept as-is. Co-Authored-By: Claude Opus 4.8 --- app/components/product/BottomBar.tsx | 25 +++---- app/components/product/ColorSelector.tsx | 23 +++---- app/components/product/ProductActions.tsx | 21 +----- app/components/product/ProductDetailView.tsx | 70 +++++++++++++++++--- 4 files changed, 82 insertions(+), 57 deletions(-) diff --git a/app/components/product/BottomBar.tsx b/app/components/product/BottomBar.tsx index f6ae422..d5b00c2 100644 --- a/app/components/product/BottomBar.tsx +++ b/app/components/product/BottomBar.tsx @@ -62,8 +62,8 @@ interface AddToCartButtonProps { const AddToCartButton = ({ isOutOfStock, onClick }: AddToCartButtonProps) => ( )} + {/* Floating back button (mobile) */} + {!isOwner && ( + + )} {/* Info */}
+ {/* Brand row (mobile) — moved out of the top bar, sits below image */} + {!isOwner && product.seller?.username ? ( +
+ + + + {product.seller.username} + + + +
+ ) : null} {/* Seller (desktop) */} {!isOwner && product.seller?.username ? (
+ {/* Mobile: rating (only when > 0) */} + {!isOwner && avgRating > 0 ? ( +
+ + {[1, 2, 3, 4, 5].map((i) => ( + + ))} + + {avgRating.toFixed(1)} + + {reviewCount} دیدگاه +
+ ) : null} + {hasAnyStock ? ( <> {hasColorVariants && (