Skip to content

MWPW-193415: [wcs] switch to pre-formatted price - #1180

Open
joaquinrivero wants to merge 3 commits into
mainfrom
MWPW-193415
Open

MWPW-193415: [wcs] switch to pre-formatted price#1180
joaquinrivero wants to merge 3 commits into
mainfrom
MWPW-193415

Conversation

@joaquinrivero

@joaquinrivero joaquinrivero commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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

Switches WCS price rendering to the pre-formatted priceInfo strings from WCS instead of client-side formatting of priceDetails, for the price types WCS pre-formats

QA Checklist: https://wiki.corp.adobe.com/display/adobedotcom/M@S+Engineering+QA+Use+Cases

Please do the steps below before submitting your PR for a code review or QA

  • C1. Cover code with Unit Tests
  • C2. Add a Nala test (double check with #fishbags if nala test is needed)
  • C3. Verify all Checks are green (unit tests, nala tests)
  • C4. PR description contains working Test Page link where the feature can be tested
  • C5: you are ready to do a demo from Test Page in PR (bonus: write a working demo script that you'll use on Thursday, you can eventually put in your PR)
  • C.6 read your Jira one more time to validate that you've addressed all AC's and nothing is missing

🧪 Nala E2E Tests

Nala tests run automatically when you open this PR.

To run Nala tests again:

  1. Add the run nala label to this PR (in the right sidebar)
  2. Tests will run automatically on the current commit
  3. Any future commits will also trigger tests as long as the label remains

To stop automatic Nala tests:

  • Remove the run nala label

Note: Tests only run on commits if the run nala label is present. Add the label whenever you need tests to run on new changes.

Test URLs:

@aem-code-sync

aem-code-sync Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

  • Re-sync branch
Commits

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.68%. Comparing base (f888284) to head (6b5a64a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1180      +/-   ##
==========================================
+ Coverage   90.63%   90.68%   +0.04%     
==========================================
  Files         308      308              
  Lines       99164    99290     +126     
==========================================
+ Hits        89881    90039     +158     
+ Misses       9283     9251      -32     
Files with missing lines Coverage Δ
web-components/src/inline-price.js 98.27% <100.00%> (+2.11%) ⬆️
web-components/src/price/template.js 98.98% <100.00%> (+0.04%) ⬆️
web-components/src/price/utilities.js 99.14% <100.00%> (+0.22%) ⬆️
web-components/src/utilities.js 97.63% <100.00%> (+0.02%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f888284...6b5a64a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joaquinrivero
joaquinrivero force-pushed the MWPW-193415 branch 3 times, most recently from 25dec11 to d153d8a Compare August 25, 2026 23:52
* @param { boolean } usePrecision
* @returns {{ currencySymbol: string, decimals: string, decimalsDelimiter: string, hasCurrencySpace: boolean, integer: string, isCurrencyFirst: boolean } | null}
*/
const splitFormattedPrice = (formatted, formatString, usePrecision) => {

@npeltier npeltier Aug 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@joaquinrivero if we are going to hack around the price string, let's not repeat original mistake, and ask WCS team to return

        currencySymbol,
        decimals,
        decimalsDelimiter,
        hasCurrencySpace,
        integer,
        isCurrencyFirst,

directly in priceInfo, wdyt?

* origin/main:
  MWPW-205209 Merch Icon URLs Relative (#1188)
  MWPW-200943: load entitlements from the offer found by ID search (#1156)
  MWPW-206050: limit executions to only our runners (#1189)
  MWPW-204765 CTA data-key field in RTE (#1167)
  MWPW-204645: Reduce promotions editor Odin load for large projects (#1160)

# Conflicts:
#	web-components/dist/commerce.js
#	web-components/dist/mas.js
* origin/main:
  MWPW-204106 fix(pro): drop obsolete one-merch-card top-spacing override (#1181)
  MWPW-202718: use geo tags for settings overrides (#1192)

# Conflicts:
#	web-components/dist/commerce.js
#	web-components/dist/mas.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants