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

Enhance/move data to content files #269

Merged
merged 16 commits into from
Jul 27, 2023

Conversation

diwanshuster
Copy link
Contributor

No description provided.

@diwanshuster diwanshuster added In Progress PR is a Work in Progress and not ready for review. Code Review The PR is in Code Review labels Jul 13, 2023
@arunshenoy99 arunshenoy99 removed the In Progress PR is a Work in Progress and not ready for review. label Jul 17, 2023
Copy link
Member

@arunshenoy99 arunshenoy99 left a 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.

  1. We can delete src/OnboardingSPA/components/StepOverview/ and src/OnboardingSPA/pages/Steps/DesignThemes/ for now and completely remove the description key from all routes?
  2. Let's duplicate the title value for heading keys in steps where it does not exist, and copy this heading to the respective contents.js file?
  3. Rename the heading key in our step data to tooltipText since that is the only context in which it is being used.

Comment on lines 8 to 15
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'
),
Copy link
Member

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.

Comment on lines 8 to 15
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'
),
Copy link
Member

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 }
Copy link
Member

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: __(
Copy link
Member

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.

Comment on lines 8 to 15
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'
),
Copy link
Member

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: __(
Copy link
Member

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 }
Copy link
Member

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: __(
Copy link
Member

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 }
Copy link
Member

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: __(
Copy link
Member

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.

Copy link
Member

@arunshenoy99 arunshenoy99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @diwanshuster

@arunshenoy99 arunshenoy99 added QA This PR is in QA and removed Code Review The PR is in Code Review labels Jul 21, 2023
@officiallygod officiallygod added Ready to merge The Code Review and QA is done and it can be merged. and removed QA This PR is in QA labels Jul 26, 2023
@arunshenoy99 arunshenoy99 merged commit 99801a2 into trunk Jul 27, 2023
@arunshenoy99 arunshenoy99 deleted the enhance/move-data-to-content-files branch July 27, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge The Code Review and QA is done and it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants