-
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: assess all position
to placement
conversions, add unit tests
#44339
Comments
position
to placement
conversions, add unit testsposition
to placement
conversions, add unit tests
I went ahead and checked out the repository before #40740 was merged. I was therefore able to render a I then repeated the same thing on Here's the comparison: All
|
Popover wider than anchor | Anchor wider than Popover |
---|---|
All placement
values
Popover wider than anchor | Anchor wider than Popover |
---|---|
Based on the images above, this should be the expected conversion: (disclaimer: for completeness, I listed all possible combinations of values for the
|
In #44377 I introduced a comprehensive set of unit tests to assess the current status of the returned *:
The inconsistencies can be split into four main groups:
|
With the refactor of
Popover
to usingfloating-ui
internally (#40740), a newplacement
prop was introduced with the objective of replacing the legacyposition
prop.Currently, there is a function converting
position
toplacement
, but:position
accepted the undocumented format[yAxis] [xAxis] [corner]
)placement
prop doesn't allow thePopover
to be placed centered on top of its anchorTherefore, to improve the situation and get ready to deprecate the
position
prop, we should:position
are converted correctly (or in a best-effort way) to the correspondingplacement
The text was updated successfully, but these errors were encountered: