From f63e380c736663d0cf425a975d6ff704e848f0e6 Mon Sep 17 00:00:00 2001 From: Dragana Trajkovic Date: Fri, 9 Aug 2024 10:47:05 +0200 Subject: [PATCH 1/2] MWPW-156259 - arbitrary without key or value --- edsdme/blocks/announcements/announcements.js | 4 ++-- edsdme/components/PartnerCards.js | 3 +++ edsdme/components/PartnerCardsStyles.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/edsdme/blocks/announcements/announcements.js b/edsdme/blocks/announcements/announcements.js index bc72498..ca304c2 100644 --- a/edsdme/blocks/announcements/announcements.js +++ b/edsdme/blocks/announcements/announcements.js @@ -75,8 +75,8 @@ export default async function init(el) { const block = { el, collectionTag: '"caas:adobe-partners/collections/announcements"', - ietf: config.locale.ietf - } + ietf: config.locale.ietf, + }; const blockData = { localizedText, diff --git a/edsdme/components/PartnerCards.js b/edsdme/components/PartnerCards.js index cd593c4..b862992 100644 --- a/edsdme/components/PartnerCards.js +++ b/edsdme/components/PartnerCards.js @@ -180,6 +180,8 @@ export default class PartnerCards extends LitElement { throw new Error(`HTTP error! Status: ${response.status}`); } apiData = await response.json(); + const cardsEvent = new Event('loaded'); + document.dispatchEvent(cardsEvent); if (apiData?.cards) { if (window.location.hostname === 'partners.adobe.com') { apiData.cards = apiData.cards.filter((card) => !card.contentArea.url?.includes('/drafts/')); @@ -524,6 +526,7 @@ export default class PartnerCards extends LitElement { } // eslint-disable-next-line consistent-return return selectedFiltersKeys.every((key) => cardArbitraryArr.some((arbitraryTag) => { + if (!arbitraryTag.value || !arbitraryTag.key) return false; const arbitraryTagKeyStr = arbitraryTag.key.trim().toLowerCase().replaceAll(' ', '-'); const arbitraryTagValueStr = arbitraryTag.value.trim().toLowerCase().replaceAll(' ', '-'); if (key === arbitraryTagKeyStr) { diff --git a/edsdme/components/PartnerCardsStyles.js b/edsdme/components/PartnerCardsStyles.js index 724d6bb..de0d6a2 100644 --- a/edsdme/components/PartnerCardsStyles.js +++ b/edsdme/components/PartnerCardsStyles.js @@ -557,7 +557,7 @@ export const partnerCardsStyles = css` @media screen and (max-width: 1200px) { .all-filters-wrapper-mobile.open { position: fixed; - z-index: 10; + z-index: 10000000; display: flex; flex-direction: column; width: 100%; From bb7176a6ef5a0c629237a8ad6d5b52b8b8e5bf4d Mon Sep 17 00:00:00 2001 From: draganatrajkovic <65951679+draganatrajkovic@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:53:42 +0200 Subject: [PATCH 2/2] Update PartnerCards.js --- edsdme/components/PartnerCards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edsdme/components/PartnerCards.js b/edsdme/components/PartnerCards.js index b862992..947f349 100644 --- a/edsdme/components/PartnerCards.js +++ b/edsdme/components/PartnerCards.js @@ -180,7 +180,7 @@ export default class PartnerCards extends LitElement { throw new Error(`HTTP error! Status: ${response.status}`); } apiData = await response.json(); - const cardsEvent = new Event('loaded'); + const cardsEvent = new Event('partner-cards-loaded'); document.dispatchEvent(cardsEvent); if (apiData?.cards) { if (window.location.hostname === 'partners.adobe.com') {