Skip to content
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

[Bug]: CopyButton tooltip wrong styles and inconsistent #10524

Closed
2 tasks done
David-Yuen opened this issue Jan 25, 2022 · 2 comments
Closed
2 tasks done

[Bug]: CopyButton tooltip wrong styles and inconsistent #10524

David-Yuen opened this issue Jan 25, 2022 · 2 comments

Comments

@David-Yuen
Copy link

Package

carbon-components-react

Browser

Chrome

Package version

v7.51.0 (latest)

React version

v17.0.2

Description

When hovering over the CopyButton, the tooltip that appears on the icon is different from the one from Button.
Both are considered "Buttons" (but implemented differently) and with icons, and it would be expected that the iconDescription should operate the same.

But instead, when hovering over a CopyButton, it uses i think the html version of a tooltip.. It should be using carbon's tooltip instead.
Screen Shot 2022-01-25 at 2 54 05 PM
I am not able to do a screenshot of this tooltip in windows, so this screenshot is from mac instead. On my mac, it is currently set to Dark mode possibly why this tooltip has a darker background. But in windows, this version of the tooltip has a background color that is more white.
So within this version of the tooltip, it is already inconsistent to our web application, because it depends on the OS/browser instead.
The feedback tooltip is correct, but the hover-over tooltip uses the wrong version and creates inconsistencies.

When using Button (hasIconOnly flag on), you can set the iconDescription and it will use the carbon's tooltip.
Screen Shot 2022-01-25 at 2 50 19 PM

The tooltip design, padding, color, etc.. all styles, timing, functionality are different here, but both CopyButton and Button (with hasIconOnly) is still a button with an icon. It should be consistent

Simply, CopyButton should re-use carbon's tooltip version (and allow tooltip configurations like position and alignment) would resolve all the above inconsistencies.

CodeSandbox example

https://codesandbox.io/s/modest-ishizaka-ovn5p

Steps to reproduce

Create a CopyButton component, and add a string value to iconDescription.
Run application and mouse hover over the button. The tooltip will appear

Code of Conduct

@David-Yuen David-Yuen changed the title [Bug]: CopyButton iconDescription wrong style [Bug]: CopyButton tooltip wrong styles and inconsistent Jan 25, 2022
@tay1orjones
Copy link
Member

Related: #10518

@sstrubberg
Copy link
Member

Looks like this was taken care of in a different issue. Feel free to re-open if I got that wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants