-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
fix: Popovers in Explore not attached to the fields they are triggered by #19139
fix: Popovers in Explore not attached to the fields they are triggered by #19139
Conversation
/testenv up |
@rusackas Ephemeral environment spinning up at http://54.187.74.137:8080. Credentials are |
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.
Well done! This looks great. The only quirk I noticed is that if you have a popover open and shrink the actual window (not a common occurrence I'm worried about) the popover becomes misaligned.
This could be fixed by using a debounced function on window resize to call calculatePlacement. But as I said, not too worried about this.
Approving, but also cc-ing @kgabryje since he knows these popovers and their fragilities quite well.
@@ -73,7 +73,10 @@ test('should be visible when controlled', async () => { | |||
Click | |||
</AdhocFilterPopoverTrigger>, | |||
); | |||
expect(screen.getByRole('tooltip')).toBeInTheDocument(); | |||
|
|||
await waitFor(() => { |
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.
I think we can replace waitFor + getByRole
with findByRole
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.
Agreed, thanks!
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.
Amazing work! That's been an issue for SUCH a long time, I'm super happy to see it fixed. Approving, I just left 1 minor comment (feel free to ignore it if the CI passes 😄)
Codecov Report
@@ Coverage Diff @@
## master #19139 +/- ##
==========================================
+ Coverage 66.54% 66.55% +0.01%
==========================================
Files 1646 1647 +1
Lines 63630 63669 +39
Branches 6475 6485 +10
==========================================
+ Hits 42343 42378 +35
- Misses 19607 19609 +2
- Partials 1680 1682 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
752ee43
to
fe351fe
Compare
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Popovers are attached not to the triggers, but rather the overlay on the top of the page. This results in a few problems:
The solution does two things:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2022-03-09.at.13.53.18.mov
After:
Screen.Recording.2022-03-14.at.11.37.18.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION