Skip to content

Commit

Permalink
changes for design studio
Browse files Browse the repository at this point in the history
  • Loading branch information
diDroid committed Nov 7, 2023
1 parent 7c1b21b commit 84b4737
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ $main-color-grey-other: #e2e2e2;
}
}

&-full {
width: 100%;
min-height: 90vh;
overflow: hidden;
position: relative;
align-items: center;
border: 1px solid #e3dfdf;
border-top: 0;
margin-bottom: 30px;
}

&--is-skeleton {
z-index: 1;
width: 100%;
Expand Down
5 changes: 4 additions & 1 deletion src/OnboardingSPA/data/flows/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { PseudoStep } from '../models/PseudoStep';
import { indexPage } from '../../pages/IndexPage/page';
import { brush } from '@wordpress/icons';
import { __ } from '@wordpress/i18n';
import { stepDesignStudioPreview } from '../../../SiteGenSPA/steps/DesignStudio/step';

export const pages = [ indexPage, errorPage ];

Expand All @@ -20,6 +21,7 @@ export const initialChapters = [ demographic, design, layoutContent, features ];
export const getSteps = ( chapters = initialChapters ) => {
let steps = [];
steps.push( stepWelcome );
steps.push( stepDesignStudioPreview );
chapters.forEach( ( chapter ) => {
steps = steps.concat( [
...chapter.steps,
Expand All @@ -31,8 +33,9 @@ export const getSteps = ( chapters = initialChapters ) => {
};

export const getRoutes = ( chapters = initialChapters ) => {
let routes = [ ...pages ];
let routes = [ ...pages ];

Check failure on line 36 in src/OnboardingSPA/data/flows/default.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Delete `↹`
routes.push( stepWelcome );
routes.push( stepDesignStudioPreview );
chapters.forEach( ( chapter ) => {
routes = routes.concat( [
...chapter.steps,
Expand Down
16 changes: 16 additions & 0 deletions src/SiteGenSPA/components/Header/ActionButton/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Icon } from '@wordpress/icons';
import { Button } from '@wordpress/components';

const ActionButton = ( { icon, title } ) => {
return (
<Button
className="navigation-buttons navigation-buttons_back"

Check failure on line 7 in src/SiteGenSPA/components/Header/ActionButton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `········` with `↹↹↹`
variant="secondary"

Check failure on line 8 in src/SiteGenSPA/components/Header/ActionButton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Insert `↹`
>
<Icon icon={ icon } />

Check failure on line 10 in src/SiteGenSPA/components/Header/ActionButton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `····` with `↹`
{ title }

Check failure on line 11 in src/SiteGenSPA/components/Header/ActionButton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `············` with `↹↹↹`
</Button>
);
};

export default ActionButton;

Check failure on line 16 in src/SiteGenSPA/components/Header/ActionButton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Insert `⏎`
44 changes: 44 additions & 0 deletions src/SiteGenSPA/components/Header/index copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { memo } from '@wordpress/element';
import { Button } from '@wordpress/components';
import { Icon, chevronLeft, chevronRight, reusableBlock, settings } from '@wordpress/icons';

Check failure on line 3 in src/SiteGenSPA/components/Header/index copy.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `·Icon,·chevronLeft,·chevronRight,·reusableBlock,·settings·` with `⏎↹Icon,⏎↹chevronLeft,⏎↹chevronRight,⏎↹reusableBlock,⏎↹settings,⏎`
import { __ } from '@wordpress/i18n';
import ActionButton from './ActionButton';

Check failure on line 5 in src/SiteGenSPA/components/Header/index copy.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

'ActionButton' is defined but never used

const Header = () => {
return (
<div className="nfd-sitegen-header">
<div className="nfd-sitegen-header__step-navigation">
<Button
className="navigation-buttons navigation-buttons_back"
variant="secondary"
>
<Icon icon={ chevronLeft } />
{ __( 'Back', 'wp-module-onboarding' ) }
</Button>
<Button
className="navigation-buttons navigation-buttons_back"
variant="secondary"
>
<Icon icon={ reusableBlock } />
{ __( 'Regenerate', 'wp-module-onboarding' ) }
</Button>
<Button
className="navigation-buttons navigation-buttons_back"
variant="secondary"
>
<Icon icon={ settings } />
{ __( 'Customize', 'wp-module-onboarding' ) }
</Button>
<Button
className="navigation-buttons navigation-buttons_back"
variant="secondary"
>
<Icon icon={ chevronRight } />
{ __( 'Save & Continue', 'wp-module-onboarding' ) }
</Button>
</div>
</div>
);
};

export default memo( Header );
24 changes: 14 additions & 10 deletions src/SiteGenSPA/components/Header/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import { memo } from '@wordpress/element';
import { Button } from '@wordpress/components';
import { Icon, chevronLeft } from '@wordpress/icons';
import { chevronLeft, chevronRight, reusableBlock, settings,lock } from '@wordpress/icons';

Check failure on line 2 in src/SiteGenSPA/components/Header/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `·chevronLeft,·chevronRight,·reusableBlock,·settings,lock·` with `⏎↹chevronLeft,⏎↹chevronRight,⏎↹reusableBlock,⏎↹settings,⏎↹lock,⏎`
import { __ } from '@wordpress/i18n';

Check failure on line 3 in src/SiteGenSPA/components/Header/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

'__' is defined but never used
import ActionButton from './ActionButton';

const Header = () => {
return (
<div className="nfd-sitegen-header">
<div className="nfd-sitegen-header__step-navigation">
<Button
className="navigation-buttons navigation-buttons_back"
variant="secondary"
>
<Icon icon={ chevronLeft } />
{ __( 'Back', 'wp-module-onboarding' ) }
</Button>
<div className="navigation-section-left">
<ActionButton icon = { chevronLeft } title = 'Back' />
<ActionButton icon = { reusableBlock } title = 'Regenerate' />
</div>
<div className="navigation-section-center">
<ActionButton icon = { lock } title = 'Back' />
</div>
<div className="navigation-section-right">
<ActionButton icon = { settings } title = 'Customize' />
<ActionButton icon = { chevronRight } title = 'Save & Continue' />
</div>
</div>
</div>
);
};

export default memo( Header );
export default memo( Header );
26 changes: 24 additions & 2 deletions src/SiteGenSPA/components/Header/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

&__step-navigation {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
column-gap: $grid-unit-10;
}
}
Expand All @@ -36,8 +39,7 @@
align-items: center;
letter-spacing: 0.8px;
display: flex !important;
justify-content: space-evenly;
border-radius: 2px !important;
border-radius: 8px !important;
padding: 20px 14px !important;

&_back {
Expand All @@ -49,3 +51,23 @@
padding: 15px 10px !important;
}
}

.navigation-section {
align-items: center;
display: flex !important;

&-left {
display: flex;
justify-content: flex-start;
}

&-center {
display: flex;
justify-content: center;
}

&-right {
display: flex;
justify-content: flex-end;
}
}
22 changes: 22 additions & 0 deletions src/SiteGenSPA/steps/DesignStudio/index.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/SiteGenSPA/steps/DesignStudio/step.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { home } from '@wordpress/icons';
import { lazy } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Step } from '../../../OnboardingSPA/data/models/Step';
import { VIEW_NAV_GET_STARTED } from '../../../constants';

const DesignStudioPreview = lazy( () => import( './index' ) );

export const stepDesignStudioPreview = new Step( {
path: '/wp-setup/step/get-started/site-gen',
title: __( 'WordPress Site Gen', 'wp-module-onboarding' ),
Component: DesignStudioPreview,
icon: home,
drawerView: VIEW_NAV_GET_STARTED,
sidebars: {},
} );

0 comments on commit 84b4737

Please sign in to comment.