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

Update external images panel in post publish sidebar #55524

Merged
merged 3 commits into from
Dec 4, 2023
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 @@ -10,7 +10,6 @@ import {
} from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { upload } from '@wordpress/icons';
import { store as blockEditorStore } from '@wordpress/block-editor';
import { useState } from '@wordpress/element';
import { isBlobURL } from '@wordpress/blob';
Expand Down Expand Up @@ -135,7 +134,7 @@ export default function PostFormatPanel() {
<PanelBody initialOpen={ true } title={ panelBodyTitle }>
<p>
{ __(
'There are some external images in the post which can be uploaded to the media library. Images coming from different domains may not always display correctly, load slowly for visitors, or be removed unexpectedly.'
'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'
) }
</p>
<div
Expand All @@ -153,12 +152,8 @@ export default function PostFormatPanel() {
{ isUploading ? (
<Spinner />
) : (
<Button
icon={ upload }
variant="primary"
onClick={ uploadImages }
>
{ __( 'Upload all' ) }
<Button variant="primary" onClick={ uploadImages }>
{ __( 'Upload' ) }
</Button>
) }
</div>
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/specs/editor/blocks/image.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,9 @@ test.describe( 'Image', () => {
await page
.getByRole( 'button', { name: 'Publish', exact: true } )
.click();
await page.getByRole( 'button', { name: 'Upload all' } ).click();
await page
.getByRole( 'button', { name: 'Upload', exact: true } )
.click();

await expect( page.locator( '.components-spinner' ) ).toHaveCount( 0 );

Expand Down
Loading