From d528d164b4cb32c3392e8755e1b440b5f30f1477 Mon Sep 17 00:00:00 2001 From: shafi54 <108669266+shafi-aviz@users.noreply.github.com> Date: Mon, 16 Nov 2026 15:56:58 +0530 Subject: [PATCH] floating cart bar: coupon price row and checkout hint layout - the coupon price gets its own row under the delivery-slot row instead of stacking under the line total - "Apply Coupons at checkout" sits on the subtotal row, beside the amount --- apps/user-ui/JEST-TEST-CASES.md | 4 +- apps/user-ui/components/floating-cart-bar.tsx | 56 +++++++++---------- change-log.txt | 15 +++++ 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/apps/user-ui/JEST-TEST-CASES.md b/apps/user-ui/JEST-TEST-CASES.md index 6e06be9..3989416 100644 --- a/apps/user-ui/JEST-TEST-CASES.md +++ b/apps/user-ui/JEST-TEST-CASES.md @@ -1270,8 +1270,8 @@ Covered by HOME-81..98, plus: | FCB-03 | edge | flash cart | pink theme | | FCB-04 | edge | cart refetch after mutation | quantities state resets | | FCB-05 | edge | no cart data | no crash | -| FCB-06 | happy | expanded sheet | “Apply Coupons at checkout” under the subtotal | -| FCB-07 | happy | coupon offer on the line's sku | `₹390` (₹430 line after the cap) + “With Coupon” | +| FCB-06 | happy | expanded sheet | “Apply Coupons at checkout” on the subtotal row, beside the amount | +| FCB-07 | happy | coupon offer on the line's sku | `₹390` (₹430 line after the cap) + “With Coupon”, on its own row under the slot row | | FCB-08 | edge | no offer for the sku | no coupon line | ### CouponBreakdownDialog diff --git a/apps/user-ui/components/floating-cart-bar.tsx b/apps/user-ui/components/floating-cart-bar.tsx index 097c36a..7f27659 100644 --- a/apps/user-ui/components/floating-cart-bar.tsx +++ b/apps/user-ui/components/floating-cart-bar.tsx @@ -383,26 +383,24 @@ const FloatingCartBar: React.FC = ({ )} /> )} - - - ₹{(() => { - const product = productsById[item.skuId]; - const basePrice = product?.price ?? 0; - const price = isFlashDelivery ? (product?.flashPrice ?? basePrice) : basePrice; - return price * item.quantity; - })()} - - {couponLine != null && ( - - ₹{couponLine} - With Coupon - - )} - + + ₹{(() => { + const product = productsById[item.skuId]; + const basePrice = product?.price ?? 0; + const price = isFlashDelivery ? (product?.flashPrice ?? basePrice) : basePrice; + return price * item.quantity; + })()} + + {couponLine != null && ( + + ₹{couponLine} + With Coupon + + )} @@ -421,7 +419,17 @@ const FloatingCartBar: React.FC = ({ Subtotal - ₹{totalCartValue} + + ₹{totalCartValue} + {/* The cart screens have no coupon picker; checkout does. */} + + Apply Coupons at checkout + + {remainingForFreeDelivery === 0 && ( @@ -431,14 +439,6 @@ const FloatingCartBar: React.FC = ({ )} - {/* The cart screens have no coupon picker; checkout does. */} - - Apply Coupons at checkout - - router.push( isFlashDelivery diff --git a/change-log.txt b/change-log.txt index ef0aeb2..79a1d6a 100644 --- a/change-log.txt +++ b/change-log.txt @@ -1493,3 +1493,18 @@ text-base for the same reason. PCARD-03/04 now assert sizes + colours instead of the demotion --- apps/user-ui/tests/pages/product-detail.test.tsx PD-52 also pins the coupon size against the 3xl listed price + +[2026-11-16 15:53:07 IST] floating cart bar layout: coupon price gets its own row, the +checkout hint sits beside the subtotal. + +The coupon line was stacked under the line total, squeezing the price column. It +now spans the line below the delivery-slot row. The "Apply Coupons at checkout" +hint moves from its own block into the subtotal row, next to the amount (mixed +case and smaller so it fits beside the 2xl figure). + +--- apps/user-ui/components/floating-cart-bar.tsx +- line total: back to a plain ₹total, no stacked column ++ coupon row: full-width under the slot dropdown row, ₹couponLine + "With Coupon" + (testID cart-item-coupon-price-{id}) +- footer: standalone hint block under the subtotal row ++ hint inline with ₹subtotal (testID apply-coupons-hint, numberOfLines 1)