Skip to content

Commit c435636

Browse files
authored
Remove wpcom-migration customization from Login and Jetpack Connect (#103766)
1 parent 10e3af1 commit c435636

File tree

10 files changed

+27
-302
lines changed

10 files changed

+27
-302
lines changed

client/blocks/login/index.jsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { localizeUrl } from '@automattic/i18n-utils';
33
import clsx from 'clsx';
44
import emailValidator from 'email-validator';
55
import { localize } from 'i18n-calypso';
6-
import { get, isEmpty, startsWith } from 'lodash';
6+
import { get, isEmpty } from 'lodash';
77
import PropTypes from 'prop-types';
88
import { Component, Fragment } from 'react';
99
import { connect } from 'react-redux';
@@ -68,7 +68,6 @@ class Login extends Component {
6868
isJetpack: PropTypes.bool.isRequired,
6969
isWhiteLogin: PropTypes.bool.isRequired,
7070
isFromAkismet: PropTypes.bool,
71-
isFromMigrationPlugin: PropTypes.bool,
7271
isFromAutomatticForAgenciesPlugin: PropTypes.bool,
7372
isManualRenewalImmediateLoginAttempt: PropTypes.bool,
7473
linkingSocialService: PropTypes.string,
@@ -599,7 +598,6 @@ class Login extends Component {
599598
action,
600599
currentQuery,
601600
fromSite,
602-
isFromMigrationPlugin,
603601
isGravPoweredClient,
604602
isGravPoweredLoginPage,
605603
isManualRenewalImmediateLoginAttempt,
@@ -635,7 +633,6 @@ class Login extends Component {
635633
currentQuery={ currentQuery }
636634
fromSite={ fromSite }
637635
isFromAkismet={ isFromAkismet }
638-
isFromMigrationPlugin={ isFromMigrationPlugin }
639636
isFromAutomatticForAgenciesPlugin={ isFromAutomatticForAgenciesPlugin }
640637
isGravPoweredClient={ isGravPoweredClient }
641638
isGravPoweredLoginPage={ isGravPoweredLoginPage }
@@ -705,10 +702,6 @@ export default connect(
705702
isWCCOM: getIsWCCOM( state ),
706703
isWoo: getIsWoo( state ),
707704
wccomFrom: getWccomFrom( state ),
708-
isFromMigrationPlugin: startsWith(
709-
get( getCurrentQueryArguments( state ), 'from' ),
710-
'wpcom-migration'
711-
),
712705
currentQuery: getCurrentQueryArguments( state ),
713706
initialQuery: getInitialQueryArguments( state ),
714707
currentRoute: getCurrentRoute( state ),

client/blocks/login/login-header.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ interface LoginHeaderProps {
2424
currentQuery: Record< string, string >;
2525
fromSite: string | null;
2626
isFromAkismet: boolean;
27-
isFromMigrationPlugin: boolean;
2827
isFromAutomatticForAgenciesPlugin: boolean;
2928
isGravPoweredClient: boolean;
3029
isGravPoweredLoginPage: boolean;
@@ -61,7 +60,6 @@ export function getHeaderText(
6160
action: string,
6261
oauth2Client: { title: string; icon: string; name: string } | null,
6362
isWooJPC: boolean,
64-
isFromMigrationPlugin: boolean,
6563
isJetpack: boolean,
6664
isWCCOM: boolean,
6765
isFromAkismet: boolean,
@@ -192,8 +190,6 @@ export function getHeaderText(
192190
} else {
193191
headerText = translate( 'Log in to your account' );
194192
}
195-
} else if ( isFromMigrationPlugin ) {
196-
headerText = translate( 'Log in to your account' );
197193
} else if ( isJetpack && ! isFromAutomatticForAgenciesPlugin ) {
198194
headerText = translate(
199195
'Log in or create a WordPress.com account to supercharge your site with powerful growth, performance, and security tools.'
@@ -216,7 +212,6 @@ export function LoginHeader( {
216212
currentQuery,
217213
fromSite,
218214
isFromAkismet,
219-
isFromMigrationPlugin,
220215
isFromAutomatticForAgenciesPlugin,
221216
isGravPoweredClient,
222217
isGravPoweredLoginPage,
@@ -249,7 +244,6 @@ export function LoginHeader( {
249244
action,
250245
oauth2Client,
251246
isWooJPC,
252-
isFromMigrationPlugin,
253247
isJetpack,
254248
isWCCOM,
255249
isFromAkismet,

client/blocks/login/style.scss

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -361,106 +361,6 @@ $breakpoint-mobile: 782px; //Mobile size.
361361
text-transform: initial;
362362
}
363363

364-
.is-wpcom-migration.main {
365-
--color-accent: var(--studio-blue);
366-
--color-accent-light: var(--studio-blue-20);
367-
--color-accent-dark: var(--studio-blue-60);
368-
--color-accent-60: var(--studio-blue-60);
369-
--color-primary: var(--studio-blue-40);
370-
--color-primary-light: var(--studio-blue-20);
371-
--color-primary-dark: var(--studio-blue-60);
372-
373-
max-width: 472px !important;
374-
$login-border-radius: 4px;
375-
376-
.login {
377-
form {
378-
max-width: 400px;
379-
margin: 0 auto;
380-
381-
.login__form-userdata input:last-of-type {
382-
margin-bottom: 10px;
383-
}
384-
385-
input[disabled] {
386-
border: 1px solid var(--studio-gray-10);
387-
}
388-
}
389-
390-
.card {
391-
padding-left: 0;
392-
padding-right: 0;
393-
}
394-
395-
.login__form,
396-
.auth-form__social {
397-
border: none;
398-
background: none;
399-
box-shadow: none;
400-
}
401-
402-
.login__form {
403-
margin-top: 1.5rem;
404-
margin-bottom: 1.5rem;
405-
}
406-
407-
.auth-form__social {
408-
padding-top: 2rem;
409-
padding-bottom: 2rem;
410-
411-
.auth-form__social-buttons {
412-
align-items: center;
413-
}
414-
415-
.social-buttons__button {
416-
border: none;
417-
background: none;
418-
text-align: unset;
419-
420-
svg {
421-
border: 1px solid var(--studio-gray-10);
422-
padding: 12px;
423-
border-radius: 24px; /* stylelint-disable-line scales/radii */
424-
}
425-
}
426-
}
427-
428-
.auth-form__separator {
429-
margin-top: -12px;
430-
}
431-
432-
.login__form-header {
433-
font-size: rem(44px);
434-
line-height: rem(48px);
435-
font-family: $brand-serif;
436-
margin-bottom: 0;
437-
}
438-
439-
.login__form-terms {
440-
text-align: left;
441-
font-size: 0.875rem;
442-
margin-bottom: 2rem;
443-
color: var(--studio-gray-50);
444-
}
445-
446-
.button.is-primary {
447-
border: none !important;
448-
background-color: var(--color-accent) !important;
449-
box-shadow: 0 0 0 2px var(--color-accent) !important;
450-
451-
&:hover,
452-
&:focus {
453-
background-color: var(--color-accent-dark) !important;
454-
box-shadow: 0 0 0 2px var(--color-accent-dark) !important;
455-
}
456-
457-
.accessible-focus &:focus {
458-
box-shadow: 0 0 0 2px var(--color-accent) !important;
459-
}
460-
}
461-
}
462-
}
463-
464364
.login__form-subheader-terms {
465365
display: none;
466366
}

client/jetpack-connect/auth-form-header.jsx

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export class AuthFormHeader extends Component {
2020
static propTypes = {
2121
authQuery: authQueryPropTypes.isRequired,
2222
isWooJPC: PropTypes.bool,
23-
isWpcomMigration: PropTypes.bool,
2423
wooDnaConfig: PropTypes.object,
2524
isFromAutomatticForAgenciesPlugin: PropTypes.bool,
2625

@@ -53,14 +52,8 @@ export class AuthFormHeader extends Component {
5352
}
5453

5554
getHeaderText() {
56-
const {
57-
translate,
58-
partnerSlug,
59-
isWooJPC,
60-
wooDnaConfig,
61-
isWpcomMigration,
62-
isFromAutomatticForAgenciesPlugin,
63-
} = this.props;
55+
const { translate, partnerSlug, isWooJPC, wooDnaConfig, isFromAutomatticForAgenciesPlugin } =
56+
this.props;
6457

6558
if ( wooDnaConfig && wooDnaConfig.isWooDnaFlow() ) {
6659
return wooDnaConfig.getServiceName();
@@ -103,13 +96,6 @@ export class AuthFormHeader extends Component {
10396
}
10497
}
10598

106-
if ( isWpcomMigration ) {
107-
switch ( currentState ) {
108-
case 'logged-in':
109-
return translate( 'Log in to your account' );
110-
}
111-
}
112-
11399
if ( isFromAutomatticForAgenciesPlugin ) {
114100
switch ( currentState ) {
115101
case 'logged-out':
@@ -137,13 +123,7 @@ export class AuthFormHeader extends Component {
137123
}
138124

139125
getSubHeaderText() {
140-
const {
141-
translate,
142-
isWooJPC,
143-
wooDnaConfig,
144-
isWpcomMigration,
145-
isFromAutomatticForAgenciesPlugin,
146-
} = this.props;
126+
const { translate, isWooJPC, wooDnaConfig, isFromAutomatticForAgenciesPlugin } = this.props;
147127
const currentState = this.getState();
148128

149129
if ( isWooJPC ) {
@@ -225,13 +205,6 @@ export class AuthFormHeader extends Component {
225205
}
226206
}
227207

228-
if ( isWpcomMigration ) {
229-
switch ( currentState ) {
230-
case 'logged-in':
231-
return translate( 'Connect your site with your WordPress.com account' );
232-
}
233-
}
234-
235208
if ( isFromAutomatticForAgenciesPlugin ) {
236209
return undefined;
237210
}
@@ -250,7 +223,7 @@ export class AuthFormHeader extends Component {
250223
}
251224

252225
getSiteCard() {
253-
const { isWpcomMigration, isWooJPC } = this.props;
226+
const { isWooJPC } = this.props;
254227
const { jpVersion } = this.props.authQuery;
255228
if (
256229
// Always show the site card for Woo Core Profiler
@@ -260,10 +233,6 @@ export class AuthFormHeader extends Component {
260233
return null;
261234
}
262235

263-
if ( isWpcomMigration ) {
264-
return null;
265-
}
266-
267236
const { blogname, homeUrl, siteIcon, siteUrl } = this.props.authQuery;
268237
const safeIconUrl = siteIcon ? safeImageUrl( siteIcon ) : false;
269238
const icon = safeIconUrl ? { img: safeIconUrl } : false;

client/jetpack-connect/authorize.js

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -762,14 +762,6 @@ export class JetpackAuthorize extends Component {
762762
const { authorizeError, authorizeSuccess, isAuthorizing } = this.props.authorizationData;
763763
const { alreadyAuthorized } = this.props.authQuery;
764764

765-
if ( this.isFromMigrationPlugin() ) {
766-
if ( this.props.isFetchingAuthorizationSite ) {
767-
return translate( 'Preparing authorization' );
768-
}
769-
770-
return translate( 'Continue' );
771-
}
772-
773765
if ( ! this.props.isAlreadyOnSitesList && ! this.props.isFetchingSites && alreadyAuthorized ) {
774766
return translate( 'Go back to your site' );
775767
}
@@ -809,9 +801,7 @@ export class JetpackAuthorize extends Component {
809801
return translate( 'Connect my site' );
810802
}
811803

812-
if ( ! this.retryingAuth ) {
813-
return translate( 'Approve' );
814-
}
804+
return translate( 'Approve' );
815805
}
816806

817807
getScreenReaderAuthMessage() {
@@ -820,14 +810,6 @@ export class JetpackAuthorize extends Component {
820810
const { authorizeError, authorizeSuccess, isAuthorizing } = this.props.authorizationData;
821811
const { alreadyAuthorized } = this.props.authQuery;
822812

823-
if ( this.isFromMigrationPlugin() ) {
824-
if ( this.props.isFetchingAuthorizationSite ) {
825-
return translate( 'Preparing authorization' );
826-
}
827-
828-
return;
829-
}
830-
831813
if ( ! this.props.isAlreadyOnSitesList && ! this.props.isFetchingSites && alreadyAuthorized ) {
832814
return;
833815
}
@@ -859,20 +841,8 @@ export class JetpackAuthorize extends Component {
859841
getUserText() {
860842
const { translate } = this.props;
861843
const { authorizeSuccess } = this.props.authorizationData;
862-
const isWpcomMigration = this.isFromMigrationPlugin();
863844
const isWooDnaFlow = this.getWooDnaConfig().isWooDnaFlow();
864845

865-
if ( isWpcomMigration ) {
866-
const { display_name, email } = this.props.user;
867-
return (
868-
<>
869-
<strong>{ display_name }</strong>
870-
<br />
871-
<small>{ email }</small>
872-
</>
873-
);
874-
}
875-
876846
if ( this.isWooJPC() ) {
877847
return (
878848
<>
@@ -1056,19 +1026,14 @@ export class JetpackAuthorize extends Component {
10561026
);
10571027
}
10581028

1059-
const gravatarSize = this.isFromMigrationPlugin() ? 94 : 64;
10601029
const { from } = authQuery;
10611030
const loginURL = login( { isJetpack: true, redirectTo: window.location.href, from } );
10621031

10631032
if ( this.isFromJetpackOnboarding() ) {
10641033
return (
10651034
<>
10661035
<div className="jetpack-connect__logged-in-user-card">
1067-
<Gravatar
1068-
className="jetpack-connect__user-card-gravatar"
1069-
user={ user }
1070-
size={ gravatarSize }
1071-
/>
1036+
<Gravatar className="jetpack-connect__user-card-gravatar" user={ user } size={ 64 } />
10721037
<div className="jetpack-connect__user-card-text">{ this.getUserText() }</div>
10731038
</div>
10741039
<LoggedOutFormLinkItem
@@ -1123,7 +1088,7 @@ export class JetpackAuthorize extends Component {
11231088

11241089
return (
11251090
<Card className="jetpack-connect__logged-in-card">
1126-
<Gravatar user={ user } size={ gravatarSize } />
1091+
<Gravatar user={ user } size={ 64 } />
11271092
<p className="jetpack-connect__logged-in-form-user-text">{ this.getUserText() }</p>
11281093
{ this.isFromMyJetpackConnectAfterCheckout() && (
11291094
<p className="jetpack-connect__activate-product-text">
@@ -1316,7 +1281,6 @@ export class JetpackAuthorize extends Component {
13161281
'jetpack-connect__authorize-form-wrapper--onboarding': isFromJetpackOnboarding,
13171282
} ) }
13181283
isWooJPC={ this.isWooJPC() }
1319-
isWpcomMigration={ this.isFromMigrationPlugin() }
13201284
isFromAutomatticForAgenciesPlugin={ this.isFromAutomatticForAgenciesPlugin() }
13211285
wooDnaConfig={ wooDna }
13221286
useCompactLogo={ isFromJetpackOnboarding }
@@ -1350,7 +1314,6 @@ export class JetpackAuthorize extends Component {
13501314
<AuthFormHeader
13511315
authQuery={ this.props.authQuery }
13521316
isWooJPC={ this.isWooJPC() }
1353-
isWpcomMigration={ this.isFromMigrationPlugin() }
13541317
isFromAutomatticForAgenciesPlugin={ this.isFromAutomatticForAgenciesPlugin() }
13551318
wooDnaConfig={ wooDna }
13561319
/>

0 commit comments

Comments
 (0)