Popover: deprecate the position prop #44386
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dev Note:
Following the recent refactors on the
Popover
component, the legacyposition
prop has been marked as deprecated. The newerplacement
prop should be used instead. Theposition
prop is scheduled to be removed in WordPress 6.4.What?
Add a deprecation warning for the
position
prop for thePopover
component.Note: this PR should only be merged once all instance of
Popover
in the repository have been migrated from using theposition
prop to theplacement
propWhy?
With the refactor to
floating-ui
(#40740), a newplacement
prop was introduced to position the Popover. We should therefore remove the legacyposition
prop to avoid having two props achieving the same goal.How?
Add a warning notice.
Preparatory work has been carried out in other PRs (see #42770 for more details)
Testing Instructions
Do a general smoke test across Gutenberg and:
position
prop written in the consoletrunk