diff --git a/.eslintrc.js b/.eslintrc.js index 13362e76c4e473..03c4fd78385277 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -323,6 +323,7 @@ module.exports = { 'FontSizePicker', 'FormTokenField', 'InputControl', + 'LetterSpacingControl', 'LineHeightControl', 'NumberControl', 'RangeControl', @@ -343,13 +344,15 @@ module.exports = { 'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', }, // Temporary rules until all existing components have the `__next40pxDefaultSize` prop. - ...[ 'SelectControl' ].map( ( componentName ) => ( { - // Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated. - selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`, - message: - componentName + - ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', - } ) ), + ...[ 'SelectControl', 'UnitControl' ].map( + ( componentName ) => ( { + // Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated. + selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`, + message: + componentName + + ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', + } ) + ), ], }, }, diff --git a/packages/block-editor/src/components/global-styles/dimensions-panel.js b/packages/block-editor/src/components/global-styles/dimensions-panel.js index 5711e16ffadcb1..241d3bb93d1b13 100644 --- a/packages/block-editor/src/components/global-styles/dimensions-panel.js +++ b/packages/block-editor/src/components/global-styles/dimensions-panel.js @@ -476,6 +476,8 @@ export default function DimensionsPanel( { > @@ -628,8 +635,8 @@ export default function DimensionsPanel( { /> ) : (
@@ -299,6 +299,7 @@ export default function CoverInspectorControls( { ) } !! minHeight } label={ __( 'Minimum height' ) } onDeselect={ () => diff --git a/packages/block-library/src/cover/test/edit.js b/packages/block-library/src/cover/test/edit.js index ab99d3c555e3bc..ca34c15d0b7ec6 100644 --- a/packages/block-library/src/cover/test/edit.js +++ b/packages/block-library/src/cover/test/edit.js @@ -372,10 +372,10 @@ describe( 'Cover block', () => { } ) ); await userEvent.clear( - screen.getByLabelText( 'Minimum height of cover' ) + screen.getByLabelText( 'Minimum height' ) ); await userEvent.type( - screen.getByLabelText( 'Minimum height of cover' ), + screen.getByLabelText( 'Minimum height' ), '300' ); diff --git a/packages/block-library/src/post-featured-image/dimension-controls.js b/packages/block-library/src/post-featured-image/dimension-controls.js index fa0f022332b0cb..b31b68b7811976 100644 --- a/packages/block-library/src/post-featured-image/dimension-controls.js +++ b/packages/block-library/src/post-featured-image/dimension-controls.js @@ -134,8 +134,7 @@ const DimensionControls = ( { panelId={ clientId } > { // Ensure there the default value for the minimum height of cover is undefined. const defaultHeightValue = await coverBlockEditorSettings - .getByLabel( 'Minimum height of cover' ) + .getByLabel( 'Minimum height' ) .inputValue(); expect( defaultHeightValue ).toBeFalsy();