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

Floating UI: Document examples of when autoAlign doesn't work #17017

Open
Tracked by #14139
tay1orjones opened this issue Jul 22, 2024 · 5 comments
Open
Tracked by #14139

Floating UI: Document examples of when autoAlign doesn't work #17017

tay1orjones opened this issue Jul 22, 2024 · 5 comments

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Jul 22, 2024

The floating-ui library powers the collision detection behind the autoAlign prop that is available on multiple components. It uses a position: fixed strategy, which for the majority of cases should ensure floating elements are not clipped by ancestor elements. The floating-ui docs state this approach does not work in 100% of cases.

This issue is for collecting examples of when autoAlign does not successfully position floating elements as we would expect.

If you have an example, please comment below and include:

  1. Describe the issue
  2. Include a screenshot
  3. Provide a stackblitz example using our starter template
@tay1orjones tay1orjones changed the title Document examples of when autoAlign doesn't work Floating UI: Document examples of when autoAlign doesn't work Jul 22, 2024
@embrown-ibm
Copy link

embrown-ibm commented Jul 22, 2024

In my application, I added the autoAlign prop to an IconButton component which appears within a table cell. In my illustrated scenario, the table only has 2 rows and the tooltip area has a height greater than 2 rows (data or header). Thus, you can see that the top row of text within the tooltip is clipped. The line of text that is cut off is Common Name=MB
image

In this second example, there are 3 or 4 lines of text that get clipped from the tooltip. It seems the tooltip is restricted to the table headers and table body but gets clipped by the toolbar.
image

@riddhybansal
Copy link
Contributor

Hey I got an issue in menuButton

Screen.Recording.2024-07-30.at.4.30.57.PM.mov

I guess this is related to collision boundary. Menu getting detached from menuButton and clipping the modal

@crhuff-ibm
Copy link
Contributor

When we have a ToggleTip within a DataTable we get this behavior
image

@ljcarot
Copy link
Member

ljcarot commented Sep 23, 2024

AutoAlign is not working correctly with AI Popover per report from Sean Stuckless https://react.carbondesignsystem.com/iframe.html?args=&id=components-ailabel--playground&viewMode=story
cc: @tay1orjones @sstrubberg

@tay1orjones
Copy link
Member Author

Thanks @ljcarot, I've opened #17571 and included in this sprint

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

No branches or pull requests

5 participants