Tooltip background is different between Figma and test site
See original GitHub issueFeature Description
Bug bash issue: https://app.asana.com/0/1202258919887896/1202422111202705 please see Asana for background
On the figma designs the tool tip (when you have 2 or more admins) is white background with blank text. Where as on the test site it is grey background with black text. This is quite hard to read. Also the font size is bigger on the figma designs, and easier to read.
Figma:
Chrome:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- A new
Tooltipcomponent should be created to replace our existing usage of the Material UI<Tooltip>component. - The new component should be based on Material UI’s Tooltip, but visually match the style of tooltip used in the [Dashboard Sharing Figma designs].
- All current instances of
import { Tooltip } from '@material-ui/core';should be replaced with our own Tooltip component.
Implementation Brief
PoC PR
A proof-of-concept PR has been added with most of the implementation mentioned below here. This can be used as a starting point, ensuring these next steps:
- There are no console errors.
- Double-check all the file headers, DocBlocks, and comments.
- The styling is accurate.
A summary of the implementation is still mentioned below:
- Rename the existing
Tooltip.jsfile in theassets/js/componentsfolder to something likeJoyrideTooltip.jsorFeatureTourTooltip.js, since it is only used in a few places and mostly within feature tours. Also, update its component definition, stories, and usages across the codebase. - In the same folder, create a new file named
Tooltip.js, which will contain the generic tooltip component that we will create in this issue. In this file:- We will basically create a wrapper for the
Tooltipcomponent from@material-ui/corewith our own CSS selectors and styling. - Export a new component named
Tooltipwhich should explicitly accept the propchildren. The remaining props can be assigned toprops(e.g....props). - Import the
Tooltipcomponent with an alias (e.g.MuiTooltip) from@material-ui/core. - Return
MuiTooltipfrom the component. It should have:- A
classesprop with an object containing a keys:popperwith the value ofgooglesitekit-tooltip-popper.tooltipwith the value ofgooglesitekit-tooltip.- An ‘arrow’ prop should be passed on (with no value, treating it as
true).
- The remaining props assigned to
propspassed to this component as well (e.g.{ ...props }). - The
childrenprop should be passed as the child for this component.
- A
- We will basically create a wrapper for the
- In
assets/sass/components/global/_googlesitekit-tooltip.scss, add the necessary styles according to Figma to the.googlesitekit-tooltip.MuiTooltip-tooltipand the.googlesitekit-tooltip .MuiTooltip-arrowselectors. - Replace the usages of
@material-ui/coreTooltipcomponent with the newTooltipcomponent. - In the existing usages, remove the
classesprop as it is already added in our new component. - Add a Storybook story for this component as well.
Test Coverage
- No tests need to be added/updated.
QA Brief
- Go to the Site Kit Dashboard.
- Verify that the tooltips within the dashboard appear according to the designs included in the issue description. Some tooltips to check include:
- Header action items (e.g. Search, Date Range button, Dashboard Sharing Settings button, Help button, User Profile button).
- Dashboard sharing settings modal info tooltips (shown in the task description).
Changelog entry
- Update tooltip styles.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Tooltip background is different between Figma and test site
Feature Description Bug bash issue: https://app.asana.com/0/1202258919887896/1202422111202705 please see Asana for background On the figma ...
Read more >Create overlays in your prototypes - Figma Help Center
Use overlays to prototype: Alerts or confirmations; Interactive hamburger menus; Tooltips and additional information; On-screen keyboards.
Read more >Trending Resources tagged as tooltip | Figma Community
A plugin for easy measurement of sizes. The simple user interface allows you to add easily redlines for heights and widths, fill spaces,...
Read more >Allow Hover AND Click together - #20 by alexf - Share an idea
The use case is around needing things like tooltips and hover states on a button along with a click. The workaround of embedding...
Read more >Tooltip in color picker - Figma Community Forum
Is it a bug? Can we get it back? It was so useful when wanted to set the color of the background behind...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@eugene-manuilov Thank you very much for the kind and detailed IBR!
Noted, I’ll keep that in mind and not add it in future unless absolutely necessary. Thanks!
Added, thank you!
QA Update ✅