Skip to content

Commit

Permalink
Update Welcome Guides to use external image URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed May 28, 2021
1 parent 8191eed commit 6bdb876
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 120 deletions.
16 changes: 0 additions & 16 deletions packages/customize-widgets/src/components/welcome-guide/images.js

This file was deleted.

16 changes: 14 additions & 2 deletions packages/customize-widgets/src/components/welcome-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useDispatch } from '@wordpress/data';
/**
* Internal dependencies
*/
import { EditorImage } from './images';
import { store as customizeWidgetsStore } from '../../store';

export default function WelcomeGuide( { sidebar } ) {
Expand All @@ -22,7 +21,20 @@ export default function WelcomeGuide( { sidebar } ) {

return (
<div className="customize-widgets-welcome-guide">
<EditorImage />
<img
className="customize-widgets-welcome-guide__image customize-widgets-welcome-guide__image__prm-np"
alt=""
src="https://s.w.org/images/block-editor/welcome-editor.gif"
width="312"
height="240"
/>
<img
className="customize-widgets-welcome-guide__image customize-widgets-welcome-guide__image__prm-r"
alt=""
src="https://s.w.org/images/block-editor/welcome-editor.svg"
width="312"
height="240"
/>
<h1 className="customize-widgets-welcome-guide__heading">
{ __( 'Welcome to block Widgets' ) }
</h1>
Expand Down
40 changes: 30 additions & 10 deletions packages/edit-post/src/components/welcome-guide/images.js

Large diffs are not rendered by default.

80 changes: 0 additions & 80 deletions packages/edit-widgets/src/components/welcome-guide/images.js

This file was deleted.

89 changes: 77 additions & 12 deletions packages/edit-widgets/src/components/welcome-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ import { createInterpolateElement } from '@wordpress/element';
/**
* Internal dependencies
*/
import {
CanvasImage,
EditorImage,
BlockLibraryImage,
DocumentationImage,
InserterIconImage,
} from './images';
import { store as editWidgetsStore } from '../../store';

export default function WelcomeGuide() {
Expand Down Expand Up @@ -60,7 +53,24 @@ export default function WelcomeGuide() {
onFinish={ () => toggleFeature( 'welcomeGuide' ) }
pages={ [
{
image: <CanvasImage />,
image: (
<>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-np"
alt=""
src="https://s.w.org/images/block-editor/welcome-canvas.gif"
width="312"
height="240"
/>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-r"
alt=""
src="https://s.w.org/images/block-editor/welcome-canvas.svg"
width="312"
height="240"
/>
</>
),
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
Expand Down Expand Up @@ -109,7 +119,24 @@ export default function WelcomeGuide() {
),
},
{
image: <EditorImage />,
image: (
<>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-np"
alt=""
src="https://s.w.org/images/block-editor/welcome-editor.gif"
width="312"
height="240"
/>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-r"
alt=""
src="https://s.w.org/images/block-editor/welcome-editor.svg"
width="312"
height="240"
/>
</>
),
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
Expand All @@ -124,7 +151,24 @@ export default function WelcomeGuide() {
),
},
{
image: <BlockLibraryImage />,
image: (
<>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-np"
alt=""
src="https://s.w.org/images/block-editor/welcome-library.gif"
width="312"
height="240"
/>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-r"
alt=""
src="https://s.w.org/images/block-editor/welcome-library.svg"
width="312"
height="240"
/>
</>
),
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
Expand All @@ -137,7 +181,11 @@ export default function WelcomeGuide() {
),
{
InserterIconImage: (
<InserterIconImage className="edit-widgets-welcome-guide__inserter-icon" />
<img
className="edit-widgets-welcome-guide__inserter-icon"
alt={ __( 'inserter' ) }
src="data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
/>
),
}
) }
Expand All @@ -146,7 +194,24 @@ export default function WelcomeGuide() {
),
},
{
image: <DocumentationImage />,
image: (
<>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-np"
alt=""
src="https://s.w.org/images/block-editor/welcome-documentation.gif"
width="312"
height="240"
/>
<img
className="edit-widgets-welcome-guide__image edit-widgets-welcome-guide__image__prm-r"
alt=""
src="https://s.w.org/images/block-editor/welcome-documentation.svg"
width="312"
height="240"
/>
</>
),
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
Expand Down

0 comments on commit 6bdb876

Please sign in to comment.