Closed allison-c closed 2 years ago
Latest commit: a9774a98df4ec835456d03b1be6270cd2a3a503c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Purpose π
fix
CollapsibleCard
not controllable issue https://aclgrc.atlassian.net/browse/UXD-2135Notes βοΈ
I know this is not a proper fix π¬
Basically the CollapsibleCard will expand/collapse every time when users click on the card header, even the prop
isCollapsed
doesn't change A proper fix might be always respecting the value ofisCollapsed
prop, if it's notnull
we just don't use the internal state. However that would be a major bump, it might break somewhere in our platform if the consumer usesisCollapsed
So I added some comments and example to demonstrate how to skip the internal state update. I've also checked with our designer, this use case won't be common anyway, we should always let the user expand/collapse the card. We can convert this PR to an issue if we don't want to fix.
Can be tested in the
Controlled
example here http://storybooks.highbond-s3.com/paprika/UXD-2133-fix-collapsible-card-not-controllable/?path=/story/navigation-collapsiblecard--controlled-and-uncontrolledUpdates π¦
If you have changed a component's source code (not stories, specs, or docs), before merging your branch run
yarn changeset
. This will prompt you to:Storybook π
http://storybooks.highbond-s3.com/paprika/UXD-2133-fix-collapsible-card-not-controllable
Screenshots πΈ
optional but highly recommended
References π
relevant Jira ticket / GitHub issues