Page 1 } ] }
+ />
);
wrapper.find( '.components-guide__finish-button' ).simulate( 'click' );
expect( onFinish ).toHaveBeenCalled();
@@ -80,9 +86,10 @@ describe( 'Guide', () => {
it( 'calls onFinish when the modal is closed', () => {
const onFinish = jest.fn();
const wrapper = shallow(
-
- Page 1
-
+ Page 1 } ] }
+ />
);
wrapper.find( Modal ).prop( 'onRequestClose' )();
expect( onFinish ).toHaveBeenCalled();
diff --git a/packages/edit-post/src/components/welcome-guide/images.js b/packages/edit-post/src/components/welcome-guide/images.js
index f809e54ce40d7..bdaf23deb1b72 100644
--- a/packages/edit-post/src/components/welcome-guide/images.js
+++ b/packages/edit-post/src/components/welcome-guide/images.js
@@ -4,35 +4,71 @@
import { __ } from '@wordpress/i18n';
export const CanvasImage = ( props ) => (
-
+ <>
+
+
+ >
);
export const EditorImage = ( props ) => (
-
+ <>
+
+
+ >
);
export const BlockLibraryImage = ( props ) => (
-
+ <>
+
+
+ >
);
export const DocumentationImage = ( props ) => (
-
+ <>
+
+
+ >
);
export const InserterIconImage = ( props ) => (
diff --git a/packages/edit-post/src/components/welcome-guide/index.js b/packages/edit-post/src/components/welcome-guide/index.js
index ad58758315cb3..56c30202af172 100644
--- a/packages/edit-post/src/components/welcome-guide/index.js
+++ b/packages/edit-post/src/components/welcome-guide/index.js
@@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { useSelect, useDispatch } from '@wordpress/data';
-import { ExternalLink, Guide, GuidePage } from '@wordpress/components';
+import { ExternalLink, Guide } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from '@wordpress/element';
@@ -36,68 +36,82 @@ export default function WelcomeGuide() {
contentLabel={ __( 'Welcome to the block editor' ) }
finishButtonText={ __( 'Get started' ) }
onFinish={ () => toggleFeature( 'welcomeGuide' ) }
- >
-
-
- { __( 'Welcome to the block editor' ) }
-
-
-
- { __(
- 'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.'
- ) }
-
-
-
-
-
- { __( 'Make each block your own' ) }
-
-
-
- { __(
- 'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'
- ) }
-
-
-
-
-
- { __( 'Get to know the block library' ) }
-
-
-
- { createInterpolateElement(
- __(
- 'All of the blocks available to you live in the block library. You’ll find it wherever you see the icon.'
- ),
- {
- InserterIconImage: (
-
- ),
- }
- ) }
-
-
-
-
-
- { __( 'Learn how to use the block editor' ) }
-
-
-
- { __(
- 'New to the block editor? Want to learn more about using it? '
- ) }
-
- { __( "Here's a detailed guide." ) }
-
-
-
-
+ pages={ [
+ {
+ image: ,
+ content: (
+ <>
+
+ { __( 'Welcome to the block editor' ) }
+
+
+ { __(
+ 'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.'
+ ) }
+
+ >
+ ),
+ },
+ {
+ image: ,
+ content: (
+ <>
+
+ { __( 'Make each block your own' ) }
+
+
+ { __(
+ 'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'
+ ) }
+
+ >
+ ),
+ },
+ {
+ image: ,
+ content: (
+ <>
+
+ { __( 'Get to know the block library' ) }
+
+
+ { createInterpolateElement(
+ __(
+ 'All of the blocks available to you live in the block library. You’ll find it wherever you see the icon.'
+ ),
+ {
+ InserterIconImage: (
+
+ ),
+ }
+ ) }
+
+ >
+ ),
+ },
+ {
+ image: ,
+ content: (
+ <>
+
+ { __( 'Learn how to use the block editor' ) }
+
+
+ { __(
+ 'New to the block editor? Want to learn more about using it? '
+ ) }
+
+ { __( "Here's a detailed guide." ) }
+
+
+ >
+ ),
+ },
+ ] }
+ />
);
}
diff --git a/packages/edit-post/src/components/welcome-guide/style.scss b/packages/edit-post/src/components/welcome-guide/style.scss
index b5ac8faba14a8..63ef009bcf752 100644
--- a/packages/edit-post/src/components/welcome-guide/style.scss
+++ b/packages/edit-post/src/components/welcome-guide/style.scss
@@ -1,55 +1,44 @@
.edit-post-welcome-guide {
- $image-height: 300px;
- $image-width: 320px;
+ $image-height: 240px;
+ $image-width: 312px;
+ width: 312px;
- &__page {
- display: flex;
- flex-direction: column;
- justify-content: center;
- position: relative;
+ &__image {
+ background: #00a0d2;
+ height: 240px;
+
+ &__prm-r {
+ display: none;
+ }
- @include break-small() {
- min-height: $image-height;
- padding-left: $image-width + $grid-unit-30;
+ @media (prefers-reduced-motion: reduce) {
+ &__prm-r {
+ display: block;
+ }
+
+ &__prm-np {
+ display: none;
+ }
}
}
&__heading {
font-family: $editor-font;
- font-size: 21px;
+ font-size: 24px;
line-height: 1.4;
- margin: $grid-unit-10 0;
- }
-
- &__image {
- background: #66c6e4;
- border-radius: $radius-round-rectangle;
- height: 200px;
- margin: $grid-unit-10 0;
-
- @include break-small() {
- position: absolute;
- left: 0;
- top: 50%;
- height: $image-height;
- width: $image-width;
- margin-top: -0.5 * $image-height;
- }
+ margin: 0 0 $grid-unit-20 0;
+ padding: 0 $grid-unit-40;
}
&__text {
- font-size: $editor-font-size;
+ font-size: $default-font-size;
line-height: 1.4;
- margin: $grid-unit-10 0;
+ margin: 0 0 $grid-unit-30 0;
+ padding: 0 $grid-unit-40;
}
&__inserter-icon {
margin: 0 4px;
- position: relative;
- top: 4px;
- }
-
- @include break-small() {
- width: 600px;
+ vertical-align: text-top;
}
}