diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index 4e261a8a5fba9..6ef7ae6571ccb 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking change + +- `FontSizePicker`: Deprecate bottom margin style. Add a `__nextHasNoMarginBottom` prop to start opting into the margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4 ([#43870](https://github.com/WordPress/gutenberg/pull/43870)). + ## 9.8.0 (2022-08-24) ## 9.7.0 (2022-08-10) diff --git a/packages/block-editor/src/components/font-sizes/README.MD b/packages/block-editor/src/components/font-sizes/README.MD index 69354b90f2a35..adfe0ca8853d8 100644 --- a/packages/block-editor/src/components/font-sizes/README.MD +++ b/packages/block-editor/src/components/font-sizes/README.MD @@ -31,6 +31,7 @@ const MyFontSizePicker = () => { return ( { @@ -79,3 +80,11 @@ If `true`, the UI will contain a slider, instead of a numeric text input field. - Type: `Boolean` - Required: no - Default: `false` + +### __nextHasNoMarginBottom + +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.) + +- Type: `Boolean` +- Required: no +- Default: `false` diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 16dac405bb2be..c255dd04d1c14 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -4,6 +4,7 @@ ### Breaking Changes +- `FontSizePicker`: Deprecate bottom margin style. Add a `__nextHasNoMarginBottom` prop to start opting into the margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4 ([#43870](https://github.com/WordPress/gutenberg/pull/43870)). - `AnglePickerControl`: Deprecate bottom margin style. Add a `__nextHasNoMarginBottom` prop to start opting into the margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4 ([#43867](https://github.com/WordPress/gutenberg/pull/43867)). ### Bug Fix diff --git a/packages/components/src/font-size-picker/README.md b/packages/components/src/font-size-picker/README.md index 48fdf6a4c6f6b..99a320d38f94f 100644 --- a/packages/components/src/font-size-picker/README.md +++ b/packages/components/src/font-size-picker/README.md @@ -29,6 +29,7 @@ const MyFontSizePicker = () => { return ( { export const Default = FontSizePickerWithState.bind( {} ); Default.args = { + __nextHasNoMarginBottom: true, disableCustomFontSizes: false, fontSizes: [ { diff --git a/packages/components/src/font-size-picker/test/index.js b/packages/components/src/font-size-picker/test/index.js index d227f0e9df64f..ca6a8e1a87330 100644 --- a/packages/components/src/font-size-picker/test/index.js +++ b/packages/components/src/font-size-picker/test/index.js @@ -28,7 +28,11 @@ describe( 'FontSizePicker', () => { ); render( - + ); const unitSelect = getUnitSelect(); @@ -52,7 +56,11 @@ describe( 'FontSizePicker', () => { ); render( - + ); const unitSelect = getUnitSelect(); @@ -87,6 +95,7 @@ describe( 'FontSizePicker', () => { fontSizes={ fontSizes } value={ fontSize } onChange={ setFontSize } + __nextHasNoMarginBottom /> ); @@ -123,6 +132,7 @@ describe( 'FontSizePicker', () => { fontSizes={ fontSizes } value={ fontSize } onChange={ setFontSize } + __nextHasNoMarginBottom /> ); @@ -182,6 +192,7 @@ describe( 'FontSizePicker', () => { ); // Trigger click to open the select menu and take into account @@ -199,6 +210,7 @@ describe( 'FontSizePicker', () => { ); const element = screen.getByLabelText( 'Large' ); @@ -218,6 +230,7 @@ describe( 'FontSizePicker', () => { ); const largeElement = screen.getByLabelText( 'Large' );