diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index 9744b5240d0041..5ba19b090d9258 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- `LineHeightControl`: Remove deprecated `__nextHasNoMarginBottom` prop and promote to default behavior ([#64281](https://github.com/WordPress/gutenberg/pull/64281)). + ### Enhancements - `FontFamilyControl`: Add `__nextHasNoMarginBottom` prop for opting into the new margin-free styles ([#64280](https://github.com/WordPress/gutenberg/pull/64280)). diff --git a/packages/block-editor/src/components/global-styles/typography-panel.js b/packages/block-editor/src/components/global-styles/typography-panel.js index f6a389a5bc96d9..9bc875cdc0a308 100644 --- a/packages/block-editor/src/components/global-styles/typography-panel.js +++ b/packages/block-editor/src/components/global-styles/typography-panel.js @@ -474,7 +474,6 @@ export default function TypographyPanel( { panelId={ panelId } > ( ); ``` @@ -37,13 +36,6 @@ The value of the line height. A callback function that handles the application of the line height value. -#### `__nextHasNoMarginBottom` - -- **Type:** `boolean` -- **Default:** `false` - -Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4. (The prop can be safely removed once this happens.) - ## Related components Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [`BlockEditorProvider`](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/provider/README.md) in the components tree. diff --git a/packages/block-editor/src/components/line-height-control/index.js b/packages/block-editor/src/components/line-height-control/index.js index 8150c2d60027e4..d605aea3d2ef18 100644 --- a/packages/block-editor/src/components/line-height-control/index.js +++ b/packages/block-editor/src/components/line-height-control/index.js @@ -1,7 +1,6 @@ /** * WordPress dependencies */ -import deprecated from '@wordpress/deprecated'; import { __ } from '@wordpress/i18n'; import { __experimentalNumberControl as NumberControl } from '@wordpress/components'; @@ -19,8 +18,6 @@ import { const LineHeightControl = ( { value: lineHeight, onChange, - /** Start opting into the new margin-free styles that will become the default in a future version. */ - __nextHasNoMarginBottom = false, __unstableInputWidth = '60px', ...otherProps } ) => { @@ -76,20 +73,6 @@ const LineHeightControl = ( { const value = isDefined ? lineHeight : RESET_VALUE; - if ( ! __nextHasNoMarginBottom ) { - deprecated( - 'Bottom margin styles for wp.blockEditor.LineHeightControl', - { - since: '6.0', - version: '6.4', - hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version', - } - ); - } - const deprecatedStyles = __nextHasNoMarginBottom - ? undefined - : { marginBottom: 24 }; - const handleOnChange = ( nextValue, { event } ) => { if ( nextValue === '' ) { onChange(); @@ -105,10 +88,7 @@ const LineHeightControl = ( { }; return ( -
+
{ export const Default = Template.bind( {} ); Default.args = { - __nextHasNoMarginBottom: true, __unstableInputWidth: '100px', }; diff --git a/packages/block-editor/src/components/line-height-control/test/index.js b/packages/block-editor/src/components/line-height-control/test/index.js index 7a101219f2f827..b98bc93c48a83a 100644 --- a/packages/block-editor/src/components/line-height-control/test/index.js +++ b/packages/block-editor/src/components/line-height-control/test/index.js @@ -19,13 +19,7 @@ const SPIN = STEP * SPIN_FACTOR; const ControlledLineHeightControl = () => { const [ value, setValue ] = useState(); - return ( - - ); + return ; }; describe( 'LineHeightControl', () => { diff --git a/packages/block-editor/src/hooks/line-height.js b/packages/block-editor/src/hooks/line-height.js index fc8bd194c1210c..9c27b9d0269722 100644 --- a/packages/block-editor/src/hooks/line-height.js +++ b/packages/block-editor/src/hooks/line-height.js @@ -39,7 +39,6 @@ export function LineHeightEdit( props ) { return (