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

Revert "Onboarding: Remove the onboarding specific check for subheader" #33564

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
6 changes: 0 additions & 6 deletions client/lib/signup/site-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ const getSiteTypePropertyDefaults = propertyKey =>
domainsStepSubheader: i18n.translate(
'Enter a keyword that describes your site to get started.'
),
domainsStepTransferringSubheader: i18n.translate(
'Use a domain you already own with your new WordPress.com site.'
),
// Site styles step
siteStyleSubheader: i18n.translate(
'This will help you get started with a theme you might like. You can change it later.'
Expand Down Expand Up @@ -102,9 +99,6 @@ export function getAllSiteTypes() {
domainsStepSubheader: i18n.translate(
"Enter your blog's name or some keywords that describe it to get started."
),
domainsStepTransferringSubheader: i18n.translate(
'Use a domain you already own with your new WordPress.com blog.'
),
},
{
id: 1, // This value must correspond with its sibling in the /segments API results
Expand Down
18 changes: 13 additions & 5 deletions client/signup/steps/domains/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defer, endsWith, get, isEmpty } from 'lodash';
import { defer, endsWith, get, includes, isEmpty } from 'lodash';
import { localize, getLocaleSlug } from 'i18n-calypso';

/**
Expand Down Expand Up @@ -519,11 +519,19 @@ class DomainsStep extends React.Component {
};

getSubHeaderText() {
const { siteType, stepSectionName } = this.props;
const { flowName, siteType, translate } = this.props;
const onboardingSubHeaderCopy =
siteType &&
includes( [ 'onboarding-for-business', 'onboarding' ], flowName ) &&
getSiteTypePropertyValue( 'slug', siteType, 'domainsStepSubheader' );

if ( onboardingSubHeaderCopy ) {
return onboardingSubHeaderCopy;
}

return 'transfer' === stepSectionName || 'mapping' === stepSectionName
? getSiteTypePropertyValue( 'slug', siteType, 'domainsStepTransferringSubheader' )
: getSiteTypePropertyValue( 'slug', siteType, 'domainsStepSubheader' );
return 'transfer' === this.props.stepSectionName || 'mapping' === this.props.stepSectionName
? translate( 'Use a domain you already own with your new WordPress.com site.' )
: translate( "Enter your site's name or some keywords that describe it to get started." );
}

getHeaderText() {
Expand Down