Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This is a follow-up to #2185. Nested popovers now use the same portal container as un-nested ones.
I believe the original reasons for setting the portal container were so that (1) nested popovers don't appear below the parent and (2) nested popovers do not get rendered outside a
ThemeProvider
. Neither of these is a concern anymore because we now use a<ThemeProvider>
at the end of<body>
as the portal container for everything; anything rendered later will appear later in the DOM and therefore be rendered above (assuming everything else being equal).Fixes #2205 (comment)
Note: #2156 is another issue where we might need to adjust portal containers (again). I will be looking into it after this PR.
Unrelated: I was getting react key errors when
Table
was rendered, so I fixed the keys passed toColumnHeader
.Testing
Manually verified that the date filters in Table stories work ok (see screenshot).
Added e2e tests for:
DateRangeFilter
(which usesPopover
insidePopover
).ComboBox
insidePopover
(as an example of unrelated nested popovers).I'm not sure why the visual test images changed, but the new images look correct so I approved them. The old ones were probably the reason for flaky tests.
Docs
Added
patch
changeset.