-
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
Radio: Deprecate 36px default size #66572
Conversation
@@ -158,6 +158,7 @@ export function CreateTemplatePartModalContents( { | |||
{ templatePartAreas.map( | |||
( { icon, label, area: value, description } ) => ( | |||
<Radio | |||
__next40pxDefaultSize |
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.
@@ -10,9 +10,12 @@ export function maybeWarnDeprecated36pxSize( { | |||
}: { | |||
componentName: string; | |||
__next40pxDefaultSize: boolean | undefined; | |||
size: string; | |||
size: string | undefined; |
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.
Making this explicit instead of optional (size?: string
) to prevent accidental omission when passing arguments to this function.
component: | ||
'This component is deprecated. Use `RadioControl` or `ToggleGroupControl` instead.', |
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.
Adding this description so people visiting the Storybook page can also see what the alternatives are.
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. |
Size Change: +33 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Flaky tests detected in 2124cd4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11579855301
|
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.
* Radio: Deprecate 36px default size * Add changelog * Fix changelog Co-authored-by: mirka <[email protected]> Co-authored-by: tyxla <[email protected]>
Part of #65751
What?
Deprecate the 36px default size on
Radio
, which is a subcomponent of the deprecatedRadioGroup
component.Why?
Technically we could do this without a formal deprecation, since RadioGroup is already deprecated. But due to one remaining usage in the app (#66569), we haven't been able to log a deprecation warning for the component yet, meaning that many existing consumers may not even know this component is deprecated.
Given the circumstances, I think it's reasonable for the size change to have an opt-in grace period like the other components.
Testing Instructions
See Storybook for
RadioGroup
.