-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Popover: rework props around shift, filp and resize behavior #43191
Comments
Popover
component exposes the __unstableForcePosition
and __unstableShift
props. We should come up with a definitive API strategy (should we allow turning on/off flip
and shift
separately?) and remove those __unstable
props
It turns out I didn't need this to fix the issue with legacy widgets (#43297). But I can still push a PR that refactors this. |
Nearly forgot, I looked at how ariakit's popover works. It seems like that uses a And there's a So that may be another reason to still change the props. |
Thank you for the exploration!
That would be great! |
Reopening as the
@talldan , would you be able to work on this? It should be a quick one. |
What
Tracked in #42770
Currently,
Popover
exposes two props for tweaking its behavior when intersecting with the viewport's boundaries:__unstableForcePosition
__unstableShift
However, it feels like these props don't offer the correct abstraction and actually limit the flexibility of the component.
Proposed next steps
We could look at removing
__unstableForcePosition
and replacing it with separateresize
andflip
props, in order to be more aligned withfloating-ui
's middleware options.Bonus: we should also look at https://ariakit.org/examples/popover, and try to make a potential refactor of the component to
ariakit
as simple as possibleThe text was updated successfully, but these errors were encountered: