Skip to content
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: deprecate the position prop #44386

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Sep 22, 2022

Dev Note:

Following the recent refactors on the Popover component, the legacy position prop has been marked as deprecated. The newer placement prop should be used instead. The position prop is scheduled to be removed in WordPress 6.4.

What?

Add a deprecation warning for the position prop for the Popover component.

Note: this PR should only be merged once all instance of Popover in the repository have been migrated from using the position prop to the placement prop

Why?

With the refactor to floating-ui (#40740), a new placement prop was introduced to position the Popover. We should therefore remove the legacy position 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:

  • make sure that there are no deprecation warnings about the position prop written in the console
  • make sure that all Popover instances keep behaving like on trunk

@ciampo ciampo added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components Needs Dev Note Requires a developer note for a major WordPress release cycle labels Sep 22, 2022
@ciampo ciampo self-assigned this Sep 22, 2022
@getdave getdave removed the Needs Dev Note Requires a developer note for a major WordPress release cycle label Feb 28, 2024
@getdave
Copy link
Contributor

getdave commented Feb 28, 2024

Removing Needs Dev Note label as this PR is not merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants