-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Maps] use EuiPopover instead of mapbox tooltip #45938
Conversation
💚 Build Succeeded |
💔 Build Failed |
Pinging @elastic/kibana-gis |
💔 Build Failed |
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.
lgtm.
tested in Chrome and code review
<EuiPopover | ||
id="mapTooltip" | ||
button={tooltipAnchor} | ||
anchorPosition="upCenter" |
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.
another slight behavior change is that the anchorPosition no longer changes to leftCenter or rightCenter as the tooltip approaches the left or right edge of the map. If this is not a simple fix I would not worry about it.
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.
ya, not much we can do about that without lots of extra logic.
💔 Build Failed |
💚 Build Succeeded |
* [Maps] use EuiPopover instead of mapbox tooltip * update draw tooltip to use EuiPopover, remove mapbox popup css hacks * use anchor size of 26px to fix positioning calculations * close tooltip when position is no longer visible * remove reevaluateTooltipPosition, its no longer needed * fix problem with map move and hover tooltip location not also moving
* [Maps] use EuiPopover instead of mapbox tooltip * update draw tooltip to use EuiPopover, remove mapbox popup css hacks * use anchor size of 26px to fix positioning calculations * close tooltip when position is no longer visible * remove reevaluateTooltipPosition, its no longer needed * fix problem with map move and hover tooltip location not also moving
Fixes #43694 because now all the tooltip styling is done be EUI component instead of hacky mapbox CSS overrides
Implement Map tooltips with EuiPopover instead of map box tooltip. This provides the benefit that tooltips can now expand beyond the map container border, making tooltips much more usable when the map is embedded in a Dashboard and the map container is small.
There is one new behavior change in this PR. When a locked tooltip location is moved off screen by map moves, the tooltip is automatically closed.