From f5c970f82e7dc558312c669b0c2e2aa520d3c827 Mon Sep 17 00:00:00 2001 From: devops Date: Sat, 17 Oct 2026 18:43:34 +0000 Subject: [PATCH] feat(ux-30): ensure touch targets exceed 44px across CartDrawer, Wiki, Contact, Footer and MobileBottomNav with regression tests --- .../application/components/CartDrawer.tsx | 8 +- .../components/ContactFormClient.tsx | 2 +- frontend/application/components/Footer.tsx | 16 +- .../application/components/IngredientWiki.tsx | 4 +- .../components/MobileBottomNav.tsx | 2 +- .../__tests__/touch-targets.test.tsx | 141 ++++++++++++++++++ 6 files changed, 157 insertions(+), 16 deletions(-) create mode 100644 frontend/application/components/__tests__/touch-targets.test.tsx diff --git a/frontend/application/components/CartDrawer.tsx b/frontend/application/components/CartDrawer.tsx index 985236aa..715b2d8a 100644 --- a/frontend/application/components/CartDrawer.tsx +++ b/frontend/application/components/CartDrawer.tsx @@ -112,7 +112,7 @@ export default function CartDrawer({ isOpen, onClose, onCheckout, onShopNavigate

سبد خرید

- @@ -152,7 +152,7 @@ export default function CartDrawer({ isOpen, onClose, onCheckout, onShopNavigate type="button" aria-label={`کاهش تعداد ${item.product.nameFa || item.product.name}`} onClick={() => updateQuantity(item.product.id, item.quantity - 1)} - className="p-1 hover:text-canina-blue transition-colors" + className="min-w-[44px] min-h-[44px] flex items-center justify-center p-1 hover:text-canina-blue transition-colors cursor-pointer" data-testid="minus-btn" > @@ -162,7 +162,7 @@ export default function CartDrawer({ isOpen, onClose, onCheckout, onShopNavigate type="button" aria-label={`افزایش تعداد ${item.product.nameFa || item.product.name}`} onClick={() => updateQuantity(item.product.id, item.quantity + 1)} - className="p-1 hover:text-canina-blue transition-colors" + className="min-w-[44px] min-h-[44px] flex items-center justify-center p-1 hover:text-canina-blue transition-colors cursor-pointer" data-testid="plus-btn" > @@ -173,7 +173,7 @@ export default function CartDrawer({ isOpen, onClose, onCheckout, onShopNavigate aria-label={`حذف ${item.product.nameFa || item.product.name} از سبد خرید`} data-testid="cart-item-delete-btn" onClick={() => setDeleteConfirmId(item.product.id)} - className="text-medical-gray-300 hover:text-red-500 transition-colors" + className="min-w-[44px] min-h-[44px] flex items-center justify-center text-medical-gray-300 hover:text-red-500 transition-colors cursor-pointer" > diff --git a/frontend/application/components/ContactFormClient.tsx b/frontend/application/components/ContactFormClient.tsx index 0cfbe5b3..ed17fff9 100644 --- a/frontend/application/components/ContactFormClient.tsx +++ b/frontend/application/components/ContactFormClient.tsx @@ -130,7 +130,7 @@ export default function ContactFormClient() {

diff --git a/frontend/application/components/Footer.tsx b/frontend/application/components/Footer.tsx index ae48514b..ec0b9dfb 100644 --- a/frontend/application/components/Footer.tsx +++ b/frontend/application/components/Footer.tsx @@ -74,12 +74,12 @@ export default function Footer({
{getText('contact_instagram', '') && ( - + )} {getText('contact_telegram', '') && ( - + )} @@ -121,12 +121,12 @@ export default function Footer({
{getText('contact_instagram', '') && ( - + )} {getText('contact_telegram', '') && ( - + )} @@ -209,7 +209,7 @@ export default function Footer({
-
+
@@ -218,7 +218,7 @@ export default function Footer({
-
+
@@ -229,7 +229,7 @@ export default function Footer({
-
+
@@ -242,7 +242,7 @@ export default function Footer({ {/* Trust and Verification Banner */}
-
+
diff --git a/frontend/application/components/IngredientWiki.tsx b/frontend/application/components/IngredientWiki.tsx index d6353f7f..c8afe3e9 100644 --- a/frontend/application/components/IngredientWiki.tsx +++ b/frontend/application/components/IngredientWiki.tsx @@ -175,7 +175,7 @@ export default function IngredientWiki() {