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]: OverflowMenu tooltip should support auto align (like the stand alone Tooltop), currently it gets cropped off when the container ends #17305

Open
2 tasks done
Mikadv opened this issue Aug 30, 2024 · 2 comments

Comments

@Mikadv
Copy link

Mikadv commented Aug 30, 2024

Package

@carbon/react

Browser

Chrome, Safari, Firefox, Edge

Package version

@carbon/[email protected]

React version

17.0.2

Description

Problem

When the OverflowMenu is placed at the corner of an container the tooltip that is now with Carbon 11 rendered by default is cropped of. There is no option to bypass this problem, except ugly JavaScript or CSS hacking.

Here is an example with DataTable:

image

Here is an example with the component right in the story book:

image

Expectation

From the carbon Tooltip component I saw the autoAlign prop that does this magic for us: Always shows the tooltip proper. I adore it really much, since it always lets it display proper, no matter where this tooltip is or how small or big the browser window is. But here for the OverflowMenu it is not there. Only manual alignments. Since in the underlaying component you anyhow use a Tooltip provide also a autoAlign prop for the OverflowMenu and bubble it down.

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-overflowmenu--playground&args=aria-label:A+very+long+text+that+gets+cropped+off;iconDescription:A+very+long+text+that+gets+cropped+off

Steps to reproduce

  1. Open the link
  2. Hover the OverflowMenu button.
  3. Experience what you see above in the image.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

IKC

Code of Conduct

@guidari
Copy link
Contributor

guidari commented Aug 30, 2024

OverflowMenu is using IconButton that uses the Tooltip .
We should add the autoAlign prop to the IconButton as default OR maybe add to the OverflowMenu an option to enable that by a prop.
Setting the autoAlign as default might be the best approach to fix that.

@Mikadv
Copy link
Author

Mikadv commented Sep 3, 2024

I realized this is also for the Pagination component the case. And I assume for any other that has now the Tooltip build in

FYI @guidari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

2 participants