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: Add detectOverflow configurable collision boundary #16879

Open
1 of 8 tasks
Tracked by #14139
tay1orjones opened this issue Jun 27, 2024 · 4 comments · May be fixed by #16995
Open
1 of 8 tasks
Tracked by #14139

Floating UI: Add detectOverflow configurable collision boundary #16879

tay1orjones opened this issue Jun 27, 2024 · 4 comments · May be fixed by #16995
Assignees
Labels
planning: umbrella Umbrella issues, surfaced in Projects views type: enhancement 💡
Milestone

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Jun 27, 2024

In certain situations consumers may need to customize the boundary/element used to detect collisions. One example of this might be the modal - components like Popover may need to reflow based on the bounds of the modal content container, and not the viewport.

To this we can implement the detectOverflow as a middleware and add props for consumers to pass in their own element and/or padding.

This will need to be done for every component that supports floating ui autoAlign:

Tasks

@tay1orjones tay1orjones changed the title Evaluate if we need to allow consumers to configure floating-ui themselves by exposing more API (additional props? attributes?) and also allowing them to configure the container element to control reflow more granularly/locally than the viewport Floating UI: Add detectOverflow configurable collision boundary Jun 27, 2024
@tay1orjones tay1orjones added planning: umbrella Umbrella issues, surfaced in Projects views type: enhancement 💡 labels Jun 27, 2024
Copy link
Contributor

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

@riddhybansal
Copy link
Contributor

@tay1orjones the issue is in menuButton as well most probably with comboButtons too

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

Here is the stackblitz also.
I guess this comes in collision detection only

@preetibansalui
Copy link
Contributor

Hi @tay1orjones , Just realised, do we need to add hide from Floating UI in tooltip as well? Its hiding itself when tooltip icon is not visible in viewport because its no more hoverable.

@tay1orjones
Copy link
Member Author

tay1orjones commented Aug 21, 2024

The first phase of this will be delivered through:

and then this followup to fully close this issue:

@sstrubberg sstrubberg modified the milestones: 2024 Q3, 2024 Q4 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planning: umbrella Umbrella issues, surfaced in Projects views type: enhancement 💡
Projects
Status: 🚦 In Review
Status: Now 💫
Development

Successfully merging a pull request may close this issue.

4 participants