Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Refactor credentials step to fit application password project. #96646

Open andregardi opened 3 days ago

andregardi commented 3 days ago

Related to https://github.com/Automattic/wp-calypso/issues/96564

Proposed Changes

image

As part of application passwords integration on migrations, we are refactoring the credentials step. If application passwords is available on the source site, users may not be required to input admin username and password.

Under the automated-migration/application-password feature flag we are removing the username and password fields. We are planning to have an additional step to collect those in case application passwords approval is not available.

Conditionally to the feature flag, we are also preventing the call to useRequestAutomatedMigration which should be done in a posterior step. Either the Get ready for blazing fast speeds or Securely share your credentials which are still to be built.

If the site is not Wordpress platform at all, we should direct the user to the Looks like there's been a mix-up step.

If the site is already a WPCOM site we redirect, we should redirect to the Your site is already on WordPress.com survey step.

Testing Instructions

The automated-migration/application-password feature flag is already on localhost environment. Start a Do it for me migration until you reach the /site-migration-credentials step. Password and usernames should not be present anymore.

Keep using the valid source site address and click on Continue button. You should be redirected to a Get ready for blazing fast speeds step. This step should be empty, it is just a placeholder for future implementation.

Click on back button. Try a URL that is not a wordpress platform site. For example https://automattic.tumblr.com/. You should be directed to Looks like there's been a mix-up step.

Click on back button. Try a URL that is already on WPCOM site. For example https://matt.blog/. You should be directed to the Your site is already on WordPress.com step.

Make a regression test with feature flag disabled, by adding flags=-automated-migration/application-password url query parameter. Migration flow should keep working as before.

Pre-merge Checklist

github-actions[bot] commented 3 days ago
Calypso Live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125468
Jetpack Cloud live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125468&env=jetpack
Automattic for Agencies live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125468&env=a8c-for-agencies
matticbot commented 3 days ago

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 install-plugin.sh $pluginSlug agardi/app-password-credentials-step on your sandbox.

matticbot commented 3 days ago

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~58 bytes added 📈 [gzipped])

``` name parsed_size gzip_size entry-subscriptions +357 B (+0.0%) +58 B (+0.0%) entry-stepper +357 B (+0.0%) +58 B (+0.0%) entry-main +357 B (+0.0%) +58 B (+0.0%) entry-login +357 B (+0.0%) +58 B (+0.0%) entry-domains-landing +357 B (+0.1%) +58 B (+0.0%) entry-browsehappy +357 B (+0.2%) +58 B (+0.1%) ``` Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~866 bytes added 📈 [gzipped])

``` name parsed_size gzip_size site-migration-flow +668 B (+0.8%) +110 B (+0.7%) hosted-site-migration-flow +668 B (+0.8%) +110 B (+0.7%) with-theme-assembler-flow +472 B (+0.6%) +55 B (+0.5%) update-options-flow +472 B (+0.8%) +59 B (+1.0%) update-design-flow +472 B (+0.0%) +59 B (+0.0%) trial-wooexpress-flow +472 B (+0.8%) +57 B (+0.8%) tailored-ecommerce-flow +472 B (+0.8%) +58 B (+0.8%) site-setup-wg +472 B (+0.4%) +60 B (+0.3%) site-setup-flow +472 B (+0.4%) +60 B (+0.3%) readymade-template-flow +472 B (+0.3%) +58 B (+0.2%) migration-signup +472 B (+0.8%) +59 B (+0.7%) migration-flow +472 B (+0.6%) +59 B (+0.4%) import-flow +472 B (+0.7%) +59 B (+0.6%) free-post-setup-flow +472 B (+0.8%) +59 B (+1.0%) entrepreneur-flow +472 B (+0.4%) +59 B (+0.2%) assembler-first-flow +472 B (+0.6%) +57 B (+0.4%) ai-assembler-flow +472 B (+0.6%) +57 B (+0.4%) ``` Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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. **Gzip Size:** Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.