Skip to content
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

Site migration: lock the UI immediately the migration starts #38684

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

andfinally
Copy link
Contributor

Note: This change is behind a feature flag and is part of an in-progress larger project. For context, see pbkcP4-8-p2.

Changes proposed in this Pull Request

  • Sets the migrationStatus state to backing-up as soon as the user clicks the "Start Migration" button, so the UI locks before we make a request to the migration status endpoint.
  • Includes done among the statuses indicating that a migration is not in progress, so the UI unlocks at the end of a migration without the user needing to dismiss the success message.

Testing instructions

(Note: most of these instructions are general instructions for testing migration. The bolded steps are the ones specific to this change)

  • Check out this pull request and run Calypso locally, or run it on calypso.live.
  • Viewing calypso.localhost:3000/migrate/, you should see a SiteSelector component allowing you to choose a site to migrate a Jetpack site into.
  • When you select a site, you should see another SiteSelector component, listing all the Jetpack sites your account has access to.
  • Selecting one of those sites should take you to a confirmation screen.
  • Click the "Start Migration" button.
  • You'll see a confirm modal. Click the "Overwrite this site" button.
  • The migration should start and the UI should lock immediately.
  • When the migration is finished, the UI should unlock.

…, so the UI locks sooner. Unlock the UI if the status is 'done'.
@matticbot
Copy link
Contributor

@andfinally andfinally added the WP Migration Use "[Feature] Site Migration" ___ Old lable related to WP Migration Project (pbkcP4-8-p2) label Jan 7, 2020
@andfinally andfinally self-assigned this Jan 7, 2020
@andfinally andfinally requested a review from a team January 7, 2020 12:01
@andfinally andfinally added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 7, 2020
@matticbot
Copy link
Contributor

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

Webpack Runtime (~2798 bytes removed 📉 [gzipped])

name      parsed_size            gzip_size
manifest     +36362 B  (+27.2%)    -2798 B  (-8.3%)

Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded.

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

name        parsed_size           gzip_size
entry-main        +22 B  (+0.0%)      +11 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~198 bytes removed 📉 [gzipped])

name     parsed_size           gzip_size
migrate       -818 B  (-0.7%)     -198 B  (-0.7%)

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.

@mattsherman mattsherman self-requested a review January 7, 2020 15:37
@mattsherman mattsherman assigned mattsherman and unassigned andfinally Jan 7, 2020
Copy link
Contributor

@mattsherman mattsherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels so much better. Thanks for the fix. Approved.

@andfinally andfinally removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 7, 2020
@andfinally andfinally merged commit b288baa into master Jan 7, 2020
@andfinally andfinally deleted the update/migration--lock-immediately branch January 7, 2020 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WP Migration Use "[Feature] Site Migration" ___ Old lable related to WP Migration Project (pbkcP4-8-p2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants