Skip to content

Conversation

@n7studios
Copy link
Contributor

@n7studios n7studios commented Dec 9, 2025

Summary

The block editor's field controls will use a 40px default height in a future WordPress version.

This PR opts in to this behaviour now by setting the __next40pxDefaultSize and __nextHasNoMarginBottom, resolving the console warnings:

36px default size for wp.components.SelectControl is deprecated since version 6.8 and will be removed in version 7.1. Note: Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.

Bottom margin styles for wp.components.SelectControl is deprecated since version 6.7 and will be removed in version 7.0. Note: Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.

36px default size for wp.components.TextControl is deprecated since version 6.8 and will be removed in version 7.1. Note: Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.

Bottom margin styles for wp.components.TextControl is deprecated since version 6.7 and will be removed in version 7.0. Note: Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.

36px default size for wp.components.ToggleControl is deprecated since version 6.8 and will be removed in version 7.1. Note: Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.

Bottom margin styles for wp.components.ToggleControl is deprecated since version 6.7 and will be removed in version 7.0. Note: Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.

Before:
Screenshot 2025-12-09 at 15 00 02

Screenshot 2025-12-09 at 15 55 41

After:
Screenshot 2025-12-09 at 14 54 30

Screenshot 2025-12-09 at 15 56 12

Testing

Existing tests pass.

Checklist

36px default size for wp.components.SelectControl is deprecated since version 6.8 and will be removed in version 7.1. Note: Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.

Bottom margin styles for wp.components.SelectControl is deprecated since version 6.7 and will be removed in version 7.0. Note: Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.
@n7studios n7studios self-assigned this Dec 9, 2025
Fixes the browser console `Warning: Internal React error: Expected static flag was missing. Please notify the React team.` by using `createElement` for the SandBox component.
@n7studios n7studios changed the title Blocks: SelectControl: Use 40px default size Blocks: Fields: Use 40px default size Dec 9, 2025
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team December 9, 2025 09:11
@n7studios n7studios marked this pull request as ready for review December 9, 2025 09:11
@n7studios n7studios merged commit f4b5a0c into fix-block-keys Dec 10, 2025
70 of 80 checks passed
@github-actions
Copy link

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios deleted the block-control-use-next-40px-default-size branch December 22, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants