-
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] Lock tooltip in place with click #32733
[Maps] Lock tooltip in place with click #32733
Conversation
Pinging @elastic/kibana-gis |
import mapboxgl from 'mapbox-gl'; | ||
import { FeatureTooltip } from '../feature_tooltip'; | ||
|
||
|
||
const TOOLTIP_TYPE = { |
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.
These are constants used by the store and actions. I think they should be defined in a more global location under public/store
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.
theoretically yes, in practice no. the tooltip-state is only evaluated here to handle moves/clicks correctly. I would move these constants once they are actually being evaluated in the redux flow (e.g, tooltip type will be relevant when trying to preserve tooltips across data-refreshes, but it's not something addressed here).
💚 Build Succeeded |
💚 Build Succeeded |
<EuiFlexGroup direction="column" gutterSize="none"> | ||
<EuiFlexItem grow={true}> | ||
<EuiFlexGroup alignItems="flexEnd" direction="row" justifyContent="spaceBetween"> | ||
<EuiFlexItem> </EuiFlexItem> |
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.
no flexing happens when only single element
💚 Build Succeeded |
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
code review, tested in chrome
Clicking on a feature now locks the tooltip in place.
This is a small improvement, only adding the click behavior. It does not modify the contents or format of the actual tooltip.