From 3efbff45a7beca83f37938e8043164d770533451 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 3 Jul 2023 17:02:50 +1000 Subject: [PATCH] Page Content Focus: Add welcome guides (#52014) * Page Content Focus: Add welcome guides * Don't show when editor guide is active * Just use regular accent/theme color in all guides * slight copy change page guide * Update components changelog * Disable new guides in E2E tests * Use s.w.org videos --------- Co-authored-by: Saxon Fletcher --- packages/components/src/guide/icons.tsx | 9 +- packages/components/src/guide/index.tsx | 4 + .../components/src/guide/page-control.tsx | 6 +- packages/components/src/guide/style.scss | 32 ++------ .../src/admin/visit-site-editor.ts | 8 ++ packages/e2e-test-utils/src/site-editor.js | 77 ++++------------- .../src/components/welcome-guide/editor.js | 2 +- .../src/components/welcome-guide/index.js | 4 + .../src/components/welcome-guide/page.js | 75 +++++++++++++++++ .../src/components/welcome-guide/style.scss | 16 +++- .../src/components/welcome-guide/styles.js | 2 +- .../src/components/welcome-guide/template.js | 82 +++++++++++++++++++ packages/edit-site/src/index.js | 2 + 13 files changed, 219 insertions(+), 100 deletions(-) create mode 100644 packages/edit-site/src/components/welcome-guide/page.js create mode 100644 packages/edit-site/src/components/welcome-guide/template.js diff --git a/packages/components/src/guide/icons.tsx b/packages/components/src/guide/icons.tsx index 1c47180ae0b11a..36146611dc299a 100644 --- a/packages/components/src/guide/icons.tsx +++ b/packages/components/src/guide/icons.tsx @@ -3,13 +3,8 @@ */ import { SVG, Circle } from '@wordpress/primitives'; -export const PageControlIcon = ( { isSelected }: { isSelected: boolean } ) => ( +export const PageControlIcon = () => ( - + ); diff --git a/packages/components/src/guide/index.tsx b/packages/components/src/guide/index.tsx index 38f8d07d8c0efc..e6a2d4c1252eb8 100644 --- a/packages/components/src/guide/index.tsx +++ b/packages/components/src/guide/index.tsx @@ -111,6 +111,7 @@ function Guide( { 1 } onRequestClose={ onFinish } onKeyDown={ ( event ) => { if ( event.code === 'ArrowLeft' ) { @@ -144,6 +145,7 @@ function Guide( { { canGoBack && (