-
Notifications
You must be signed in to change notification settings - Fork 4.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
Tweak margin and padding of toolbar icon buttons #18144
Conversation
If the tooltip is purposely remaining hoverable, and if clicking the tooltip is purposely invoking a click on the thing it is a tooltip for, then this PR provides a nice visual improvement, but does not address the interaction bugs. This looks much better though! |
I agree this looks better, however it doesn't yet solve #12260. @enriquesanchez can we also explore keeping the hover state when hovering a tooltip in this PR? |
I'm having trouble figuring out how to get the button to stay hovered while also hovering the tooltip. @ItsJonQ do you think you could help me? We want to have the button maintain its hover state while the tooltip is being hovered. |
@enriquesanchez Haii!! Without hacking the JS directly... For CSS work, the best work-around I found for these interactions is...
This freezes the document, keeping the tooltip open. Hope this helps 🙏 |
@ItsJonQ I think the problem with this is because the tooltip HTML doesn't appear inside the icon's HTML. So as soon as you hover away from the icon, it no longer shows as hovered. It's not behaving like a dropdown menu might. Is there a way to move the HTML inside the icon so it acts like a dropdown? |
@mapk We actually don't want that to happen. As far as App UI goes, it's preferable for the dropdown/popover box to be rendered at the root level. The reason is to better consistency + control over styles. Otherwise, nested CSS or things like
@enriquesanchez To do this, we'll need to update the JS code for the Tooltip/Popover system to allow for this :) |
Now that the G2 UI changes have landed in |
Fixes 1/3 of #12260
Description
This PR tweaks the margin and padding of the toolbar icon buttons in order to give their corresponding tooltips more breathing room when hovering.
How has this been tested?
Tested on Firefox, Safari and Chrome (Mac), on large and narrow viewports.
Screenshots
Before:
After:
Types of changes
CSS and visual.
Checklist: