-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Package] Components/packages/components/packages/components
Description
With the refactor of Popover
to using floating-ui
internally (#40740), a new placement
prop was introduced with the objective of replacing the legacy position
prop.
Currently, there is a function converting position
to placement
, but:
- its logic is complicated and difficult to follow
- its logic could potentially miss some edge cases:
- it looks like
position
accepted the undocumented format[yAxis] [xAxis] [corner]
) - it looks like the new
placement
prop doesn't allow thePopover
to be placed centered on top of its anchor
- it looks like
- its logic is not covered by unit tests (which makes the previous checks necessary)
Therefore, to improve the situation and get ready to deprecate the position
prop, we should:
- Assess that all possible values of
position
are converted correctly (or in a best-effort way) to the correspondingplacement
- Write unit tests
- Potentially make changes to the conversion logic to respect the tests added from the previous point
Metadata
Metadata
Assignees
Labels
[Package] Components/packages/components/packages/components