Skip to content

Conversation

@himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Jun 6, 2025

What?

Part of: #44401

This PR updates the Dropdown component within the Social Link block to use the placement prop instead of the deprecated position prop for its popover.

Why?

The position prop for the Popover component (used internally by Dropdown) has been deprecated in favor of placement. This change aligns the Social Link block with the current component API, ensuring future compatibility and preventing potential warnings or bugs related to deprecated code.

How?

Replaced popoverProps.position with popoverProps.placement in the SocialLinkEdit component. The bottom-start value is the modern equivalent of the previous positioning.

Testing Instructions

  • Open a new post or page in the editor.
  • Insert a "Social Icons" block and add a social link.
  • Make sure the contentOnly mode is enabled and the labels are enabled (enable Show text)
  • In the block toolbar that appears, click on the Text text on the right of the social logo
  • Verify that the dropdown menu appears correctly positioned below the button.

Screencasts

Before After
image image

@himanshupathak95 himanshupathak95 marked this pull request as ready for review June 6, 2025 09:10
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

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: himanshupathak95 <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

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 [Block] Social Affects the Social Block - used to display Social Media accounts labels Jun 9, 2025
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

@Mamaduka Mamaduka added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jun 10, 2025
@github-actions github-actions bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jun 10, 2025
@Mamaduka Mamaduka merged commit 5ec9060 into WordPress:trunk Jun 10, 2025
80 of 84 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.1 milestone Jun 10, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Social Affects the Social Block - used to display Social Media accounts [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