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

Feat: Moves size settings to inspector controls. #65729

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

vipul0425
Copy link
Contributor

What?

Fixes: #65647

Why?

The Social Icons block has a 'size' setting that is placed in a toolbar dropdown menu labeled 'Size', but in other blocks it is there in inspector controls.

How?

This PR moves the size settings to inspector controls.

Testing Instructions

  1. Add the Social Icons Block.
  2. Size settings should be available in the inspector controls panel instead on block toolbar.

Screenshots or screencast

Screen.Recording.2024-09-30.at.1.21.49.PM.mov

Copy link

github-actions bot commented Sep 30, 2024

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: vipul0425 <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: hanneslsm <[email protected]>
Co-authored-by: richtabor <[email protected]>
Co-authored-by: afercia <[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] Enhancement A suggestion for improvement. [Block] Social Affects the Social Block - used to display Social Media accounts labels Oct 1, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Oct 1, 2024

Thanks for the PR!

The ToggleGroupControl may look good in English locale, but not in other locales.

In particular, it will cause strange wrapping in CJK languages.

Japanese (ja)

image

繁體中文 (zh-TW)

image

The approach I can think of is to use actual numbers or icons instead of text, or use the SelectControl component. Also, note that as stated in this comment, this size variation may be expanded in the future.

@vipul0425
Copy link
Contributor Author

Thanks @t-hamano for the review. If the number of options can increase in future then I think selectControl would be an ideal option provided we are not allowing any abstract value.

I have updated the PR with selectControl let me know if anything else needs to be updated 🙇

@t-hamano
Copy link
Contributor

t-hamano commented Oct 1, 2024

@vipul0425 Thanks for the update!

Discussion on this issue is still ongoing in #65647, and it also has been proposed to allow custom values. Let's move forward with this PR once the direction of the discussion is decided. Sorry for the confusion 🙇‍♂️

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] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Social Icons size setting to the inspector
2 participants