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

Improve placeholder text phrasing for media blocks #16135

Merged
merged 1 commit into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ export class MediaPlaceholder extends Component {
const isVideo = isOneType && 'video' === allowedTypes[ 0 ];

if ( instructions === undefined && mediaUpload ) {
instructions = __( 'Drag a media file, upload a new one or select a file from your library.' );
instructions = __( 'Upload a media file or pick one from your media library.' );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one doesn't contain the "or add one with a URL" part, because the media & text block doesn't include that option.


if ( isAudio ) {
instructions = __( 'Drag an audio, upload a new one or select a file from your library.' );
instructions = __( 'Upload an audio file, pick one from your media library, or add one with a URL.' );
} else if ( isImage ) {
instructions = __( 'Drag an image, upload a new one or select a file from your library.' );
instructions = __( 'Upload an image file, pick one from your media library, or add one with a URL.' );
} else if ( isVideo ) {
instructions = __( 'Drag a video, upload a new one or select a file from your library.' );
instructions = __( 'Upload a video file, pick one from your media library, or add one with a URL.' );
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class CoverEdit extends Component {
className={ className }
labels={ {
title: label,
instructions: __( 'Drag an image or a video, upload a new one or select a file from your library.' ),
instructions: __( 'Upload an image or video file, or pick one from your media 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 @@ -161,7 +161,7 @@ class FileEdit extends Component {
icon={ <BlockIcon icon={ icon } /> }
labels={ {
title: __( 'File' ),
instructions: __( 'Drag a file, upload a new one or select a file from your library.' ),
instructions: __( 'Upload a file or pick one from your media library.' ),
} }
onSelect={ this.onSelectFile }
notices={ noticeUI }
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 @@ -408,7 +408,7 @@ class ImageEdit extends Component {
const src = isExternal ? url : undefined;
const labels = {
title: ! url ? __( 'Image' ) : __( 'Edit image' ),
instructions: __( 'Drag an image to upload, select a file from your library or add one from an URL.' ),
instructions: __( 'Upload an image, pick one from your media library, or add one with a URL.' ),
};
const mediaPreview = ( !! url && <img
alt={ __( 'Edit image' ) }
Expand Down