Skip to content

MWPW-198383: reconcile mini-compare-mweb collapsible list on resize#968

Open
joaquinrivero wants to merge 1 commit into
mainfrom
MWPW-198383
Open

MWPW-198383: reconcile mini-compare-mweb collapsible list on resize#968
joaquinrivero wants to merge 1 commit into
mainfrom
MWPW-198383

Conversation

@joaquinrivero

@joaquinrivero joaquinrivero commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Resolves https://jira.corp.adobe.com/browse/MWPW-198383
QA Checklist: https://wiki.corp.adobe.com/display/adobedotcom/M@S+Engineering+QA+Use+Cases

The mini-compare-chart-mweb card built its "what's included" toggle once, from the viewport at first render. Crossing the mobile/desktop breakpoint never updated it, so it stayed expanded with no collapse control after desktop-to-mobile. This reconciles the toggle and synced heights on every crossing.

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 Jun 12, 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 Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.22%. Comparing base (907ec77) to head (2e8aaf2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #968      +/-   ##
==========================================
+ Coverage   89.20%   89.22%   +0.02%     
==========================================
  Files         263      263              
  Lines       82698    82759      +61     
==========================================
+ Hits        73767    73840      +73     
+ Misses       8931     8919      -12     
Files with missing lines Coverage Δ
...components/src/variants/mini-compare-chart-mweb.js 97.48% <100.00%> (+0.24%) ⬆️

... and 9 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 907ec77...2e8aaf2. 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.

The "what's included" toggle was configured once at first render, so
crossing the mobile/desktop breakpoint left the list in the wrong mode —
stuck expanded with no collapse control after desktop-to-mobile.

Reconcile the toggle and cross-card heights on a matchMobile change
listener, re-register it on reconnect (a DOM move reuses the instance and
tears the listener down), and clear the grow-only synced heights on mobile
so collapsed cards restore their natural height. Use a monotonic counter
for fallback list ids to avoid Date.now() collisions across sibling cards.
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.

1 participant