From 76173ad3321613ef8e1833e8ba04e2f6e2c262e1 Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Thu, 26 Sep 2024 14:56:46 +0530 Subject: [PATCH] review comments --- libs/blocks/merch-card/merch-card.css | 4 ++++ libs/blocks/merch-card/merch-card.js | 1 - libs/deps/mas/mas.js | 2 +- libs/deps/mas/merch-card.js | 18 +++++++++--------- .../test/merch-card-product.test.html | 4 ++++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/libs/blocks/merch-card/merch-card.css b/libs/blocks/merch-card/merch-card.css index e6af2d2e1f..b970ac8446 100644 --- a/libs/blocks/merch-card/merch-card.css +++ b/libs/blocks/merch-card/merch-card.css @@ -16,6 +16,10 @@ div[class*="-merch-card"] > div, display: none; } + merch-card .body-lower > hr { + width: 100% + } + .merch-card-price { margin-top: 8px; margin-bottom: 16px; diff --git a/libs/blocks/merch-card/merch-card.js b/libs/blocks/merch-card/merch-card.js index 7a7f188bf8..0a02669dd3 100644 --- a/libs/blocks/merch-card/merch-card.js +++ b/libs/blocks/merch-card/merch-card.js @@ -357,7 +357,6 @@ const simplifyHrs = (el) => { hrs.forEach((hr) => { if (hr.parentElement.tagName === 'P') { hr.parentElement.replaceWith(hr); - hr.style.width = '100%'; } }); if (el.variant === PRODUCT) { diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index 761bab2e25..98ea777f67 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -997,7 +997,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { - ${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook.bind(this)),super.disconnectedCallbackHook()}postCardUpdateHook(){Fr()||this.adjustProductBodySlots()}};g(ze,"variantStyle",P` + ${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}postCardUpdateHook(){Fr()||this.adjustProductBodySlots()}};g(ze,"variantStyle",P` :host([variant='product']) > slot:not([name='icons']) { display: block; } diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 5ce30dffec..d2be39ad18 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -1016,7 +1016,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { - ${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook.bind(this)),super.disconnectedCallbackHook()}postCardUpdateHook(){T()||this.adjustProductBodySlots()}static variantStyle=bt` + ${this.secureLabelFooter}`}connectedCallbackHook(){super.connectedCallbackHook(),window.addEventListener("resize",this.postCardUpdateHook.bind(this))}postCardUpdateHook(){T()||this.adjustProductBodySlots()}static variantStyle=bt` :host([variant='product']) > slot:not([name='icons']) { display: block; } @@ -1040,7 +1040,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { min-height: var(--consonant-merch-card-product-callout-content-height); display: block; } - `};import{html as U,css as yt}from"../lit-all.min.js";var nt=` + `};import{html as V,css as yt}from"../lit-all.min.js";var nt=` :root { --consonant-merch-card-segment-width: 378px; } @@ -1086,13 +1086,13 @@ merch-card[variant="plans"] [slot="quantity-select"] { grid-template-columns: repeat(4, minmax(276px, var(--consonant-merch-card-segment-width))); } } -`;var E=class extends d{constructor(t){super(t)}getGlobalCSS(){return nt}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return U` ${this.badge} +`;var E=class extends d{constructor(t){super(t)}getGlobalCSS(){return nt}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return V` ${this.badge}
- ${this.promoBottom?"":U``} + ${this.promoBottom?"":V``} - ${this.promoBottom?U``:""} + ${this.promoBottom?V``:""}

${this.secureLabelFooter}`}static variantStyle=yt` @@ -1102,7 +1102,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { :host([variant='segment']) ::slotted([slot='heading-xs']) { max-width: var(--consonant-merch-card-heading-xs-max-width, 100%); } - `};import{html as V,css as wt}from"../lit-all.min.js";var ct=` + `};import{html as U,css as wt}from"../lit-all.min.js";var ct=` :root { --consonant-merch-card-special-offers-width: 378px; } @@ -1150,20 +1150,20 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri grid-template-columns: repeat(4, minmax(300px, var(--consonant-merch-card-special-offers-width))); } } -`;var S=class extends d{constructor(t){super(t)}getGlobalCSS(){return ct}get headingSelector(){return'[slot="detail-m"]'}renderLayout(){return V`${this.cardImage} +`;var S=class extends d{constructor(t){super(t)}getGlobalCSS(){return ct}get headingSelector(){return'[slot="detail-m"]'}renderLayout(){return U`${this.cardImage}
- ${this.evergreen?V` + ${this.evergreen?U`
- `:V` + `:U`
${this.secureLabelFooter} `} diff --git a/libs/features/mas/web-components/test/merch-card-product.test.html b/libs/features/mas/web-components/test/merch-card-product.test.html index 8145abf64e..944bb43fec 100644 --- a/libs/features/mas/web-components/test/merch-card-product.test.html +++ b/libs/features/mas/web-components/test/merch-card-product.test.html @@ -5,6 +5,10 @@ Merch Card Web Component Product Variant demo page +