Refactor EuiToolTip, add EuiPortal#484
Conversation
|
This is good to go on my end and I'm happy with the functionality and code. @cjcenizal is gonna see if he can apply the logic I'm using for calculating position of these to be used in the popovers as well. We might merge this in quicker if that looks like a bigger task. @jen-huang you're welcome to check it out to make sure it works for what you need and make sure I didn't leave out any functionality. |
|
@snide Awesome work! Definitely works for what I need. Just noticed some small things while testing:
|
|
@jen-huang I think I can add an click detector for the first one. The second one is gonna be tricky. Likely some sort of paint timing issue. I'll fool around. |
…ck. Add EuiPortal test.
Improve EuiToolTip accessibility, remove ability to display it on click
cjcenizal
left a comment
There was a problem hiding this comment.
This looks great man! Just had one comment.
src/components/portal/_portal.scss
Outdated
| @@ -0,0 +1,3 @@ | |||
| .euiPortal { | |||
|
|
|||
| } | |||
|
jenkins, test this |
1 similar comment
|
jenkins, test this |
|
Merged. @cjcenizal made the accessibility events work a little cleaner, but it meant we had to drop the clickOnly prop / feature. We can revisit later if we find we really need it. Messed with the repaint concerns to no avail, but since it's such a minor issue and I suspect trouble with the event listener and all the state changes happening here I'm gonna start a new issue to track it. Seemed like a big enough blocker for people we should get this working version in first. |


Closes #401, #71
Rewrites the tooltip set of components. Has the following changes.
Tooltips can now have an optionalThis was removed for accessibility concerns.clickOnlyability for when you want them to show/dismiss on click.EuiPortalwhich transports them to the bottom of the body where they are absolutely positioned (rather than fixed, so they are scrollable) against the body.noOverFlowPlacementservice to becalculatePopoverPositionandcalculatePopoverStyles. They should now be generic enough to work withEuiPopover.Todo
calculatePopoverPostionandcalculatePopoverStylestoEuiPopoveras well.