Repository navigation
Closed
Labels
[Package] Components/packages/components[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.has dev notewhen dev note is done (for upcoming WordPress release)
Description
Part of #46741
In our transition process to the new 40px default sizes, we are now ready to officially start the deprecation period by logging console warnings.
List of components
- BorderBoxControl BorderBoxControl: Deprecate 36px default size #65752
- BorderControl BorderControl: Deprecate 36px default size #65755
- BoxControl BoxControl: Deprecate 36px default size #66704
- Button Button: Deprecate 36px default size #68328
- ComboboxControl ComboboxControl : Deprecate 36px default size #66900
- CustomSelectControl CustomSelectControl: Deprecate 36px default size #67441
- DimensionControl DimensionControl: Deprecate 36px default size #66705
- FontSizePicker FontSizePicker : Deprecate 36px default size #66920
- FormFileUpload FormFileUpload: Deprecate 36px default size #67438
- FormTokenField FormTokenField: Deprecate 36px default size #67454
- InputControl InputControl : Deprecate 36px default size #66897
- NumberControl NumberControl: Deprecate 36px default size #66730
- Radio Radio: Deprecate 36px default size #66572
- RangeControl Feat: Adds the deprecation warning for 36px default size in range control. #66721
- SelectControl SelectControl : Deprecate 36px default size #66898
- TextControl TextControl: Deprecate 36px default size #66745
- ToggleGroupControl ToggleGroupControl : Deprecate 36px default size #66747
- TreeSelect TreeSelect: Deprecate 36px default size #67855
- UnitControl UnitControl : Deprecate 36px default size #66791
Block Editor
- FontAppearanceControl (CustomSelectControl) FontAppearanceControl: Deprecate 36px default size #67854
- FontFamilyControl (CustomSelectControl) FontFamilyControl: Deprecate 36px default size #67853
- LetterSpacingControl (UnitControl) LetteringSpacingControl: Deprecate 36px default size #67429
- LineHeightControl (NumberControl) LineHeightControl: Deprecate 36px default size #67850
Procedure
- [ ] Log deprecation warning
- [ ] Update unit tests
- [ ] Update Storybook (including all stories where the component is used)
- [ ] Update code snippets (Storybook, JSDoc, README)
- [ ] Changelog
- [ ] Add Dev Note tag
If used inside another wp-components component and the parent component is dictating the child component's size dynamically, the parent component is responsible for logging the deprecation warning. To suppress the redundant warning from the child component, add the __shouldNotWarnDeprecated36pxSize prop as shown here for the ToggleGroupControl used inside FontSizePicker.
Success criteria
- [ ] Unit tests must all be passing
- [ ] If used in a Storybook story for another component, it must have the prop so it isn't logging console warnings
Metadata
Metadata
Assignees
Labels
[Package] Components/packages/components[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.has dev notewhen dev note is done (for upcoming WordPress release)
Activity
hbhalodia commentedon Oct 9, 2024
Hi @mirka, I would like to pick some of the controls to add the deprecations. Should I wait until any of the PR get's merged to use the
maybeWarnDeprecated36pxSizeutility function?Thank You,
mirka commentedon Oct 9, 2024
@hbhalodia Awesome! Yes, I'll need to merge those first. I'll ping you when this is ready for contributors 🙏
hbhalodia commentedon Nov 4, 2024
Hi @mirka, I have raised the PR to deprecate
36px default sizeonBoxControl- #66704.Thank You,
hbhalodia commentedon Nov 4, 2024
Hi @mirka, I have raised the PR to deprecate 36px default size on DimensionControl - #66705.
Thank You,
vipul0425 commentedon Nov 4, 2024
Hi @mirka , I have raised the PR for RangeControl - #66721
Thank You 🙇
PARTHVATALIYA commentedon Nov 11, 2024
Hi @mirka, I have raised the PR for InputControl - #66897
Thank You!
mirka commentedon Nov 22, 2024
@hbhalodia @PARTHVATALIYA Unit tests are not passing in the rest of your open PRs. That likely means that the unit tests for the component are not completely updated, and/or some components need a
__shouldNotWarnDeprecated36pxSizeadded. Please check the updated Procedure section in the first issue comment.mirka commentedon Mar 4, 2026
At this point it's likely that we won't do a size deprecation for
@wordpress/componentsButton, and instead wait for the deprecation of the component itself (in favor of the newButtonfrom@wordpress/ui).mirka commentedon Jul 14, 2026
✍️ Dev Note for WP 7.1
40px default size for form controls
Starting in WordPress 7.1,
@wordpress/componentsform controls use a 40px default height unconditionally. The opt-in__next40pxDefaultSizeprop is no longer needed and has no runtime effect when passed.This completes the rollout that followed the soft deprecation in WordPress 6.8. The prop was introduced in WordPress 6.7 so plugins could opt in early. Since 6.8, components that had not opted in logged a console warning.
What changed
__next40pxDefaultSizeis ignored at runtime.__next40pxDefaultSize={ false }no longer opts out to the previous 36px height.BorderBoxControl,BorderControl,FontSizePicker, andToggleGroupControl, thesizeprop is also deprecated and has no effect.What to do
Remove
__next40pxDefaultSizefrom your component usage. No replacement prop is needed.If you were passing
size="__unstable-large"on the components listed only to get 40px height, remove that as well.Affected components
@wordpress/componentsBorderBoxControl,BorderControl,BoxControl,ComboboxControl,CustomSelectControl,FontSizePicker,FormFileUpload,FormTokenField,FocalPointPicker,InputControl,NumberControl,QueryControls,Radio,RangeControl,SearchControl,SelectControl,TextControl,ToggleGroupControl,TreeSelect,UnitControl@wordpress/block-editorFontAppearanceControl,FontFamilyControl,LetterSpacingControl,LineHeightControlNot included
This rollout covers form controls only.
Buttonstill uses the opt-in prop and is unchanged.