-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enhance/move data to content files #269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @diwanshuster, I can think of 3 things and some minor code changes that will help improve the quality of our codebase.
- We can delete
src/OnboardingSPA/components/StepOverview/
andsrc/OnboardingSPA/pages/Steps/DesignThemes/
for now and completely remove thedescription
key from all routes? - Let's duplicate the
title
value forheading
keys in steps where it does not exist, and copy thisheading
to the respectivecontents.js
file? - Rename the
heading
key in our step data totooltipText
since that is the only context in which it is being used.
subheading: __( | ||
"We'll paint everything with your colors for a fresh, crisp look.", | ||
'wp-module-onboarding' | ||
), | ||
description: __( | ||
'Strong contrast and clear readability help your words jump off the screen.', | ||
'wp-module-onboarding' | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is not being used anywhere.
subheading: __( | ||
'Your site header helps organize your story for visitors.', | ||
'wp-module-onboarding' | ||
), | ||
description: __( | ||
'A well-organized site makes visitors feel smart, helping you keep and convert them.', | ||
'wp-module-onboarding' | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also not being used anywhere.
@@ -134,7 +135,7 @@ const StepDesignHomepageMenu = () => { | |||
<div className="homepage_preview"> | |||
<HeadingWithSubHeading | |||
title={ currentStep?.heading } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bring over this heading
to contents.js
?
'Pick a starter layout you can refine and remix with your content', | ||
'wp-module-onboarding' | ||
), | ||
description: __( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description not being used anywhere.
subheading: __( | ||
'Impress your visitors with strong branding and aesthetics.', | ||
'wp-module-onboarding' | ||
), | ||
description: __( | ||
"Good typography uses style and proportions to give your words identity and priority. What's your story? Your focus?", | ||
'wp-module-onboarding' | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used anywhere. Good to clean up.
@@ -7,6 +7,10 @@ const getContents = () => { | |||
'Do you want to enable tax rates and calculations?', | |||
'wp-module-onboarding' | |||
), | |||
description: __( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used anywhere. Good to clean up.
@@ -86,12 +85,14 @@ const StepSiteFeatures = () => { | |||
getCustomPlugins(); | |||
}, [] ); | |||
|
|||
const content = getContents(); | |||
|
|||
return ( | |||
<CommonLayout> | |||
<div style={ { margin: '100px' } }> | |||
<HeadingWithSubHeading | |||
title={ currentStep?.heading } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the heading
to contents.js
?
'Our toolbox of Plugins & Services is your toolbox.', | ||
'wp-module-onboarding' | ||
), | ||
description: __( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used anywhere. Good to clean up.
@@ -147,14 +148,16 @@ const StepSitePages = () => { | |||
if ( themeStatus === THEME_STATUS_ACTIVE ) getSitePages(); | |||
}, [ themeStatus ] ); | |||
|
|||
const content = getContents(); | |||
|
|||
return ( | |||
<DesignStateHandler> | |||
<GlobalStylesProvider> | |||
<CommonLayout> | |||
<div className="site-pages"> | |||
<HeadingWithSubHeading | |||
title={ currentStep?.heading } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heading
to contents.js
?
'Begin closer to the finish line than a blank canvas.', | ||
'wp-module-onboarding' | ||
), | ||
description: __( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used anywhere. Good to clean up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @diwanshuster
No description provided.