Skip to content

Commit 6ebbf69

Browse files
committed
Remove wpcom-migration customization from Login and Jetpack Connect
1 parent 517e310 commit 6ebbf69

File tree

10 files changed

+27
-303
lines changed

10 files changed

+27
-303
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 }
@@ -707,10 +704,6 @@ export default connect(
707704
isWCCOM: getIsWCCOM( state ),
708705
isWoo: getIsWoo( state ),
709706
wccomFrom: getWccomFrom( state ),
710-
isFromMigrationPlugin: startsWith(
711-
get( getCurrentQueryArguments( state ), 'from' ),
712-
'wpcom-migration'
713-
),
714707
currentQuery: getCurrentQueryArguments( state ),
715708
initialQuery: getInitialQueryArguments( state ),
716709
currentRoute: getCurrentRoute( state ),

client/blocks/login/login-header.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ interface LoginHeaderProps {
2222
currentQuery: Record< string, string >;
2323
fromSite: string | null;
2424
isFromAkismet: boolean;
25-
isFromMigrationPlugin: boolean;
2625
isFromAutomatticForAgenciesPlugin: boolean;
2726
isGravPoweredClient: boolean;
2827
isGravPoweredLoginPage: boolean;
@@ -58,7 +57,6 @@ export function getHeaderText(
5857
action: string,
5958
oauth2Client: { title: string; icon: string } | null,
6059
isWooJPC: boolean,
61-
isFromMigrationPlugin: boolean,
6260
isJetpack: boolean,
6361
isWCCOM: boolean,
6462
isFromAkismet: boolean,
@@ -179,8 +177,6 @@ export function getHeaderText(
179177
} else {
180178
headerText = translate( 'Log in to your account' );
181179
}
182-
} else if ( isFromMigrationPlugin ) {
183-
headerText = translate( 'Log in to your account' );
184180
} else if ( isJetpack && ! isFromAutomatticForAgenciesPlugin ) {
185181
headerText = translate(
186182
'Log in or create a WordPress.com account to supercharge your site with powerful growth, performance, and security tools.'
@@ -203,7 +199,6 @@ export function LoginHeader( {
203199
currentQuery,
204200
fromSite,
205201
isFromAkismet,
206-
isFromMigrationPlugin,
207202
isFromAutomatticForAgenciesPlugin,
208203
isGravPoweredClient,
209204
isGravPoweredLoginPage,
@@ -236,7 +231,6 @@ export function LoginHeader( {
236231
action,
237232
oauth2Client,
238233
isWooJPC,
239-
isFromMigrationPlugin,
240234
isJetpack,
241235
isWCCOM,
242236
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
@@ -763,14 +763,6 @@ export class JetpackAuthorize extends Component {
763763
const { authorizeError, authorizeSuccess, isAuthorizing } = this.props.authorizationData;
764764
const { alreadyAuthorized } = this.props.authQuery;
765765

766-
if ( this.isFromMigrationPlugin() ) {
767-
if ( this.props.isFetchingAuthorizationSite ) {
768-
return translate( 'Preparing authorization' );
769-
}
770-
771-
return translate( 'Continue' );
772-
}
773-
774766
if ( ! this.props.isAlreadyOnSitesList && ! this.props.isFetchingSites && alreadyAuthorized ) {
775767
return translate( 'Go back to your site' );
776768
}
@@ -813,9 +805,7 @@ export class JetpackAuthorize extends Component {
813805
return translate( 'Connect my site' );
814806
}
815807

816-
if ( ! this.retryingAuth ) {
817-
return translate( 'Approve' );
818-
}
808+
return translate( 'Approve' );
819809
}
820810

821811
getScreenReaderAuthMessage() {
@@ -824,14 +814,6 @@ export class JetpackAuthorize extends Component {
824814
const { authorizeError, authorizeSuccess, isAuthorizing } = this.props.authorizationData;
825815
const { alreadyAuthorized } = this.props.authQuery;
826816

827-
if ( this.isFromMigrationPlugin() ) {
828-
if ( this.props.isFetchingAuthorizationSite ) {
829-
return translate( 'Preparing authorization' );
830-
}
831-
832-
return;
833-
}
834-
835817
if ( ! this.props.isAlreadyOnSitesList && ! this.props.isFetchingSites && alreadyAuthorized ) {
836818
return;
837819
}
@@ -863,20 +845,8 @@ export class JetpackAuthorize extends Component {
863845
getUserText() {
864846
const { translate } = this.props;
865847
const { authorizeSuccess } = this.props.authorizationData;
866-
const isWpcomMigration = this.isFromMigrationPlugin();
867848
const isWooDnaFlow = this.getWooDnaConfig().isWooDnaFlow();
868849

869-
if ( isWpcomMigration ) {
870-
const { display_name, email } = this.props.user;
871-
return (
872-
<>
873-
<strong>{ display_name }</strong>
874-
<br />
875-
<small>{ email }</small>
876-
</>
877-
);
878-
}
879-
880850
if ( this.isWooJPC() ) {
881851
return (
882852
<>
@@ -1063,7 +1033,6 @@ export class JetpackAuthorize extends Component {
10631033
);
10641034
}
10651035

1066-
const gravatarSize = this.isFromMigrationPlugin() ? 94 : 64;
10671036
const { from } = authQuery;
10681037
const loginURL = login( { isJetpack: true, redirectTo: window.location.href, from } );
10691038

@@ -1074,11 +1043,7 @@ export class JetpackAuthorize extends Component {
10741043
return (
10751044
<>
10761045
<div className="jetpack-connect__logged-in-user-card">
1077-
<Gravatar
1078-
className="jetpack-connect__user-card-gravatar"
1079-
user={ user }
1080-
size={ gravatarSize }
1081-
/>
1046+
<Gravatar className="jetpack-connect__user-card-gravatar" user={ user } size={ 64 } />
10821047
<div className="jetpack-connect__user-card-text">{ this.getUserText() }</div>
10831048
</div>
10841049
<LoggedOutFormLinkItem
@@ -1133,7 +1098,7 @@ export class JetpackAuthorize extends Component {
11331098

11341099
return (
11351100
<Card className="jetpack-connect__logged-in-card">
1136-
<Gravatar user={ user } size={ gravatarSize } />
1101+
<Gravatar user={ user } size={ 64 } />
11371102
<p className="jetpack-connect__logged-in-form-user-text">{ this.getUserText() }</p>
11381103
{ this.isFromMyJetpackConnectAfterCheckout() && (
11391104
<p className="jetpack-connect__activate-product-text">
@@ -1331,7 +1296,6 @@ export class JetpackAuthorize extends Component {
13311296
'jetpack-connect__authorize-form-wrapper--onboarding': isFromJetpackOnboarding,
13321297
} ) }
13331298
isWooJPC={ this.isWooJPC() }
1334-
isWpcomMigration={ this.isFromMigrationPlugin() }
13351299
isFromAutomatticForAgenciesPlugin={ this.isFromAutomatticForAgenciesPlugin() }
13361300
wooDnaConfig={ wooDna }
13371301
useCompactLogo={ isFromJetpackOnboarding }
@@ -1365,7 +1329,6 @@ export class JetpackAuthorize extends Component {
13651329
<AuthFormHeader
13661330
authQuery={ this.props.authQuery }
13671331
isWooJPC={ this.isWooJPC() }
1368-
isWpcomMigration={ this.isFromMigrationPlugin() }
13691332
isFromAutomatticForAgenciesPlugin={ this.isFromAutomatticForAgenciesPlugin() }
13701333
wooDnaConfig={ wooDna }
13711334
/>

0 commit comments

Comments
 (0)