-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Social: Moves size settings to inspector controls #70186
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
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Thanks for the PR @vipul0425 Let's change the order of the toggles:
This way the Icon Size is followed by the Show text toggle (both visual) and then comes the new tab setting (behavior). Is easier to understand, I think. Other than that Design LGTM |
I noticed that resetting values for this setting doesn't work correctly. ScreencastCleanShot.2025-05-23.at.11.54.09.mp4 |
Hi @Mamaduka, @hanneslsm I have update the reset filter code and also order of the options. 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @vipul0425!
I think it needs a little more polish, and we're ready to merge. See my review comments.
} ); | ||
} } | ||
dropdownMenuProps={ dropdownMenuProps } | ||
> | ||
<ToolsPanelItem | ||
isShownByDefault | ||
label={ __( 'Open links in new tab' ) } | ||
hasValue={ () => !! openInNewTab } | ||
hasValue={ () => size !== 'has-normal-icon-size' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked={ openInNewTab } | ||
onChange={ () => | ||
label={ __( 'Icon Size' ) } | ||
onChange={ ( entry ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The entry
is too generic, let's use something more specific like newSize
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @vipul0425!
Co-authored-by: vipul0425 <vipulgupta003@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: hanneslsm <hanneslsm@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org>
Fixes: #65647
What?
This PR has changes covered in #65729 with new ToolsPanelItem wrapper and it also resolves other merge conflicts present there.
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
Screenshots or screencast
Screen.Recording.2025-05-22.at.9.26.36.PM.mov