From 0d0c9dbbd0227437ffd3f17fe634cdd1a5acffa1 Mon Sep 17 00:00:00 2001 From: Stanca Serban Date: Tue, 27 Aug 2024 01:59:48 +0300 Subject: [PATCH] Backed out 3 changesets (bug 1914057) for causing mochitests failures in browser_recommended_ad_test.js. CLOSED TREE Backed out changeset 9d215f25967c (bug 1914057) Backed out changeset 4105f16f245b (bug 1914057) Backed out changeset 873a53c675ba (bug 1914057) --- .../shopping/content/recommended-ad.css | 6 - .../shopping/content/recommended-ad.mjs | 10 +- .../components/shopping/content/settings.css | 11 +- .../components/shopping/content/settings.mjs | 18 ++- .../browser/browser_recommended_ad_test.js | 116 ------------------ .../browser/browser_shopping_settings.js | 18 +++ .../stories/shopping-container.stories.mjs | 44 ++----- browser/locales/en-US/browser/shopping.ftl | 12 +- .../components/shopping/test/browser/head.js | 2 - .../shopping/test/mockapis/analysis.sjs | 1 - .../test/mockapis/recommendations.sjs | 15 --- .../shopping/test/mockapis/reporting.sjs | 1 - 12 files changed, 52 insertions(+), 202 deletions(-) diff --git a/browser/components/shopping/content/recommended-ad.css b/browser/components/shopping/content/recommended-ad.css index ae92e482a81f..20f0775ce00a 100644 --- a/browser/components/shopping/content/recommended-ad.css +++ b/browser/components/shopping/content/recommended-ad.css @@ -57,9 +57,3 @@ display: flex; justify-content: space-between; } - -#sponsored-label { - font-size: var(--font-size-small); - margin-block-start: 8px; - color: var(--text-color-deemphasized); -} diff --git a/browser/components/shopping/content/recommended-ad.mjs b/browser/components/shopping/content/recommended-ad.mjs index 10cb67ae75bd..09351ffe8533 100644 --- a/browser/components/shopping/content/recommended-ad.mjs +++ b/browser/components/shopping/content/recommended-ad.mjs @@ -24,7 +24,6 @@ class RecommendedAd extends MozLitElement { linkEl: "#recommended-ad-wrapper", priceEl: "#price", ratingEl: "moz-five-star", - sponsoredLabelEl: "#sponsored-label", }; } @@ -143,14 +142,7 @@ class RecommendedAd extends MozLitElement { - ${ - this.product.sponsored - ? html`` - : null - } +

`; } } diff --git a/browser/components/shopping/content/settings.css b/browser/components/shopping/content/settings.css index d230a4058bd3..c17426199f63 100644 --- a/browser/components/shopping/content/settings.css +++ b/browser/components/shopping/content/settings.css @@ -26,6 +26,11 @@ } } + #powered-by-fakespot { + font-size: 12px; + color: var(--text-color-deemphasized); + } + #shopping-settings-toggles-section { display: grid; row-gap: 8px; @@ -57,6 +62,7 @@ } #shopping-settings-opt-out-section { + justify-content: flex-start; row-gap: var(--shopping-settings-between-label-and-control-option-gap); #shopping-settings-opt-out-button { @@ -66,8 +72,3 @@ } } } - -#powered-by-fakespot { - font-size: var(--font-size-small); - color: var(--text-color-deemphasized); -} diff --git a/browser/components/shopping/content/settings.mjs b/browser/components/shopping/content/settings.mjs index e877785c1ad7..7619bbb13198 100644 --- a/browser/components/shopping/content/settings.mjs +++ b/browser/components/shopping/content/settings.mjs @@ -28,6 +28,7 @@ class ShoppingSettings extends MozLitElement { autoOpenToggleEl: "#shopping-settings-auto-open-toggle", autoOpenToggleDescriptionEl: "#shopping-auto-open-description", dividerEl: ".divider", + sidebarEnabledStateEl: "#shopping-settings-sidebar-enabled-state", optOutButtonEl: "#shopping-settings-opt-out-button", shoppingCardEl: "shopping-card", adsLearnMoreLinkEl: "#shopping-ads-learn-more-link", @@ -82,11 +83,11 @@ class ShoppingSettings extends MozLitElement { - +
- ${autoOpenToggleMarkup} ${adsToggleMarkup} + ${adsToggleMarkup} ${autoOpenToggleMarkup}
${this.autoOpenEnabled ? html`` : null}
+ ${this.autoOpenEnabled + ? html`` + : null}