Skip to content

Components: Deprecate 36px default size #65751

Closed

Description

@mirka

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

Block Editor

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

Activity

  1. added
    [Package] Components
    [Type] Tracking Issue
    on Sep 30, 2024
  2. self-assigned this
    on Sep 30, 2024
  3. hbhalodia commented on Oct 9, 2024

    @hbhalodia
    Contributor

    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 maybeWarnDeprecated36pxSize utility function?

    Thank You,

  4. mirka commented on Oct 9, 2024

    @mirka
    MemberAuthor

    @hbhalodia Awesome! Yes, I'll need to merge those first. I'll ping you when this is ready for contributors 🙏

  5. hbhalodia commented on Nov 4, 2024

    @hbhalodia
    Contributor

    Hi @mirka, I have raised the PR to deprecate 36px default size on BoxControl - #66704.

    Thank You,

  6. hbhalodia commented on Nov 4, 2024

    @hbhalodia
    Contributor

    Hi @mirka, I have raised the PR to deprecate 36px default size on DimensionControl - #66705.

    Thank You,

  7. vipul0425 commented on Nov 4, 2024

    @vipul0425
    Contributor

    Hi @mirka , I have raised the PR for RangeControl - #66721

    Thank You 🙇

  8. PARTHVATALIYA commented on Nov 11, 2024

    @PARTHVATALIYA
    Contributor

    Hi @mirka, I have raised the PR for InputControl - #66897

    Thank You!

  9. mirka commented on Nov 22, 2024

    @mirka
    MemberAuthor

    @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 __shouldNotWarnDeprecated36pxSize added. Please check the updated Procedure section in the first issue comment.

  10. mirka commented on Mar 4, 2026

    @mirka
    MemberAuthor

    At this point it's likely that we won't do a size deprecation for @wordpress/components Button, and instead wait for the deprecation of the component itself (in favor of the new Button from @wordpress/ui).

  11. mirka commented on Jul 14, 2026

    @mirka
    MemberAuthor

    ✍️ Dev Note for WP 7.1

    40px default size for form controls

    Starting in WordPress 7.1, @wordpress/components form controls use a 40px default height unconditionally. The opt-in __next40pxDefaultSize prop 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

    • Affected components now render at 40px by default without the prop.
    • Passing __next40pxDefaultSize is ignored at runtime.
    • Passing __next40pxDefaultSize={ false } no longer opts out to the previous 36px height.
    • On BorderBoxControl, BorderControl, FontSizePicker, and ToggleGroupControl, the size prop is also deprecated and has no effect.

    What to do

    Remove __next40pxDefaultSize from 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/components

    BorderBoxControl, BorderControl, BoxControl, ComboboxControl, CustomSelectControl, FontSizePicker, FormFileUpload, FormTokenField, FocalPointPicker, InputControl, NumberControl, QueryControls, Radio, RangeControl, SearchControl, SelectControl, TextControl, ToggleGroupControl, TreeSelect, UnitControl

    @wordpress/block-editor

    FontAppearanceControl, FontFamilyControl, LetterSpacingControl, LineHeightControl

    Not included

    This rollout covers form controls only. Button still uses the opt-in prop and is unchanged.

  12. added
    has dev note
    on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Package] Components[Type] Tracking Issuehas dev note

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions