Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MWPW-158464: Switch Odin endpoint #2894

Merged
merged 12 commits into from
Sep 19, 2024
Merged

MWPW-158464: Switch Odin endpoint #2894

merged 12 commits into from
Sep 19, 2024

Conversation

3ch023
Copy link
Contributor

@3ch023 3ch023 commented Sep 17, 2024

  • point 'merch-datasource' to the Odin instance with the latest Content Model of the card fragment
  • update .hlxignore to serve /mas/docs/* HTML pages
  • add the initial plans.html page with 1 card rendered from Odin. The page is purposefully not created in Sharepoint since it's content should be sourced from Odin only, and meant to be updated by developers in the scope of their PRs.
  • The card has no price/cta yet, out of the scope of this PR.

Test Page:
https://mas-docs--milo--adobecom.hlx.live/libs/features/mas/docs/plans.html?martech=off&georouting=off

Resolves: https://jira.corp.adobe.com/browse/MWPW-158464

Test URLs:

@3ch023 3ch023 requested a review from a team as a code owner September 17, 2024 09:48
Copy link
Contributor

aem-code-sync bot commented Sep 17, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (2802011) to head (8bb17f2).
Report is 33 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #2894      +/-   ##
==========================================
+ Coverage   96.09%   96.24%   +0.14%     
==========================================
  Files         215      237      +22     
  Lines       53966    54222     +256     
==========================================
+ Hits        51861    52184     +323     
+ Misses       2105     2038      -67     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@3ch023 3ch023 requested review from yesil, npeltier and Axelcureno and removed request for a team September 17, 2024 09:50
@@ -2,6 +2,7 @@ import { AEM } from './aem.js';
import { createTag } from './utils.js';

const ATTR_AEM_BUCKET = 'aem-bucket';
const AEM_BUCKET = 'publish-p22655-e155390';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we already have STAGE & QA overrides ready? considering this will be freyja prod?

Copy link
Contributor Author

@3ch023 3ch023 Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we already have STAGE & QA overrides ready?

that will need some agreement in the team on how we do those overrides, so i'd say out of scope of this PR.
I just want us to start using the actual odin content modal thus this small change

@afmicka afmicka added verified PR has been E2E tested by a reviewer Ready for Stage labels Sep 18, 2024
@@ -3,12 +3,12 @@ export async function withAem(originalFetch) {
if (/cf\/fragments\/search/.test(pathname)) {
// TODO add conditional use case.
return originalFetch(
'/test/mocks/sites/cf/fragments/search/default.json',
'/test/mocks/sites/cf/fragments/search/authorPayload.json',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is implied that the API and response is for author, since Freyja/publish doesn't support this.
This name might be misleading like one can think that there may be also a publishPayload for search api.
how about searchResponse.json ? Neutral and explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there will be 'edgePayload.json' or something like this to test Freya

@@ -2,6 +2,7 @@ import { AEM } from './aem.js';
import { createTag } from './utils.js';

const ATTR_AEM_BUCKET = 'aem-bucket';
const AEM_BUCKET = 'publish-p22655-e155390';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should delete the default value and discuss how to pass it as a parameter in a clean way

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, agree here, i just didn't want to bloat this PR yet.
same as @npeltier mentioned above, we need mechanism to switch from prod to qa/stage etc

const merchIcon = createTag('merch-icon', {
slot: 'icons',
src: icon,
alt: '',
href: '',
alt,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if alt and href are undefined, are they properly omitted or rendered as alt="undefined" ? I couldn't verify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will test it today

@@ -44,6 +44,7 @@ runTests(async () => {
const [ccCard, photoshopCard] = getTemplateContent('cards');
document.querySelector('main').append(ccCard, photoshopCard);
expect(aemMock.count).to.equal(0);
const card = document.querySelector('main merch-card:has(> merch-datasource[path="/content/dam/sandbox/mas/creative-cloud"])');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should stop using /content/dam/sandbox/mas and start using /content/dam/mas

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will address in next PR

@milo-pr-merge milo-pr-merge bot merged commit c80cf18 into stage Sep 19, 2024
34 of 36 checks passed
@milo-pr-merge milo-pr-merge bot deleted the mas-docs branch September 19, 2024 00:48
@milo-pr-merge milo-pr-merge bot mentioned this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Stage run-nala-on-caas verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants