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 importer: fix for issue where site import preview persists from previous import #35930

Merged
merged 2 commits into from
Sep 2, 2019

Conversation

andfinally
Copy link
Contributor

@andfinally andfinally commented Sep 2, 2019

This is a duplicate of #35835. That PR has been approved, but I've been unable to merge it because of an issue with the canary e2e tests. Copying the changes into a new PR enables the tests to pass.


When you complete a Wix or GoDaddy import, and then start a second one, you see the preview page from the previous import instead of the form inviting you to enter the URL of the next site you want to import.

Changes proposed in this Pull Request

  • This change clears the importStage state of the SiteImporterInputPane component on mounting, if the state is importable. This state should never occur on first mounting: it's only set after the importer has checked a given URL for importability.

Testing instructions

  • Apply the PR and run Calypso locally, or use calypso.live.
  • Starting at URL: /import/[ site ], open the Wix or GoDaddy importer and import a Wix or GoDaddy site.
  • When the import is complete, click on "Export" or some other sidebar menu item, and then back on "Import" to return to the importers page. (This clears the "import finished" view.)
  • Open the Wix or GoDaddy importer again. You should see the site importer form with input to enter a URL, never the site preview page.

image

  • Complete the second import and verify that all goes as normal and there are no errors in the console.
  • Do a Wix or GoDaddy import from the /start flow to verify that still works as expected.

Fixes Samus issue 35335

@andfinally andfinally self-assigned this Sep 2, 2019
@matticbot
Copy link
Contributor

…s mounted, to clear any lingering state from previous imports.
@matticbot
Copy link
Contributor

matticbot commented Sep 2, 2019

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

Sections (~28 bytes added 📈 [gzipped])

name    parsed_size           gzip_size
import       +153 B  (+0.1%)      +28 B  (+0.1%)

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.

@andfinally andfinally added Import Site Importer Site Importer related issues and removed DO NOT MERGE labels Sep 2, 2019
@andfinally andfinally changed the title Draft: Site importer: fix for issue where site import preview persists from previous import Site importer: fix for issue where site import preview persists from previous import Sep 2, 2019
@andfinally andfinally merged commit 013e553 into master Sep 2, 2019
@andfinally andfinally deleted the fix/site-importer-preview-persists branch September 2, 2019 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Import Site Importer Site Importer related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants