Skip to content

Commit

Permalink
The dimensions panel has been merged. This panel includes controls su…
Browse files Browse the repository at this point in the history
…ch as padding, margin and, soon, height, width and minimum width.

Because the Cover block currently has padding support and features its own custom Dimensions block, there are two "Dimensions" blocks.
Until we can come up with an approach to replace the Cover block's existing Dimensions block, either by activating minimum heights block supports or via SlotFills or otherwise, let's update the copy to remove the duplicate labels.
  • Loading branch information
ramonjd committed Aug 29, 2021
1 parent b4e74b7 commit 30903af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/controls.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function Controls( {
</PanelBody>
) : null }

<PanelBody title={ __( 'Dimensions' ) }>
<PanelBody>
<UnitControl
label={ __( 'Minimum height' ) }
min={ minHeightUnit === 'px' ? COVER_MIN_HEIGHT : 1 }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function CoverHeightInput( {
const min = isPx ? COVER_MIN_HEIGHT : 0;

return (
<BaseControl label={ __( 'Minimum height of cover' ) } id={ inputId }>
<BaseControl id={ inputId }>
<UnitControl
id={ inputId }
isResetValueOnUnitChange
Expand Down Expand Up @@ -536,7 +536,7 @@ function CoverEdit( {
</PanelRow>
</PanelBody>
) }
<PanelBody title={ __( 'Dimensions' ) }>
<PanelBody title={ __( 'Minimum height' ) }>
<CoverHeightInput
value={ temporaryMinHeight || minHeight }
unit={ minHeightUnit }
Expand Down

0 comments on commit 30903af

Please sign in to comment.