-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hide Accordion closed Sections instead of unmounting them #2149
Conversation
|
<3 Perfect. Fix the tests and I'll approve :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice optimization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX approved.
91ef9f3
PR Updated:
|
jest.mock('../giftCardSection', () => 'GiftCardSection'); | ||
jest.mock('../GiftOptions', () => 'GiftOptions'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the children get rendered regardless of whether their section is open or not, we have to mock them all.
PR Updated:
|
@supernova-at Not sure how its related but as demo'ed happens only with this PR, works on When try to sign-out from cart page, sign-out does not work and console has this error.
|
Hey @dpatil-magento I was able to reproduce that issue on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved latest commits.
Description
This PR hides accordion section contents that aren't open instead of not rendering them at all.
This saves components from mounting / unmounting on section open changes, but may overfetch (if a section is never opened, its contents may still make network calls).
This PR also sets all price adjustment accordion sections to closed initially, which is the intended UX.
Related Issue
Closes PWA-360.
Acceptance
Verification Stakeholders
Specification
Verification Steps
/cart
pageAccordion
Screenshots / Screen Captures (if appropriate)
Checklist