Skip to content

Commit

Permalink
Update placeholder text for blocks that support drag and drop (WordPr…
Browse files Browse the repository at this point in the history
…ess#66842)

* update image block

* update gallery  block

* update cover block

* update audio block

* update video block

* update file block

* update media and text block

* resolve other image and video fallbacks

* remove 1:1 cover placeholder override

* small clean up

* tweak for gallery

---------

Co-authored-by: matiasbenedetto <[email protected]>
Co-authored-by: richtabor <[email protected]>
Co-authored-by: up1512001 <[email protected]>
  • Loading branch information
4 people authored Nov 8, 2024
1 parent f1a4f1c commit 1a1db8b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,20 +317,20 @@ export function MediaPlaceholder( {

if ( instructions === undefined && mediaUpload ) {
instructions = __(
'Upload a media file or pick one from your media library.'
'Drag and drop an image or video, upload, or choose from your library.'
);

if ( isAudio ) {
instructions = __(
'Upload or drag an audio file here, or pick one from your library.'
'Drag and drop an audio file, upload, or choose from your library.'
);
} else if ( isImage ) {
instructions = __(
'Upload or drag an image file here, or pick one from your library.'
'Drag and drop an image, upload, or choose from your library.'
);
} else if ( isVideo ) {
instructions = __(
'Upload or drag a video file here, or pick one from your library.'
'Drag and drop a video, upload, or choose from your library.'
);
}
}
Expand Down
3 changes: 0 additions & 3 deletions packages/block-library/src/cover/edit/cover-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export default function CoverPlaceholder( {
icon={ <BlockIcon icon={ icon } /> }
labels={ {
title: __( 'Cover' ),
instructions: __(
'Drag and drop onto this block, upload, or select existing media from your library.'
),
} }
onSelect={ onSelectMedia }
accept="image/*,video/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/file/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
labels={ {
title: __( 'File' ),
instructions: __(
'Upload a file or pick one from your media library.'
'Drag and drop a file, upload, or choose from your library.'
),
} }
onSelect={ onSelectFile }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const ALLOWED_MEDIA_TYPES = [ 'image' ];

const PLACEHOLDER_TEXT = Platform.isNative
? __( 'Add media' )
: __( 'Drag images, upload new ones or select files from your library.' );
: __( 'Drag and drop images, upload, or choose from your library.' );

const MOBILE_CONTROL_PROPS_RANGE_CONTROL = Platform.isNative
? { type: 'stepper' }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export function ImageEdit( {
! lockUrlControls &&
! isSmallContainer &&
__(
'Upload or drag an image file here, or pick one from your library.'
'Drag and drop an image, upload, or choose from your library.'
)
}
style={ {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/video/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function VideoEdit( {
icon={ icon }
label={ __( 'Video' ) }
instructions={ __(
'Upload a video file, pick one from your media library, or add one with a URL.'
'Drag and drop a video, upload, or choose from your library.'
) }
>
{ content }
Expand Down

0 comments on commit 1a1db8b

Please sign in to comment.