From 954b9030399544fcde08f9009bc670f2081b87e0 Mon Sep 17 00:00:00 2001 From: glo82145 Date: Tue, 27 Aug 2024 15:11:52 +0530 Subject: [PATCH 1/5] PWA-3331::System is getting crashed when selecting add to cart in case of translated language --- .../venia-ui/lib/components/CartPage/cartPage.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/venia-ui/lib/components/CartPage/cartPage.js b/packages/venia-ui/lib/components/CartPage/cartPage.js index 073fa6a92c..bcc8b32e96 100644 --- a/packages/venia-ui/lib/components/CartPage/cartPage.js +++ b/packages/venia-ui/lib/components/CartPage/cartPage.js @@ -68,12 +68,14 @@ const CartPage = props => { fetchCartDetails={fetchCartDetails} /> ) : ( -

- -

+
+

+ +

+
); const priceAdjustments = hasItems ? ( From 047029eb2e6ed8197a13147978b719a1e7ebde8c Mon Sep 17 00:00:00 2001 From: glo82145 Date: Wed, 28 Aug 2024 13:11:16 +0530 Subject: [PATCH 2/5] PWA-3331::System is getting crashed when selecting add to cart in case of translated language --- .../__tests__/__snapshots__/cartPage.spec.js.snap | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap b/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap index c3adc663ad..704c2bdc2a 100644 --- a/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap +++ b/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap @@ -165,12 +165,14 @@ exports[`renders empty cart text (no adjustments, list or summary) if cart is em
-

- -

+
+

+ +

+
Date: Mon, 21 Oct 2024 22:37:13 +0530 Subject: [PATCH 3/5] fix issue --- .../lib/components/CartPage/cartPage.js | 7 ++++++- .../lib/components/MiniCart/miniCart.js | 20 +++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/venia-ui/lib/components/CartPage/cartPage.js b/packages/venia-ui/lib/components/CartPage/cartPage.js index bcc8b32e96..369f9d6f62 100644 --- a/packages/venia-ui/lib/components/CartPage/cartPage.js +++ b/packages/venia-ui/lib/components/CartPage/cartPage.js @@ -68,14 +68,19 @@ const CartPage = props => { fetchCartDetails={fetchCartDetails} /> ) : ( +
-

+
+

+
+

+

); const priceAdjustments = hasItems ? ( diff --git a/packages/venia-ui/lib/components/MiniCart/miniCart.js b/packages/venia-ui/lib/components/MiniCart/miniCart.js index 5430bd8820..a38aec38a4 100644 --- a/packages/venia-ui/lib/components/MiniCart/miniCart.js +++ b/packages/venia-ui/lib/components/MiniCart/miniCart.js @@ -114,18 +114,22 @@ const MiniCart = React.forwardRef((props, ref) => { className={classes.emptyMessage} data-cy="MiniCart-emptyMessage" > +
- +
+
+ +
) : ( From bbd3fb3dfc494c07b173e0e0533a07ac5f94a22b Mon Sep 17 00:00:00 2001 From: glo82145 Date: Mon, 21 Oct 2024 23:17:56 +0530 Subject: [PATCH 4/5] fix issue --- .../__snapshots__/cartPage.spec.js.snap | 16 ++++++++------ .../lib/components/CartPage/cartPage.js | 21 +++++++++---------- .../lib/components/MiniCart/miniCart.js | 8 +++---- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap b/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap index 704c2bdc2a..8b4164a88b 100644 --- a/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap +++ b/packages/venia-ui/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap @@ -166,12 +166,16 @@ exports[`renders empty cart text (no adjustments, list or summary) if cart is em className="items_container" >
-

- -

+
+

+
+ +
+

+
{ fetchCartDetails={fetchCartDetails} /> ) : ( -
-
-

-
- -
-

-
+
+

+
+ +
+

+
); diff --git a/packages/venia-ui/lib/components/MiniCart/miniCart.js b/packages/venia-ui/lib/components/MiniCart/miniCart.js index a38aec38a4..5e11177465 100644 --- a/packages/venia-ui/lib/components/MiniCart/miniCart.js +++ b/packages/venia-ui/lib/components/MiniCart/miniCart.js @@ -115,10 +115,10 @@ const MiniCart = React.forwardRef((props, ref) => { data-cy="MiniCart-emptyMessage" >
- +
Date: Thu, 21 Nov 2024 17:17:13 +0530 Subject: [PATCH 5/5] Wrapping FormatMessage Component with
so that browser translated DOM will not fail the js DOM Manipulation. --- packages/venia-ui/lib/components/AuthBar/authBar.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/venia-ui/lib/components/AuthBar/authBar.js b/packages/venia-ui/lib/components/AuthBar/authBar.js index 886aa9352c..519d9e4693 100644 --- a/packages/venia-ui/lib/components/AuthBar/authBar.js +++ b/packages/venia-ui/lib/components/AuthBar/authBar.js @@ -50,10 +50,12 @@ const AuthBar = props => { - +
+ +