-
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
[K8] [Maps] Fix toolbar overlay styles #96352
[K8] [Maps] Fix toolbar overlay styles #96352
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
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.
styles looks good, just one question wrt highlighting of the zoom +- and fit buttons.
is the highlighting effect supposed to be "sticky"
e.g. the hover-effect remains applied for a little bit, causing sometimes multiple buttons to be highlighted at the same time or remain active "after clicking". e.g. this is not the case for the wrench or go-to button.
Good catch. |
The active "after clicking" is the But I decided to remove the focus state from the buttons because it can induce to think that the button is "active". When using the keyboard the focus ring appears and for now, I think it's a good compromise. We also need to think about the active states for when @aaronjcaldwell introduces the draw tools. They need to show that this "tool" is active. So I think when we reach that point we can revisit the focus and active states. 👍🏽 |
@elasticmachine merge upstream |
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.
Hey, @miukimiu! Left two small comments for your review.
@include kbnThemeStyle($theme: 'v7') { | ||
&:first-child { | ||
border-radius: $euiBorderRadius $euiBorderRadius 0 0; | ||
} | ||
|
||
&:last-child { | ||
border-radius: 0 0 $euiBorderRadius $euiBorderRadius; | ||
} | ||
} | ||
|
||
@include kbnThemeStyle($theme: 'v8') { | ||
&:first-child { | ||
border-radius: ($euiBorderRadius * (2 / 3)) ($euiBorderRadius * (2 / 3)) 0 0; | ||
} | ||
|
||
&:last-child { | ||
border-radius: 0 0 ($euiBorderRadius * (2 / 3)) ($euiBorderRadius * (2 / 3)); | ||
} | ||
} |
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.
Rather than styling the border-radius
of these child buttons, could you instead remove these styles and just place an overflow: hidden;
on the parent .mapboxgl-ctrl-group
element? I believe that would achieve the same appearance with less SCSS. Thoughts?
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.
Thanks @MichaelMarcialis! Great suggestion. I already added. 👍🏽
x-pack/plugins/maps/public/connected_components/toolbar_overlay/_toolbar_overlay.scss
Outdated
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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!
* Fix toolbar overlay styles * More styles * Updating test * Better focus state for mapbox buttons * Mapbox buttons focus * Focus againa * Focus states again * no background only for focus not hover * Adding mixin for button group border radius Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
This PR is fixing:
EuiButtonIcon
in v8. This was fixed by wrapping theEuiButtonIcon
in aEuiPanel
.Checklist