From 24fa299db69991d780838e8d66a27ffa22199606 Mon Sep 17 00:00:00 2001 From: Qiyun Dai Date: Mon, 18 Nov 2024 20:48:31 -0600 Subject: [PATCH 1/4] [MWPW-162671] update stage02 endpoint (#211) Update esp-controller.js --- events/scripts/esp-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/scripts/esp-controller.js b/events/scripts/esp-controller.js index 336376ed..35e2fbea 100644 --- a/events/scripts/esp-controller.js +++ b/events/scripts/esp-controller.js @@ -6,14 +6,14 @@ const API_CONFIG = { dev: { host: 'https://wcms-events-service-layer-deploy-ethos102-stage-va-9c3ecd.stage.cloud.adobe.io' }, dev02: { host: 'https://wcms-events-service-layer-deploy-ethos102-stage-va-d5dc93.stage.cloud.adobe.io' }, stage: { host: 'https://events-service-layer-stage.adobe.io' }, - stage02: { host: 'https://events-service-layer-stage02.adobe.io' }, + stage02: { host: 'https://wcms-events-service-layer-deploy-ethos105-stage-or-8f7ce1.stage.cloud.adobe.io' }, prod: { host: 'https://events-service-layer.adobe.io' }, }, esp: { dev: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-caff5f.stage.cloud.adobe.io' }, dev02: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-c81eb6.stage.cloud.adobe.io' }, stage: { host: 'https://events-service-platform-stage-or2.adobe.io' }, - stage02: { host: 'https://events-service-platform-stage02.adobe.io' }, + stage02: { host: 'https://wcms-events-service-platform-deploy-ethos105-stage-9a5fdc.stage.cloud.adobe.io' }, prod: { host: 'https://events-service-platform.adobe.io' }, }, }; From 3351497ac90e620fbcc7e306870ca52a65e9d6c2 Mon Sep 17 00:00:00 2001 From: Qiyun Dai Date: Mon, 18 Nov 2024 20:48:47 -0600 Subject: [PATCH 2/4] Stop profile cards uncaught error + re-enable local dev env (#210) --- .github/pull_request_template.md | 5 ++++- events/blocks/profile-cards/profile-cards.js | 5 +++++ events/scripts/esp-controller.js | 2 ++ events/scripts/utils.js | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 20c787bd..52d73f04 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,10 @@ -Describe your specific features or fixes +Describe your specific features or fixes and provide a preview link for the feature being incorporated Resolves: [MWPW-NUMBER](https://jira.corp.adobe.com/browse/MWPW-NUMBER) Test URLs: - Before: https://main--events-milo--adobecom.hlx.page/ - After: https://--events-milo--adobecom.hlx.page/ + +To test the feature, please load up the branch locally and run it against your local ESP and ESL server. +For more information on how to set up ESL and ESP locally, please refer to: https://wiki.corp.adobe.com/display/adobedotcom/Events+Milo+FE+Dev+Wiki#EventsMiloFEDevWiki-Localdevelopmentsetup diff --git a/events/blocks/profile-cards/profile-cards.js b/events/blocks/profile-cards/profile-cards.js index 46a6d8cd..2444733d 100644 --- a/events/blocks/profile-cards/profile-cards.js +++ b/events/blocks/profile-cards/profile-cards.js @@ -169,6 +169,11 @@ export default function init(el) { return; } + if (!data || data.length === 0) { + el.remove(); + return; + } + const cardsWrapper = createTag('div', { class: 'cards-wrapper' }); el.append(cardsWrapper); diff --git a/events/scripts/esp-controller.js b/events/scripts/esp-controller.js index 35e2fbea..ccc5fc35 100644 --- a/events/scripts/esp-controller.js +++ b/events/scripts/esp-controller.js @@ -3,6 +3,7 @@ import BlockMediator from './deps/block-mediator.min.js'; const API_CONFIG = { esl: { + local: { host: 'http://localhost:8499' }, dev: { host: 'https://wcms-events-service-layer-deploy-ethos102-stage-va-9c3ecd.stage.cloud.adobe.io' }, dev02: { host: 'https://wcms-events-service-layer-deploy-ethos102-stage-va-d5dc93.stage.cloud.adobe.io' }, stage: { host: 'https://events-service-layer-stage.adobe.io' }, @@ -10,6 +11,7 @@ const API_CONFIG = { prod: { host: 'https://events-service-layer.adobe.io' }, }, esp: { + local: { host: 'http://localhost:8500' }, dev: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-caff5f.stage.cloud.adobe.io' }, dev02: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-c81eb6.stage.cloud.adobe.io' }, stage: { host: 'https://events-service-platform-stage-or2.adobe.io' }, diff --git a/events/scripts/utils.js b/events/scripts/utils.js index 88773236..a5cd37e1 100644 --- a/events/scripts/utils.js +++ b/events/scripts/utils.js @@ -25,7 +25,7 @@ export function getEventServiceEnv() { if (host.startsWith('main--')) return 'prod'; } - if (host.includes('localhost')) return 'dev'; + if (host.includes('localhost')) return 'local'; if (host.includes('stage.adobe') || host.includes('corp.adobe') From 6ad313960397a613125a3ad02ce683328f9f95f0 Mon Sep 17 00:00:00 2001 From: Qiyun Dai Date: Thu, 19 Dec 2024 18:25:09 -0600 Subject: [PATCH 3/4] Prepare for ESL resp schema change (#213) --- events/blocks/events-form/events-form.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/events/blocks/events-form/events-form.js b/events/blocks/events-form/events-form.js index 0ce8c4b6..265e8b5d 100644 --- a/events/blocks/events-form/events-form.js +++ b/events/blocks/events-form/events-form.js @@ -407,14 +407,21 @@ function decorateSuccessScreen(screen) { } const { data } = resp; - const espStatus = data?.espProvider?.status; + const result = data?.espProvider || data; + + if (!result) { + buildErrorMsg(screen, 500); + return; + } + + const espStatus = result.status; if ((espStatus && espStatus !== 204)) { buildErrorMsg(screen, espStatus); return; } - if (data?.espProvider?.attendeeDeleted) BlockMediator.set('rsvpData', null); + if (result.attendeeDeleted) BlockMediator.set('rsvpData', null); firstScreen.classList.add('hidden'); secondScreen.classList.remove('hidden'); From bf113d0573947347e6f4fea79efd00bfa0e29005 Mon Sep 17 00:00:00 2001 From: Qiyun Dai Date: Thu, 9 Jan 2025 13:53:02 -0600 Subject: [PATCH 4/4] [CSS Tweak] Add a small padding to avoid block collision (#215) add a small padding to avoid block collision --- events/blocks/event-map/event-map.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/blocks/event-map/event-map.css b/events/blocks/event-map/event-map.css index 51306679..8ab319b8 100644 --- a/events/blocks/event-map/event-map.css +++ b/events/blocks/event-map/event-map.css @@ -2,7 +2,7 @@ max-width: 1750px; margin: auto; box-sizing: content-box; - padding: 32px 20px 0; + padding: 32px 20px 20px; } .event-map h2 {