WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
335 stars 54 forks source link

Add __nextHasNoMarginBottom to BaseControl-based components #728

Closed t-hamano closed 1 month ago

t-hamano commented 1 month ago

As presented in the following issue, BaseControl-based components are planned to have margin-free style as the default behavior.

https://github.com/WordPress/gutenberg/pull/64408

As part of that effort, components that do not have __nextHasNoMarginBottom applied will display a deprecation warning, for example the one below:

Bottom margin styles for wp.components.TextareaControl 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. 

This warning should already be visible on sites where both Gutenberg and CBT are enabled and SCRIPT_DEBUG is true. As this deprecation is shipping in WordPress 6.7, more sites will see the warning.

Before WordPress 6.7 is released, I think it is necessary to identify components that are causing warnings in CBT and fix them.