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

Open
wants to merge 1 commit into
base: popover-component
Choose a base branch
from

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 (3021966) to head (505c800).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           popover-component     #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.


🚨 Try these New Features:

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.

1 participant