Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak metrics and labels for background size controls #58854

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions packages/block-editor/src/hooks/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ function BackgroundImagePanelItem( {

function backgroundSizeHelpText( value ) {
if ( value === 'cover' || value === undefined ) {
return __( 'Stretch image to cover the block.' );
return __( 'Image covers the space evenly.' );
}
if ( value === 'contain' ) {
return __( 'Resize image to fit without cropping.' );
return __( 'Image is contained without distortion.' );
}
return __( 'Set a fixed width.' );
return __( 'Specify a fixed width.' );
}

export const coordsToBackgroundPosition = ( value ) => {
Expand Down Expand Up @@ -510,7 +510,6 @@ function BackgroundSizePanelItem( {
panelId={ clientId }
>
<FocalPointPicker
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Position' ) }
url={ style?.background?.backgroundImage?.url }
Expand All @@ -520,7 +519,6 @@ function BackgroundSizePanelItem( {
onChange={ updateBackgroundPosition }
/>
<ToggleGroupControl
__nextHasNoMarginBottom
size={ '__unstable-large' }
label={ __( 'Size' ) }
value={ currentValueForToggle }
Expand Down Expand Up @@ -555,8 +553,7 @@ function BackgroundSizePanelItem( {
) : null }
{ currentValueForToggle !== 'cover' && (
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Repeat image' ) }
label={ __( 'Repeat' ) }
checked={ repeatCheckedValue }
onChange={ toggleIsRepeated }
/>
Expand Down
Loading