-
Notifications
You must be signed in to change notification settings - Fork 2k
Remove wpcom-migration customization from Login and Jetpack Connect #103766
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
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~203 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~440 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~206 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
if ( ! this.retryingAuth ) { | ||
return translate( 'Approve' ); | ||
} | ||
return translate( 'Approve' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The this.retryingAuth
condition is handled a few lines above. If we get to this statement, it's already guaranteed to be false
.
includes( get( currentQuery, 'redirect_to' ), '/jetpack/connect/authorize' ) && | ||
includes( get( currentQuery, 'redirect_to' ), '_wp_nonce' ) | ||
includes( redirectTo, '/jetpack/connect/authorize' ) && | ||
includes( redirectTo, '_wp_nonce' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and at a few other places I'm reusing the existing redirectTo
value. It's guaranteed to be non-empty because it satisfied checks for a substring.
@@ -149,6 +137,8 @@ export function getSignupUrl( currentQuery, currentRoute, oauth2Client, locale, | |||
oauth2_client_id: oauth2Client.id, | |||
oauth2_redirect: redirectTo, | |||
} ); | |||
|
|||
const wccomFrom = get( currentQuery, 'wccom-from' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I'm moving the variable assignment closer to the (single) usage. Similarly for signupFlow
a few lines below.
isFromPublicAPIConnectFlow || | ||
( includes( redirectTo, 'action=jetpack-sso' ) && includes( redirectTo, 'sso_nonce=' ) ) || | ||
redirectTo | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this condition is redundant since https://github.com/Automattic/wp-calypso/pull/83026/files#r1361480491 because if redirectTo
is non-empty, the entire condition is true
.
6ebbf69
to
94ea5ff
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
This removes a no-longer-used customization of the
/jetpack/connect/authorize
and/log-in/jetpack
pages when the user comes from a WP.com migration plugin flow (from=wpcom-migration
query param. As you can read in #103445 (comment) thewpcom-migration
plugin on WP.org has been changed to a completely different implementation and this flow is no longer used.There were many design customizations as you can see in these
/jetpack/connect/authorize
screenshots:The customized flow changed the vanilla Jetpack Connect screen by changing the colors (to WP.com blue), removing the Jetpack header, rendering a different header and subheader, different label on the "Approve" button, displaying the user name and gravatar differently... This is now all gone.
I'm keeping the customization that affect functionality: like redirecting to
/start/site-migration
or/start/account
on certain conditions that involve thefrom=wpcom-migration
query param. The flow will still work flawlessy if someone goes through it. But the visual customizations are all removed.Testing instructions:
/jetpack/connect/authorize
in dev Calypso.client/jetpack-connect/controller.js
, modify the line:NoDirectAccessError
screen.wpcom-migration
and without.