Skip to content

MWPW-198237: Fix OST and checkout links in compare-chart feature columns#962

Open
yesil wants to merge 5 commits into
mainfrom
MWPW-198237
Open

MWPW-198237: Fix OST and checkout links in compare-chart feature columns#962
yesil wants to merge 5 commits into
mainfrom
MWPW-198237

Conversation

@yesil

@yesil yesil commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fixes the Offer Selector Tool (OST) and checkout links in mas-compare-chart feature columns.

  • Editor: the RTE cell no longer deactivates while a modal (offer selector, link/icon/mnemonic editor) is open — #rteFieldHasOpenModal guards #deactivateRteCell, so opening OST inside a feature column keeps the cell alive. Removes the now-redundant @rte-focusout handler.
  • Render (hydrate.js): data-wcs-osi checkout links in the features slot are now transformed into buttons, matching description-slot behavior, via a new shared processLinks helper reused by both processDescriptionLinks and processFeaturesLinks.
  • Unit test added for features-slot checkout-link transformation (hydrate.test.js).
  • dist/mas.js + dist/merch-card.js rebuilt and committed.

Resolves https://jira.corp.adobe.com/browse/MWPW-198237
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
  • C.6 read your Jira one more time to validate that you've addressed all AC's and nothing is missing

Test URLs:

@yesil yesil added the run nala label Jun 11, 2026
@aem-code-sync

aem-code-sync Bot commented Jun 11, 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

@github-actions

Copy link
Copy Markdown

SNOW Change Request Transaction ID [STUDIO]: 0000019c1eec85a3-12e0fd06

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.30%. Comparing base (a6e2a15) to head (6abcc66).

Files with missing lines Patch % Lines
studio/src/editors/mas-compare-chart-editor.js 84.21% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #962      +/-   ##
==========================================
+ Coverage   89.17%   89.30%   +0.12%     
==========================================
  Files         263      263              
  Lines       82679    82722      +43     
==========================================
+ Hits        73729    73873     +144     
+ Misses       8950     8849     -101     
Files with missing lines Coverage Δ
web-components/src/hydrate.js 92.53% <100.00%> (+0.25%) ⬆️
studio/src/editors/mas-compare-chart-editor.js 73.28% <84.21%> (+3.40%) ⬆️

... and 3 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 a6e2a15...6abcc66. 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.

@Axelcureno Axelcureno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hydrate refactor looks good, and the removed @rte-focusout was genuinely dead.

One blocker: the guard's flags can get stuck. showOfferSelector only clears on select (rte-field.js:1558) — closing OST via Escape/backdrop/Cancel leaves it true, so the cell never deactivates and Escape gets swallowed. Link/icon editors' Cancel dispatches close, but rte-field only binds @save. Suggest clearing the flag on every OST close and binding @close.

Smaller: Escape-revert leaves referencedFragmentStoresHaveChanges stuck true; spectrum="swc" CTAs lose their listener through the innerHTMLunsafeHTML round-trip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants