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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Popper] Support marginThreshold prop like in Popover #39

Open
oliviertassinari opened this issue Aug 11, 2023 · 3 comments
Open

[Popper] Support marginThreshold prop like in Popover #39

oliviertassinari opened this issue Aug 11, 2023 · 3 comments
Labels
component: Popper The React component. See <Popup> for the latest version. enhancement This is not a bug, nor a new feature

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 11, 2023

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 馃寛

Motivation 馃敠

Great UX.

This also connects a bit with the effort to modernize the Popper component of mui/material-ui#32587 (comment).

cc @michaldudak

@oliviertassinari oliviertassinari changed the title [Popper] Support marginThreshold like in Popover [Popper] Support marginThreshold prop like in Popover Aug 11, 2023
@michaldudak
Copy link
Member

we are trying to deprecate & remove the Popover component

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.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Aug 30, 2023

@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:

  • Positioning: Solved with Popup/Popper
  • Animation: Solved with animation components
  • Focus: Solved with TrapFocus
  • Modal vs. non-modal: Solved with Modal, with Portal built in.

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.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 14, 2023

mui/mui-x#10009 (comment) raises the question on what the default value for this prop should be.

@michaldudak michaldudak changed the title [Popper] Support marginThreshold prop like in Popover [base-ui][Popper] Support marginThreshold prop like in Popover Oct 11, 2023
@michaldudak michaldudak transferred this issue from mui/material-ui Feb 27, 2024
@michaldudak michaldudak changed the title [base-ui][Popper] Support marginThreshold prop like in Popover [Popper] Support marginThreshold prop like in Popover Feb 27, 2024
@michaldudak michaldudak added the enhancement This is not a bug, nor a new feature label Feb 27, 2024
@oliviertassinari oliviertassinari added the component: Popper The React component. See <Popup> for the latest version. label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popper The React component. See <Popup> for the latest version. enhancement This is not a bug, nor a new feature
Projects
Status: Backlog
Development

No branches or pull requests

2 participants