Skip to content

Commit 4fb974b

Browse files
committed
Final removals
1 parent 84dfe49 commit 4fb974b

File tree

4 files changed

+54
-125
lines changed

4 files changed

+54
-125
lines changed

client/landing/stepper/declarative-flow/internals/steps-repository/domains/domain-form-control.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,6 @@ export function DomainFormControl( {
202202
);
203203
};
204204

205-
const isReskinnedSupportedFlow = () => {
206-
if ( ! flow ) {
207-
return false;
208-
}
209-
210-
return isDomainUpsellFlow( flow ) || isSiteAssemblerFlow( flow );
211-
};
212-
213205
const renderDomainForm = () => {
214206
let initialState: DomainForm = {};
215207
if ( domainForm ) {
@@ -289,7 +281,7 @@ export function DomainFormControl( {
289281
content = renderDomainForm();
290282
}
291283

292-
if ( isReskinnedSupportedFlow() && ! showUseYourDomain ) {
284+
if ( ( isDomainUpsellFlow( flow ) || isSiteAssemblerFlow( flow ) ) && ! showUseYourDomain ) {
293285
sideContent = getSideContent();
294286
}
295287

client/landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const RenderDomainsStepConnect = connect(
6262
flowName: flow,
6363
path: window.location.pathname,
6464
positionInFlow: 1,
65-
isReskinned: true,
6665
stepSectionName,
6766
signupDependencies: step,
6867
};

client/signup/steps/domains/index.jsx

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {
4444
} from 'calypso/lib/domains';
4545
import { getSuggestionsVendor } from 'calypso/lib/domains/suggestions';
4646
import { triggerGuidesForStep } from 'calypso/lib/guides/trigger-guides-for-step';
47-
import { getSitePropertyDefaults } from 'calypso/lib/signup/site-properties';
4847
import CalypsoShoppingCartProvider from 'calypso/my-sites/checkout/calypso-shopping-cart-provider';
4948
import withCartKey from 'calypso/my-sites/checkout/with-cart-key';
5049
import { domainManagementRoot } from 'calypso/my-sites/domains/paths';
@@ -103,7 +102,6 @@ export class RenderDomainsStep extends Component {
103102
stepName: PropTypes.string.isRequired,
104103
stepSectionName: PropTypes.string,
105104
selectedSite: PropTypes.object,
106-
isReskinned: PropTypes.bool,
107105
recordTracksEvent: PropTypes.func,
108106
};
109107

@@ -1080,7 +1078,7 @@ export class RenderDomainsStep extends Component {
10801078
forceHideFreeDomainExplainerAndStrikeoutUi={
10811079
this.props.forceHideFreeDomainExplainerAndStrikeoutUi
10821080
}
1083-
isOnboarding={ this.props.isReskinned }
1081+
isOnboarding
10841082
reskinSideContent={ this.getSideContent() }
10851083
isInLaunchFlow={ 'launch-site' === this.props.flowName }
10861084
promptText={
@@ -1153,7 +1151,7 @@ export class RenderDomainsStep extends Component {
11531151
isHostingFlow = () => isHostingSignupFlow( this.props.flowName );
11541152

11551153
getSubHeaderText() {
1156-
const { flowName, isAllDomains, stepSectionName, isReskinned, translate } = this.props;
1154+
const { flowName, isAllDomains, stepSectionName, translate } = this.props;
11571155

11581156
if ( isAllDomains ) {
11591157
return translate( 'Find the domain that defines you' );
@@ -1183,12 +1181,8 @@ export class RenderDomainsStep extends Component {
11831181
return translate( 'Find and claim one or more domain names' );
11841182
}
11851183

1186-
if ( isReskinned ) {
1187-
return (
1188-
! stepSectionName &&
1189-
'domain-transfer' !== flowName &&
1190-
translate( 'Enter some descriptive keywords to get started' )
1191-
);
1184+
if ( ! stepSectionName && 'domain-transfer' !== flowName ) {
1185+
return translate( 'Enter some descriptive keywords to get started' );
11921186
}
11931187

11941188
return 'transfer' === this.props.stepSectionName || 'mapping' === this.props.stepSectionName
@@ -1197,8 +1191,7 @@ export class RenderDomainsStep extends Component {
11971191
}
11981192

11991193
getHeaderText() {
1200-
const { headerText, isAllDomains, isReskinned, stepSectionName, translate, flowName } =
1201-
this.props;
1194+
const { headerText, isAllDomains, stepSectionName, translate, flowName } = this.props;
12021195

12031196
if ( stepSectionName === 'use-your-domain' || 'domain-transfer' === flowName ) {
12041197
return '';
@@ -1212,14 +1205,10 @@ export class RenderDomainsStep extends Component {
12121205
return translate( 'Your next big idea starts here' );
12131206
}
12141207

1215-
if ( isReskinned ) {
1216-
if ( shouldUseMultipleDomainsInCart( flowName ) ) {
1217-
return ! stepSectionName && translate( 'Choose your domains' );
1218-
}
1219-
return ! stepSectionName && translate( 'Choose a domain' );
1208+
if ( shouldUseMultipleDomainsInCart( flowName ) ) {
1209+
return ! stepSectionName && translate( 'Choose your domains' );
12201210
}
1221-
1222-
return getSitePropertyDefaults( 'signUpFlowDomainsStepHeader' );
1211+
return ! stepSectionName && translate( 'Choose a domain' );
12231212
}
12241213

12251214
getAnalyticsSection() {
@@ -1238,7 +1227,7 @@ export class RenderDomainsStep extends Component {
12381227
content = this.domainForm();
12391228
}
12401229

1241-
if ( ! this.props.stepSectionName && this.props.isReskinned ) {
1230+
if ( ! this.props.stepSectionName ) {
12421231
sideContent = this.getSideContent();
12431232
}
12441233

@@ -1325,7 +1314,6 @@ export class RenderDomainsStep extends Component {
13251314
stepSectionName,
13261315
isAllDomains,
13271316
translate,
1328-
isReskinned,
13291317
userSiteCount,
13301318
previousStepName,
13311319
useStepperWrapper,
@@ -1473,7 +1461,7 @@ export class RenderDomainsStep extends Component {
14731461
hideSkip
14741462
goToNextStep={ this.handleSkip }
14751463
align="center"
1476-
isWideLayout={ isReskinned }
1464+
isWideLayout
14771465
/>
14781466
);
14791467
}

client/signup/steps/site-or-domain/index.jsx

Lines changed: 43 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ import StepWrapper from 'calypso/signup/step-wrapper';
1515
import { isUserLoggedIn, getCurrentUser } from 'calypso/state/current-user/selectors';
1616
import { getAvailableProductsList } from 'calypso/state/products-list/selectors';
1717
import { submitSignupStep } from 'calypso/state/signup/progress/actions';
18-
import SiteOrDomainChoice from './choice';
19-
import DomainImage from './domain-image';
20-
import ExistingSiteImage from './existing-site-image';
21-
import NewSiteImage from './new-site-image';
2218

2319
import './style.scss';
2420

@@ -58,7 +54,7 @@ class SiteOrDomain extends Component {
5854
}
5955

6056
getChoices() {
61-
const { translate, isReskinned, isLoggedIn, siteCount } = this.props;
57+
const { translate, isLoggedIn, siteCount } = this.props;
6258

6359
const domainName = this.getDomainName();
6460
let buyADomainTitle = translate( 'Just buy a domain', 'Just buy domains', {
@@ -72,22 +68,40 @@ class SiteOrDomain extends Component {
7268
const choices = [];
7369

7470
const buyADomainDescription = translate( 'Add a site later.' );
75-
if ( isReskinned ) {
76-
choices.push( {
77-
key: 'domain',
78-
title: buyADomainTitle,
79-
description: buyADomainDescription,
80-
icon: null,
81-
titleIcon: globe,
82-
value: 'domain',
83-
actionText: <Gridicon icon="chevron-right" size={ 18 } />,
84-
allItemClickable: true,
85-
} );
71+
choices.push( {
72+
key: 'domain',
73+
title: buyADomainTitle,
74+
description: buyADomainDescription,
75+
icon: null,
76+
titleIcon: globe,
77+
value: 'domain',
78+
actionText: <Gridicon icon="chevron-right" size={ 18 } />,
79+
allItemClickable: true,
80+
} );
81+
choices.push( {
82+
key: 'page',
83+
title: translate( 'New site' ),
84+
description: translate(
85+
'Customize and launch your site.{{br/}}{{strong}}Free domain for the first year on annual plans.{{/strong}}',
86+
{
87+
components: {
88+
strong: <strong />,
89+
br: <br />,
90+
},
91+
}
92+
),
93+
icon: null,
94+
titleIcon: addCard,
95+
value: 'page',
96+
actionText: <Gridicon icon="chevron-right" size={ 18 } />,
97+
allItemClickable: true,
98+
} );
99+
if ( isLoggedIn && siteCount > 0 ) {
86100
choices.push( {
87-
key: 'page',
88-
title: translate( 'New site' ),
101+
key: 'existing-site',
102+
title: translate( 'Existing WordPress.com site' ),
89103
description: translate(
90-
'Customize and launch your site.{{br/}}{{strong}}Free domain for the first year on annual plans.{{/strong}}',
104+
'Use the domain with a site you already started.{{br/}}{{strong}}Free domain for the first year on annual plans.{{/strong}}',
91105
{
92106
components: {
93107
strong: <strong />,
@@ -96,86 +110,24 @@ class SiteOrDomain extends Component {
96110
}
97111
),
98112
icon: null,
99-
titleIcon: addCard,
100-
value: 'page',
113+
titleIcon: layout,
114+
value: 'existing-site',
101115
actionText: <Gridicon icon="chevron-right" size={ 18 } />,
102116
allItemClickable: true,
103117
} );
104-
if ( isLoggedIn && siteCount > 0 ) {
105-
choices.push( {
106-
key: 'existing-site',
107-
title: translate( 'Existing WordPress.com site' ),
108-
description: translate(
109-
'Use the domain with a site you already started.{{br/}}{{strong}}Free domain for the first year on annual plans.{{/strong}}',
110-
{
111-
components: {
112-
strong: <strong />,
113-
br: <br />,
114-
},
115-
}
116-
),
117-
icon: null,
118-
titleIcon: layout,
119-
value: 'existing-site',
120-
actionText: <Gridicon icon="chevron-right" size={ 18 } />,
121-
allItemClickable: true,
122-
} );
123-
}
124-
} else {
125-
choices.push( {
126-
type: 'page',
127-
label: translate( 'New site' ),
128-
image: <NewSiteImage />,
129-
description: translate(
130-
'Choose a theme, customize, and launch your site. A free domain for one year is included with all annual plans.'
131-
),
132-
} );
133-
if ( isLoggedIn && siteCount > 0 ) {
134-
choices.push( {
135-
type: 'existing-site',
136-
label: translate( 'Existing WordPress.com site' ),
137-
image: <ExistingSiteImage />,
138-
description: translate(
139-
'Use with a site you already started. A free domain for one year is included with all annual plans.'
140-
),
141-
} );
142-
}
143-
choices.push( {
144-
type: 'domain',
145-
label: buyADomainTitle,
146-
image: <DomainImage />,
147-
description: buyADomainDescription,
148-
} );
149118
}
150119

151120
return choices;
152121
}
153122

154123
renderChoices() {
155-
const { isReskinned } = this.props;
156-
157124
return (
158125
<div className="site-or-domain__choices">
159-
{ isReskinned ? (
160-
<>
161-
<SelectItems
162-
items={ this.getChoices() }
163-
onSelect={ this.handleClickChoice }
164-
preventWidows={ preventWidows }
165-
/>
166-
</>
167-
) : (
168-
<>
169-
{ this.getChoices().map( ( choice, index ) => (
170-
<SiteOrDomainChoice
171-
choice={ choice }
172-
handleClickChoice={ this.handleClickChoice }
173-
isPlaceholder={ ! this.props.productsLoaded }
174-
key={ `site-or-domain-choice-${ index }` }
175-
/>
176-
) ) }
177-
</>
178-
) }
126+
<SelectItems
127+
items={ this.getChoices() }
128+
onSelect={ this.handleClickChoice }
129+
preventWidows={ preventWidows }
130+
/>
179131
</div>
180132
);
181133
}
@@ -249,7 +201,7 @@ class SiteOrDomain extends Component {
249201
};
250202

251203
render() {
252-
const { translate, productsLoaded, isReskinned } = this.props;
204+
const { translate, productsLoaded } = this.props;
253205
const domainName = this.getDomainName();
254206

255207
if ( productsLoaded && ! domainName ) {
@@ -277,10 +229,8 @@ class SiteOrDomain extends Component {
277229
const additionalProps = {};
278230
let headerText = this.props.getHeaderText( this.getDomainCart() );
279231

280-
if ( isReskinned ) {
281-
additionalProps.isHorizontalLayout = false;
282-
additionalProps.align = 'center';
283-
}
232+
additionalProps.isHorizontalLayout = false;
233+
additionalProps.align = 'center';
284234

285235
if ( this.isLeanDomainSearch() ) {
286236
additionalProps.className = 'lean-domain-search';

0 commit comments

Comments
 (0)