-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(Accordion): allow empty or hidden accordion rows #1767
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## next #1767 +/- ##
==========================================
+ Coverage 92.24% 92.27% +0.02%
==========================================
Files 146 146
Lines 2606 2615 +9
Branches 681 687 +6
==========================================
+ Hits 2404 2413 +9
Misses 186 186
Partials 16 16
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
TBD:
|
4cb254c
to
a481f2c
Compare
); | ||
const accordionButton = screen.getByTestId('accordion-button'); | ||
|
||
await act(async () => { |
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.
Does anything bad happen if we remove the act
?
user.click
is supposed to have that baked into it.
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.
it generates a gross warning when act()
is not present:
Warning: An update to DisclosureFn inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
a481f2c
to
796e29e
Compare
- adding an 'isExpandable' set to falsewill hide the features that afford clicking - add tests to verify this behavior - add new snapshots
796e29e
to
e459f9b
Compare
## [13.4.0](v13.3.0...v13.4.0) (2023-10-03) ### Features * **Accordion:** allow empty or hidden accordion rows ([#1767](#1767)) ([e044a85](e044a85)) * **Icons:** allow component icon usages to be headless ([#1761](#1761)) ([ba454bf](ba454bf)) * **InputField:** support recommendedMaxLength prop for display-only errors ([#1771](#1771)) ([cc84a20](cc84a20)) * **Tabs:** add ability to customize tab button headers ([#1768](#1768)) ([f231ad4](f231ad4)) * **TextareaField:** support recommendedMaxLength prop for display-only errors ([#1769](#1769)) ([0852356](0852356))
Summary:
isExpandable={false}
to anAccordianRow
will hide the feature that afford clickingTest Plan:
edu-stack
ortraject
as a sanity check if changes affect build or deploy, or are breaking, such as token changes, widely used component updates, hooks changes, and major dependency upgrades.