Skip to content
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

Do not render Popover children while closed #1792

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Nov 22, 2024

Depends on #1791

Make sure the Popover component renders its children only while it's open.

This also removes the requirement to control this in the Select component, while adding the same benefit for other places where we use Popover.

@@ -79,7 +79,7 @@ describe('Select', () => {
const toggleListbox = wrapper => getToggleButton(wrapper).simulate('click');

const isListboxClosed = wrapper =>
wrapper.find('[role="listbox"]').prop('data-listbox-open') === false;
wrapper.find('Popover').prop('open') === false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only change needed to fix a bunch of failing Select tests.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7abad76) to head (2f320de).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1792   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           68        68           
  Lines         1220      1220           
  Branches       465       465           
=========================================
  Hits          1220      1220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from popover-component to main November 26, 2024 08:37
@acelaya acelaya force-pushed the empty-closed-popover branch from 505c800 to 2f320de Compare November 26, 2024 08:39
@acelaya acelaya merged commit 54d82ea into main Nov 26, 2024
4 checks passed
@acelaya acelaya deleted the empty-closed-popover branch November 26, 2024 08:42
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.

2 participants