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-155057: Lets authors add "starting at" to merch cards #2717

Merged
merged 21 commits into from
Aug 20, 2024

Conversation

Axelcureno
Copy link
Member

@Axelcureno Axelcureno commented Aug 8, 2024

Lets authors add "Starting at" to merch card content before the price.

  • "Starting at" content can be added using the block "property" with the same value.
  • Content is inserted using placeholder {{starting-at}}.

Supported merch card variants:

  • Segment
  • Product
  • Mini compare
  • Catalog
Screenshot 2024-08-08 at 1 12 07 PM

Resolves: MWPW-155057

Test URLs:

@Axelcureno Axelcureno added run-nala Run Nala Test Automation against PR commerce needs-verification PR requires E2E testing by a reviewer merch card labels Aug 8, 2024
@Axelcureno Axelcureno requested a review from mirafedas August 8, 2024 20:12
@Axelcureno Axelcureno self-assigned this Aug 8, 2024
@Axelcureno Axelcureno requested review from a team as code owners August 8, 2024 20:12
Copy link
Contributor

aem-code-sync bot commented Aug 8, 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

aem-code-sync bot commented Aug 8, 2024

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.91%. Comparing base (cfedb3c) to head (de3eb5c).
Report is 1 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #2717      +/-   ##
==========================================
- Coverage   95.91%   95.91%   -0.01%     
==========================================
  Files         173      173              
  Lines       45816    45831      +15     
==========================================
+ Hits        43943    43957      +14     
- Misses       1873     1874       +1     

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

Copy link
Contributor

github-actions bot commented Aug 9, 2024

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

@narcis-radu
Copy link
Contributor

Hey @Axelcureno - I'm not able to see the "starting at" text in your demo page https://mwpw-155057--milo--adobecom.hlx.page/drafts/axel/stories/mwpw-155057?martech=off

@robert-bogos
Copy link
Contributor

@Axelcureno Should we add some unit tests for this?

@Axelcureno
Copy link
Member Author

Hey @Axelcureno - I'm not able to see the "starting at" text in your demo page https://mwpw-155057--milo--adobecom.hlx.page/drafts/axel/stories/mwpw-155057?martech=off

@narcis-radu that's strange, I still see the change. Maybe try clearing cache?

@mirafedas
Copy link
Contributor

@Axelcureno I guess we probably should update the authoring documentation after this change is live

Copy link
Contributor

@overmyheadandbody overmyheadandbody left a comment

Choose a reason for hiding this comment

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

Just a nit for the description:

Content is inserted using placeholder {{starting-as}}.

has a small typo, should be {{starting-at}}, just to avoid any confusion

Copy link
Contributor

@npeltier npeltier left a comment

Choose a reason for hiding this comment

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

nit request

const { replaceKey } = await import('../../features/placeholders.js');
await replaceKey('starting-at', getConfig()).then((key) => {
const startingAt = createTag('div', { slot: 'starting-at' }, key);
const prices = merchCard.querySelectorAll('span[is="inline-price"]');
Copy link
Contributor

Choose a reason for hiding this comment

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

please rather use querySelector if you are just going to use the first one

@afmicka
Copy link
Contributor

afmicka commented Aug 14, 2024

@Axelcureno your changes are adding/exposing   within the price. Could you please take a look? cc: @Roycethan

Could you also update the branch with the stage latest and make sure you don't have stale block so that we can validate the PR? This issue has been seen in the recent Stage to Main PRs.

https://main--cc--adobecom.hlx.live/pl/creativecloud?milolibs=mwpw-155057

Screenshot 2024-08-14 at 13 36 51

@Axelcureno
Copy link
Member Author

@Axelcureno your changes are adding/exposing   within the price. Could you please take a look? cc: @Roycethan

Could you also update the branch with the stage latest and make sure you don't have stale block so that we can validate the PR? This issue has been seen in the recent Stage to Main PRs.

https://main--cc--adobecom.hlx.live/pl/creativecloud?milolibs=mwpw-155057

Screenshot 2024-08-14 at 13 36 51

@afmicka It wasn't my changes that were adding the   but I have updated my branch with latest stage and the characters are now gone.

@Roycethan Roycethan added the verified PR has been E2E tested by a reviewer label Aug 14, 2024
@Roycethan Roycethan added Ready for Stage and removed needs-verification PR requires E2E testing by a reviewer labels Aug 14, 2024
@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Aug 19, 2024

Skipped 2717: "MWPW-155057: Lets authors add "starting at" to merch cards" due to file "libs/deps/mas/merch-card-all.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Aug 20, 2024

Skipped 2717: "MWPW-155057: Lets authors add "starting at" to merch cards" due to file "libs/deps/mas/merch-card-all.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge milo-pr-merge bot merged commit 2abe70f into stage Aug 20, 2024
12 checks passed
@milo-pr-merge milo-pr-merge bot deleted the MWPW-155057 branch August 20, 2024 20:11
@milo-pr-merge milo-pr-merge bot mentioned this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commerce merch card Ready for Stage run-nala Run Nala Test Automation against PR verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants