-
-
Notifications
You must be signed in to change notification settings - Fork 34
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Popper] Support marginThreshold
prop like in Popover
#39
Comments
marginThreshold
prop like in Popover
Are we? Is there an issue about this? I thought the Popover was intended to be a high-level building block for popups, dialogs, select listboxes, etc. |
@michaldudak I have updated the description, great point. I'm not sure about "dialogs" though. I don't see how it would fit. The problems we need to consider:
I would imagine that the value of Popover is to remove the duplication for very frequent combination of the above. Dialog feels hyper specialized, it could directly compose these 4 components. What I see frequently needed is a slick way to display small element elements on the page, typically, it's always the same animation between Context Menu, Menu, Select, Dropdown, Combobox, Date Picker, Color Pickers, Data Grid pannel. Now, I think Popover source should be very simple, so developers can easily eject and built their own. |
mui/mui-x#10009 (comment) raises the question on what the default value for this prop should be. |
marginThreshold
prop like in PopovermarginThreshold
prop like in Popover
marginThreshold
prop like in PopovermarginThreshold
prop like in Popover
Summary 馃挕
The Popper component is missing the equivalent of the marginThreshold prop of the Popover.
As we are trying to revamp the Popover component, I think we must port this feature back. We have seen in #413 and mui/mui-x#10009 that this prop matters, we can't get away without it.
Examples 馃寛
Radix UI solves this with a custom
collisionPadding
prop on the Popper.Motivation 馃敠
Great UX.
This also connects a bit with the effort to modernize the Popper component of mui/material-ui#32587 (comment).
cc @michaldudak
The text was updated successfully, but these errors were encountered: