Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Minor Changes #471

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Building/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ const SiteGenBuilding = () => {
setSidebarActiveView,
setHeaderActiveView,
setDrawerActiveView,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

useEffect( () => {
setIsHeaderEnabled( true );
setSidebarActiveView( false );
setIsHeaderNavigationEnabled( false );
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
} );
Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const StepSiteGenEditor = () => {
setDrawerActiveView,
setHideFooterNav,
setCurrentOnboardingData,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

const { currentData } = useSelect( ( select ) => {
Expand All @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Experience/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const SiteGenPreview = () => {
updateInitialize,
setHideFooterNav,
updateSiteGenErrorStatus,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

const { currentData, nextStep, siteGenErrorStatus } = useSelect(
Expand All @@ -54,6 +55,7 @@ const SiteGenPreview = () => {
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
updateInitialize( true );
setIsHeaderNavigationEnabled( false );
}, [ currentData ] );

useEffect( () => {
Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ const SiteGenSiteDetails = () => {
setDrawerActiveView,
setHideFooterNav,
setCurrentOnboardingData,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

useEffect( () => {
setHideFooterNav( false );
setIsHeaderEnabled( true );
setSidebarActiveView( false );
setHeaderActiveView( HEADER_SITEGEN );
setIsHeaderNavigationEnabled( true );
setDrawerActiveView( false );
if ( currentData.sitegen.siteDetails?.prompt !== '' ) {
setIsValidInput( true );
Expand Down
7 changes: 5 additions & 2 deletions src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
.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) }) {
width: 80vw;
}

@media (max-width: #{ ($break-small) }) {
margin: 10px;
height: 100vh;
margin-top: 30%;
margin-bottom: 150px;
}

Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const SiteGenSiteLogo = () => {
setDrawerActiveView,
setHideFooterNav,
setCurrentOnboardingData,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

const resetSiteLogo = () => {
Expand All @@ -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 ) {
Expand Down
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ const SiteGenSiteSocialMedia = () => {
setHeaderActiveView,
setDrawerActiveView,
updateSiteGenErrorStatus,
setIsHeaderNavigationEnabled,
} = useDispatch( nfdOnboardingStore );

useEffect( () => {
setIsHeaderEnabled( true );
setSidebarActiveView( false );
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
setIsHeaderNavigationEnabled( true );
} );

const { nextStep } = useSelect( ( select ) => {
Expand Down
2 changes: 1 addition & 1 deletion src/OnboardingSPA/steps/SiteGen/Welcome/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
11 changes: 7 additions & 4 deletions src/OnboardingSPA/steps/TheFork/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ 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',
},
{
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' ),
Expand All @@ -35,7 +35,6 @@ const getContents = () => {
flow: 'hirepro',
},
],

importtext: __(
'Already have a WordPress site you want to import?',
'wp-module-onboarding'
Expand All @@ -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'
),
};
};

Expand Down
12 changes: 11 additions & 1 deletion src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -69,6 +73,12 @@ const TheFork = () => {
>
{ content.importtext }
</a>
<a
className="nfd-onboarding-step--site-gen__fork__exit"
href={ pluginDashboardPage }
>
{ content.exitToWordPress }
</a>
</CommonLayout>
</SitegenAiStateHandler>
);
Expand Down
14 changes: 11 additions & 3 deletions src/OnboardingSPA/steps/TheFork/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
Loading