From 1279f10e845e48ff3a75510b3ffb46f43c3b656c Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Mon, 19 Feb 2024 16:30:37 +0530 Subject: [PATCH 1/3] Changes Text Changes and Site Details Prompt placement. --- .../steps/SiteGen/SiteDetails/stylesheet.scss | 7 +++++-- .../steps/SiteGen/Welcome/contents.js | 2 +- src/OnboardingSPA/steps/TheFork/contents.js | 11 +++++++---- src/OnboardingSPA/steps/TheFork/index.js | 14 +++++++++++++- src/OnboardingSPA/steps/TheFork/stylesheet.scss | 14 +++++++++++--- 5 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss index abc621f44..10901f262 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss @@ -1,8 +1,11 @@ .nfd-sg-site-details { - margin-top: 20%; width: 40vw; height: 100vh; + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; @media (max-width: #{ ($break-large) }) { @@ -10,8 +13,8 @@ } @media (max-width: #{ ($break-small) }) { - margin: 10px; height: 100vh; + margin-top: 30%; margin-bottom: 150px; } diff --git a/src/OnboardingSPA/steps/SiteGen/Welcome/contents.js b/src/OnboardingSPA/steps/SiteGen/Welcome/contents.js index a8f2cdcb8..acdfa6fa1 100644 --- a/src/OnboardingSPA/steps/SiteGen/Welcome/contents.js +++ b/src/OnboardingSPA/steps/SiteGen/Welcome/contents.js @@ -4,7 +4,7 @@ const getContents = () => { return { heading: __( 'Website Creator for WordPress', 'wp-module-onboarding' ), subHeading: __( - 'Tell our AI engine what kind of site you want to make and let it handle the content and design for you', + 'Tell our AI engine what kind of site you want to make and let it handle the content and design for you.', 'wp-module-onboarding' ), buttonText: __( 'Get Started', 'wp-module-onboarding' ), diff --git a/src/OnboardingSPA/steps/TheFork/contents.js b/src/OnboardingSPA/steps/TheFork/contents.js index 74b59274e..fd39793ff 100644 --- a/src/OnboardingSPA/steps/TheFork/contents.js +++ b/src/OnboardingSPA/steps/TheFork/contents.js @@ -10,9 +10,9 @@ const getContents = () => { ), options: [ { - title: __( 'Build it myself', 'wp-module-onboarding' ), + title: __( 'Guided Configuration', 'wp-module-onboarding' ), subtitle: __( - "We'll stay out of your way.", + 'A few questions & settings to get you a jumpstart.', 'wp-module-onboarding' ), flow: 'sitebuild', @@ -20,7 +20,7 @@ const getContents = () => { { title: __( ' Website Creator', 'wp-module-onboarding' ), subtitle: __( - 'Custom AI generated content & design.', + 'Unique AI generated content & design curated for you.', 'wp-module-onboarding' ), span: __( 'AI', 'wp-module-onboarding' ), @@ -35,7 +35,6 @@ const getContents = () => { flow: 'hirepro', }, ], - importtext: __( 'Already have a WordPress site you want to import?', 'wp-module-onboarding' @@ -44,6 +43,10 @@ const getContents = () => { 'https://my.bluehost.com/cgi/services/migration', 'wp-module-onboarding' ), + exitToWordPress: __( + 'I’m following a tutorial', + 'wp-module-onboarding' + ), }; }; diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index 9ec8a0c2f..95a13bf97 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -4,7 +4,11 @@ import { useEffect } from '@wordpress/element'; import { useSelect, useDispatch } from '@wordpress/data'; import { store as nfdOnboardingStore } from '../../store'; -import { FOOTER_SITEGEN, HEADER_SITEGEN } from '../../../constants'; +import { + FOOTER_SITEGEN, + HEADER_SITEGEN, + pluginDashboardPage, +} from '../../../constants'; import { DEFAULT_FLOW } from '../../data/flows/constants'; import HeadingWithSubHeading from '../../components/HeadingWithSubHeading/SiteGen/index'; @@ -69,6 +73,14 @@ const TheFork = () => { > { content.importtext } + + { content.exitToWordPress } + ); diff --git a/src/OnboardingSPA/steps/TheFork/stylesheet.scss b/src/OnboardingSPA/steps/TheFork/stylesheet.scss index c2f831d26..4cdef6647 100644 --- a/src/OnboardingSPA/steps/TheFork/stylesheet.scss +++ b/src/OnboardingSPA/steps/TheFork/stylesheet.scss @@ -45,12 +45,20 @@ } &__importsite { - color: var(--nfd-onboarding-primary); + font-size: 18px; font-weight: 510; + line-height: 20px; text-align: center; - font-size: 18px; + margin: 25px !important; + color: var(--nfd-onboarding-primary); + } + + &__exit { + cursor: pointer; + font-weight: 510; line-height: 20px; - margin: 35px !important; + text-align: center; + color: var(--nfd-onboarding-primary); } } } From a3e85716f5313ade3661e3491cd14608cc872e7f Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Mon, 19 Feb 2024 17:41:48 +0530 Subject: [PATCH 2/3] Open Link in same page --- src/OnboardingSPA/steps/TheFork/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index 95a13bf97..5c602643c 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -76,8 +76,6 @@ const TheFork = () => { { content.exitToWordPress } From 21ac17be067fccb8151727b98b47f2023babe215 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Mon, 19 Feb 2024 18:19:36 +0530 Subject: [PATCH 3/3] Disable Back Button after Generation --- src/OnboardingSPA/steps/SiteGen/Building/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/Editor/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/Experience/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/Preview/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js | 2 ++ src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js | 2 ++ 7 files changed, 14 insertions(+) diff --git a/src/OnboardingSPA/steps/SiteGen/Building/index.js b/src/OnboardingSPA/steps/SiteGen/Building/index.js index 87bb72cad..1340d4f06 100644 --- a/src/OnboardingSPA/steps/SiteGen/Building/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Building/index.js @@ -15,11 +15,13 @@ const SiteGenBuilding = () => { setSidebarActiveView, setHeaderActiveView, setDrawerActiveView, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); useEffect( () => { setIsHeaderEnabled( true ); setSidebarActiveView( false ); + setIsHeaderNavigationEnabled( false ); setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); } ); diff --git a/src/OnboardingSPA/steps/SiteGen/Editor/index.js b/src/OnboardingSPA/steps/SiteGen/Editor/index.js index a2bc319d0..0d759de6d 100644 --- a/src/OnboardingSPA/steps/SiteGen/Editor/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Editor/index.js @@ -22,6 +22,7 @@ const StepSiteGenEditor = () => { setDrawerActiveView, setHideFooterNav, setCurrentOnboardingData, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); const { currentData } = useSelect( ( select ) => { @@ -48,6 +49,7 @@ const StepSiteGenEditor = () => { setIsHeaderEnabled( true ); setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); + setIsHeaderNavigationEnabled( false ); const activeHomepage = currentData.sitegen.homepages.active; setHomepage( activeHomepage ); const globalStylesResponse = await getGlobalStyles(); diff --git a/src/OnboardingSPA/steps/SiteGen/Experience/index.js b/src/OnboardingSPA/steps/SiteGen/Experience/index.js index 0e340ee47..ea0d61cb5 100644 --- a/src/OnboardingSPA/steps/SiteGen/Experience/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Experience/index.js @@ -32,12 +32,14 @@ const SiteGenExperience = () => { setDrawerActiveView, setHideFooterNav, setCurrentOnboardingData, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); useEffect( () => { setHideFooterNav( true ); setIsHeaderEnabled( true ); setSidebarActiveView( false ); + setIsHeaderNavigationEnabled( false ); setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); diff --git a/src/OnboardingSPA/steps/SiteGen/Preview/index.js b/src/OnboardingSPA/steps/SiteGen/Preview/index.js index 030a782ec..385ae2234 100644 --- a/src/OnboardingSPA/steps/SiteGen/Preview/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Preview/index.js @@ -33,6 +33,7 @@ const SiteGenPreview = () => { updateInitialize, setHideFooterNav, updateSiteGenErrorStatus, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); const { currentData, nextStep, siteGenErrorStatus } = useSelect( @@ -54,6 +55,7 @@ const SiteGenPreview = () => { setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); updateInitialize( true ); + setIsHeaderNavigationEnabled( false ); }, [ currentData ] ); useEffect( () => { diff --git a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js index 658b33850..ab7bac05c 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js @@ -32,6 +32,7 @@ const SiteGenSiteDetails = () => { setDrawerActiveView, setHideFooterNav, setCurrentOnboardingData, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); useEffect( () => { @@ -39,6 +40,7 @@ const SiteGenSiteDetails = () => { setIsHeaderEnabled( true ); setSidebarActiveView( false ); setHeaderActiveView( HEADER_SITEGEN ); + setIsHeaderNavigationEnabled( true ); setDrawerActiveView( false ); if ( currentData.sitegen.siteDetails?.prompt !== '' ) { setIsValidInput( true ); diff --git a/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js b/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js index db0365abc..7c8bf3c94 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js @@ -38,6 +38,7 @@ const SiteGenSiteLogo = () => { setDrawerActiveView, setHideFooterNav, setCurrentOnboardingData, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); const resetSiteLogo = () => { @@ -57,6 +58,7 @@ const SiteGenSiteLogo = () => { setHideFooterNav( false ); setIsHeaderEnabled( true ); setSidebarActiveView( false ); + setIsHeaderNavigationEnabled( true ); setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); if ( currentData.data.siteLogo?.id !== 0 ) { diff --git a/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js b/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js index 3c8633f65..5eb4673e4 100644 --- a/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js @@ -25,6 +25,7 @@ const SiteGenSiteSocialMedia = () => { setHeaderActiveView, setDrawerActiveView, updateSiteGenErrorStatus, + setIsHeaderNavigationEnabled, } = useDispatch( nfdOnboardingStore ); useEffect( () => { @@ -32,6 +33,7 @@ const SiteGenSiteSocialMedia = () => { setSidebarActiveView( false ); setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); + setIsHeaderNavigationEnabled( true ); } ); const { nextStep } = useSelect( ( select ) => {