Skip to content

Components: add placement prop to replace position in RangeControl - #70326

Merged
Mamaduka merged 8 commits into
WordPress:trunkfrom
im3dabasia:try/position-to-placement
Jul 29, 2025
Merged

Mamaduka merged 8 commits into
WordPress:trunkfrom
im3dabasia:try/position-to-placement

Conversation

@im3dabasia

Copy link
Copy Markdown
Contributor

What?

Part of: #44401

Replaces the position={...} prop used in the Tooltip styled component with the placement prop.

Why?

Since Tooltip uses the placement prop after the deprecation of the position prop, it would make sense to have uniformity and consistency in the remaining codebase by using the same placement prop for Tooltip positioning. This instance in RangeControl uses a locally made Tooltip and was using the position prop, so I replaced it with placement

How?

This is an internal prop, so I simply changed it from position to placement in the corresponding places

Testing Instructions

Since this is a code quality improvement, it would not have testing as such, but it can be tested in Storybook:

  1. Run npm run storybook:dev
  2. Checkout the RangeControl component
  3. Enable the tooltip
  4. Verify that it works correctly
  5. Additionally, you can test by replacing bottom with top in this place and refresh Storybook to see if the position changes to top

@im3dabasia
im3dabasia requested a review from ajitbohra as a code owner June 5, 2025 05:29
@github-actions

github-actions Bot commented Jun 5, 2025 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Jun 6, 2025
@im3dabasia
im3dabasia force-pushed the try/position-to-placement branch from 0a6649f to fe76a54 Compare June 24, 2025 09:16
@im3dabasia

Copy link
Copy Markdown
Contributor Author

@Mamaduka ,

When you have a moment, please review my PR 🙇

@Mamaduka

Copy link
Copy Markdown
Member

@im3dabasia, can you rebase this branch on top of the latest trunk and add the changelog entry for this internal change?

@im3dabasia
im3dabasia force-pushed the try/position-to-placement branch from 7730eb5 to fc0cf74 Compare July 29, 2025 03:50

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @im3dabasia!

The changes work as expected ✅

@Mamaduka
Mamaduka merged commit 85342f8 into WordPress:trunk Jul 29, 2025
@github-actions github-actions Bot added this to the Gutenberg 21.4 milestone Jul 29, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Jul 31, 2025
…ol` (WordPress#70326)

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
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.

3 participants