-
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
Add platform Identification step site-creation processing #93327
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 (~67 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~811 bytes added 📈 [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 (~47 bytes added 📈 [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. |
cdfe2d0
to
dd667ec
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 |
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.
In general, it looks great! Just adding a few comments that I noticed and some questions.
...anding/stepper/declarative-flow/internals/steps-repository/platform-identification/index.tsx
Outdated
Show resolved
Hide resolved
...anding/stepper/declarative-flow/internals/steps-repository/platform-identification/index.tsx
Outdated
Show resolved
Hide resolved
@@ -64,7 70,10 @@ export default function ListStep( props: Props ) { | |||
}; | |||
|
|||
const recordImportList = () => { | |||
recordTracksEvent( trackEventName, trackEventParams ); | |||
if ( ! skipTracking ) { |
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.
I created an issue for this: #93352
Do you have some more references about this? How to identify the issue and how to verify it's already fixed to remove this check?
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 step probably needs to be updated.
Stepper already triggers the calypso_signup_step_start
automatically.
If you check the network tab on developer tools and search for calypso_signup_step_start
you can see two calls to the same event as one of them is using a hardcode value on the "flow" attribute.
const trackEventParams = { |
I just don't removed it because we can have reports using it.
|
||
if ( currentStep === PROCESSING.slug ) { | ||
if ( data?.next ) { | ||
return window.location.assign( |
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.
I see that the hosted-site-migration
also does the same, redirecting the flow to the /setup/site-setup
. Just for my understanding, is there a special reason we do this instead of adding all the steps in this flow?
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.
Although the steps are very reusable the logic to continue on each user interaction (site-setup.ts) is not easy to reuse. In these cases we are redirecting the users to the more appropriate flow.
client/landing/stepper/declarative-flow/hosted-site-migration-v2/index.tsx
Show resolved
Hide resolved
client/landing/stepper/declarative-flow/hosted-site-migration-v2/index.tsx
Show resolved
Hide resolved
client/landing/stepper/declarative-flow/hosted-site-migration-v2/index.tsx
Show resolved
Hide resolved
} | ||
|
||
expect.extend( { | ||
toMatchDestination: ( destination, expected: MatchDestinationParams ) => { |
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.
Nice! =)
jest.mock( '@automattic/data-stores/src/user/selectors' ); | ||
jest.mock( 'calypso/landing/stepper/hooks/use-is-site-owner' ); | ||
|
||
describe( `${ flow.name }`, () => { |
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.
Nice tests! =)
…tory/platform-identification/index.tsx Co-authored-by: Renatho De Carli Rosa <[email protected]>
client/landing/stepper/declarative-flow/hosted-site-migration-v2/index.tsx
Outdated
Show resolved
Hide resolved
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.
There's just one last thing to fix. So I'm already approving this to be merged after the fix! Nice work! =)
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/16465157 Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Hi @gabrielcaires, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:
Thank you in advance! |
* Add new migration-flow * Rename step to import-or-migrate * Rename flow * Add platform identification step * Remove lint conflicts * Revert "Remove lint conflicts" This reverts commit d581ce4. * Remove * Fix lint issues * Redirect to import or upgrade * Add test suite * Improve tests * Adjust the title * Fix type * Update client/landing/stepper/declarative-flow/internals/steps-repository/platform-identification/index.tsx Co-authored-by: Renatho De Carli Rosa <[email protected]> * Update description * Fix next url when user select wordpress as platform * Fix wrong query param --------- Co-authored-by: Renatho De Carli Rosa <[email protected]>
Translation for this Pull Request has now been finished. |
closes #93298
closes #93296
closes #93259
Proposed Changes
Note
No logic related to the back button was added in this PR.
Testing Instructions
Scenario: Platform WordPress
/setup/hosted-site-migration-v2.
wordpress
Scenario: Other Platform
Scenario: Platform WordPress
/setup/hosted-site-migration-v2.
Pre-merge Checklist