Skip to content

Commit

Permalink
Cover block: clear the min height field when aspect ratio is set (#59191
Browse files Browse the repository at this point in the history
)

* Cover block: empty min height field when an aspect ratio is set

* Tidy things slightly

Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
  • Loading branch information
3 people authored Feb 21, 2024
1 parent 8180508 commit c253751
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/cover/edit/inspector-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ export default function CoverInspectorControls( {
panelId={ clientId }
>
<CoverHeightInput
value={ minHeight }
value={
attributes?.style?.dimensions?.aspectRatio
? ''
: minHeight
}
unit={ minHeightUnit }
onChange={ ( newMinHeight ) =>
setAttributes( {
Expand Down

1 comment on commit c253751

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in c253751.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7983296508
📝 Reported issues:

Please sign in to comment.