Skip to content

FontSizePicker: Hard deprecate 40px default size#79481

Merged
mirka merged 10 commits into
trunkfrom
hard-deprecate-fontsizepicker-40px
Jun 25, 2026
Merged

FontSizePicker: Hard deprecate 40px default size#79481
mirka merged 10 commits into
trunkfrom
hard-deprecate-fontsizepicker-40px

Conversation

@mirka

@mirka mirka commented Jun 24, 2026

Copy link
Copy Markdown
Member

What?

Follow up to #65751

Remove the deprecated __next40pxDefaultSize and size props from FontSizePicker, making the 40px default size the permanent default.

Why?

The soft deprecation was introduced in WP 6.7 and scheduled to be removed in WP 7.1.

How?

  • Remove __next40pxDefaultSize and size from the FontSizePicker public API and remove maybeWarnDeprecated36pxSize.
  • Keep passing __next40pxDefaultSize internally to embedded UnitControl, RangeControl, CustomSelectControl, and ToggleGroupControl until those primitives are hard-deprecated.
  • Remove all monorepo usages of the props on FontSizePicker.
  • Remove FontSizePicker from the components-no-missing-40px-size-prop ESLint rule and add a restricted-syntax rule for passing the prop to FontSizePicker.

Testing Instructions

  1. Open Storybook to Components / FontSizePicker and smoke test the default story.
  2. Try preset sizes, the select control (>5 sizes), and custom size mode with slider/reset.
  3. Confirm inputs render at 40px height without the prop, and no console warning should be logged.

@github-actions github-actions Bot added [Package] Components /packages/components [Package] Block editor /packages/block-editor labels Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Size Change: -138 B (0%)

Total Size: 7.51 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 382 kB -7 B (0%)
build/scripts/components/index.min.js 264 kB -131 B (-0.05%)

compressed-size-action

@mirka mirka self-assigned this Jun 24, 2026
@mirka mirka added the [Type] Breaking Change For PRs that introduce a change that will break existing functionality label Jun 24, 2026
@mirka mirka marked this pull request as ready for review June 24, 2026 11:46
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Red is good 🧹 🚀

# Conflicts:
#	packages/components/CHANGELOG.md
#	tools/eslint/config.mjs
@mirka mirka enabled auto-merge (squash) June 25, 2026 07:07
@github-actions

Copy link
Copy Markdown

Flaky tests detected in 7dee2e5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28154189165
📝 Reported issues:

@mirka mirka merged commit 8193614 into trunk Jun 25, 2026
45 checks passed
@mirka mirka deleted the hard-deprecate-fontsizepicker-40px branch June 25, 2026 08:02
@github-actions github-actions Bot added this to the Gutenberg 23.6 milestone Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Package] Components /packages/components [Type] Breaking Change For PRs that introduce a change that will break existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants