From 688ff13706638ce0174fff396375468cadc63920 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Fri, 21 Jun 2024 14:46:57 +0200 Subject: [PATCH 1/2] Cover: Update min-height control. --- packages/block-library/src/cover/edit/inspector-controls.js | 5 +++-- packages/block-library/src/cover/test/edit.js | 4 ++-- test/e2e/specs/editor/blocks/cover.spec.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/cover/edit/inspector-controls.js b/packages/block-library/src/cover/edit/inspector-controls.js index 0b05a004cd06e0..39dd425c6272e4 100644 --- a/packages/block-library/src/cover/edit/inspector-controls.js +++ b/packages/block-library/src/cover/edit/inspector-controls.js @@ -73,15 +73,16 @@ function CoverHeightInput( { return ( ); } 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/test/e2e/specs/editor/blocks/cover.spec.js b/test/e2e/specs/editor/blocks/cover.spec.js index fa5103ebaa4eeb..cf3005c9eaa18f 100644 --- a/test/e2e/specs/editor/blocks/cover.spec.js +++ b/test/e2e/specs/editor/blocks/cover.spec.js @@ -158,7 +158,7 @@ test.describe( 'Cover', () => { // 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(); From 5d5711584b29135fcfdf281d2d552600a7c8d4e0 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Mon, 24 Jun 2024 10:52:16 +0200 Subject: [PATCH 2/2] Use classname. --- packages/block-library/src/cover/edit/inspector-controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/cover/edit/inspector-controls.js b/packages/block-library/src/cover/edit/inspector-controls.js index 39dd425c6272e4..80110d5158c2ee 100644 --- a/packages/block-library/src/cover/edit/inspector-controls.js +++ b/packages/block-library/src/cover/edit/inspector-controls.js @@ -79,7 +79,6 @@ function CoverHeightInput( { min={ min } onChange={ handleOnChange } onUnitChange={ onUnitChange } - __unstableInputWidth="calc(50% - 4px)" units={ units } value={ computedValue } size="__unstable-large" @@ -300,6 +299,7 @@ export default function CoverInspectorControls( { ) } !! minHeight } label={ __( 'Minimum height' ) } onDeselect={ () =>