-
Notifications
You must be signed in to change notification settings - Fork 679
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
Keeps current Accordion sections open #2147
Keeps current Accordion sections open #2147
Conversation
|
@tjwiebell just told me that UX says to keep the shipping methods open initially. |
Until this bug is merged; latest mocks have all sections collapsed on first render. |
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
…rdion_open_sections
f7f0915
PR Updated:
|
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 fixes the problem where Accordion sections were "resetting" back to their initial state after mutations occurred in subsections (add a coupon, apply a gift card, etc.).
This was because the
useEffect
function that enforced the initial setting of which sections should be open or closed was firing whenever Accordionchildren
changed, which includes the contents of theAccordion
sections. And these sectionschildren
were often changing based on the results of a mutation. For example: a list of gift cards would appear once you apply a gift card.This PR also sets the price adjustments accordion to have all sections closed initially.
Related Issue
Closes PWA-359.
Acceptance
Verification Stakeholders
Specification
Verification Steps
/cart
pageCoupon
orGiftCard
sectionScreenshots / Screen Captures (if appropriate)
Checklist