-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ToggleGroupControl : Deprecate 36px default size #66747
ToggleGroupControl : Deprecate 36px default size #66747
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. |
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.
Looking good!
Let's also add the __next40pxDefaultSize
prop to the story for the ToolsPanel component.
I also pushed a proposal for a way to opt out from the warnings so certain components don't throw redundant warnings: 1b7eeec
packages/components/CHANGELOG.md
Outdated
@@ -24,6 +24,7 @@ | |||
|
|||
- `BorderBoxControl`: Deprecate 36px default size ([#65752](https://github.com/WordPress/gutenberg/pull/65752)). | |||
- `BorderControl`: Deprecate 36px default size ([#65755](https://github.com/WordPress/gutenberg/pull/65755)). | |||
- `ToggleGroupControl`: Deprecate 36px default size ([#66747](https://github.com/WordPress/gutenberg/pull/66747)). |
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.
Let's move this up to the Unreleased section.
@@ -19,6 +19,7 @@ const FontSizePickerToggleGroup = ( props: FontSizePickerToggleGroupProps ) => { | |||
<ToggleGroupControl | |||
__nextHasNoMarginBottom | |||
__next40pxDefaultSize={ __next40pxDefaultSize } | |||
__shouldNotWarnDeprecated36pxSize |
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.
I think we're also going to need a prop like this to prevent the redundant warnings when used inside another component: 1b7eeec
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.
Hi @mirka should we also update the usage of ToggleGroupControl
by adding this prop in other packages as well like block editor and library?
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.
Not that I'm aware of. We only want to suppress the warning when ToggleGroupControl's size is dependent on a parent component's size, and the parent component is responsible for logging the warning. I'm not aware of any other cases like that.
Forgot to mention, the snapshot tests also need to be updated. |
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.
Thanks for the follow-ups! I fixed up a few minor things that were left, but we're good to go 🚀
Part of #65751
What?
Deprecate the 36px default size in ToggleGroupControl.
Testing Instructions