Skip to content

Commit

Permalink
Update external images panel in post publish sidebar (#55524)
Browse files Browse the repository at this point in the history
* Update view

* Fix test
  • Loading branch information
richtabor authored Dec 4, 2023
1 parent e3ef008 commit 857b8b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
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

0 comments on commit 857b8b8

Please sign in to comment.