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
Popovercomponent, the legacypositionprop has been marked as deprecated. The newerplacementprop should be used instead. Thepositionprop is scheduled to be removed in WordPress 6.4.What?
Add a deprecation warning for the
positionprop for thePopovercomponent.Note: this PR should only be merged once all instance of
Popoverin the repository have been migrated from using thepositionprop to theplacementpropWhy?
With the refactor to
floating-ui(#40740), a newplacementprop was introduced to position the Popover. We should therefore remove the legacypositionprop 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:
positionprop written in the consoletrunk