-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor list of site importers into a single location #91609
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 (~32 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~493 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. 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. |
71dca8e
to
c0e072a
Compare
c0e072a
to
5e5d1e9
Compare
And now all the tests pass 🤷 |
5e5d1e9
to
8707a0a
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 |
For some reason I'm seeing Wix in the primary importers list locally, but not on calypso.live. 🤔 Is there a reason for that, do you know? |
It's no longer in use
@sixhours Hmm. I'm not seeing it locally or calypso.live. Which path did you take? Was it |
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.
This is working for me!
Nevermind, I don't see it there now. 🙃 |
Related to #90635
Proposed Changes
This updates the
getConfig
function inclient/lib/importer/importer-config.tsx
to be the single source of information about available site importers.It also updates the
ListStep
andgetFinalImporterUrl
helper so they pull the data they need from the updatedgetConfig
function.This is done with two new functions:
getImporterEngines
which returns a list of the importer engine slugs.getImportersAsImporterOption
which returns either the primary or secondary importers in theImporterOption
format.Why are these changes being made?
Previously, there were multiple lists of importers in different places. Having a single source of truth will make it easier to keep track of things and make updates.
Testing Instructions
There are tests for the two new functions for retrieving importer details:
To test the actual UI, you can use either calypso.live or check out this branch and run it locally.
Then there are two ways to get to the importer list.
/sites
, click the^
next to "Add new site" and click "Import an existing site"./start
and select the "Import existing content or website" Goal.You'll eventually arrive at the "Let's find your site" step
Click "pick your current platform from a list". You should be taken to "Import content from another platform".
From here, verify that the options are displaying correctly.
Then try clicking a few of the importers in the top section and in the "Other platforms" dropdown.
You should be taken to the correct import page for the source slte you selected.
Pre-merge Checklist