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

Launch: use step-by-step launch flow after new onboarding with free plan #47493

Merged

Conversation

razvanpapadopol
Copy link

@razvanpapadopol razvanpapadopol commented Nov 17, 2020

*Editing Toolkit release notes: N/A (this PR is just cleaning up some unused code)

Changes proposed in this Pull Request

Testing instructions - what should stay unchanged

  1. Go to /new
  2. Create a site with a paid plan and complete purchase
  3. When clicking Launch button from the top bar in editor, you should be redirected to /start/launch-site which is the default Launch flow in Calypso.

Testing instructions - what should change

  1. Go to /new
  2. Create a site on a Free plan
  3. Go to My Home and navigate to editor
  4. Check if there is a plan object in store by executing wp.data.select( 'automattic/site' ).getSite( _currentSiteId )?.plan in post.php window in console.
  5. When clicking Launch button from the top bar in editor, Step-by-step Launch modal should open over the editor.

Context

p1605290793102800-slack-CRNF6A9DX
#47421

@matticbot
Copy link
Contributor

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 17, 2020
@matticbot
Copy link
Contributor

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

Sections (~14 bytes added 📈 [gzipped])

name              parsed_size           gzip_size
gutenberg-editor        +27 B  (+0.0%)      +14 B  (+0.0%)

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.

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D52861-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2

const isGutenboarding = this.props.siteCreationFlow === 'gutenboarding' && ! this.props.plan;
const isGutenboarding =
this.props.siteCreationFlow === 'gutenboarding' &&
( ! this.props.plan || this.props.plan.is_free ); // prevent showing StepByStepLaunch on sites with paid plans
Copy link
Contributor

Choose a reason for hiding this comment

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

Putting the ( ! this.props.plan || this.props.plan.is_free ) check here may cause some confusion, since the isGutenboarding variable now carries a different meaning that is not just to do with the site creation flow.

Would it be better move the check under a separate siteHasFreePlan variable, and pass that variable to calypsoifyGutenberg?
The code on the Editing Toolkit side could then check for isGutenboarding && siteHasFreePlan, making the code more explicit on what's going on

Copy link
Author

Choose a reason for hiding this comment

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

I agree there is a better way to do this and also prevent confusion. Opened #47504 to unblock current PR so we can quickly fix the issue from the Calypso side and then implement a more solid solution that involves deploying ETK and WBE.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Thank you for opening a separate issue to track this.

client/gutenberg/editor/calypsoify-iframe.tsx Show resolved Hide resolved
@ciampo
Copy link
Contributor

ciampo commented Nov 17, 2020

Testing instructions - what should stay unchanged

  1. Go to /new
  2. Create a site with a paid plan and complete purchase
  3. When clicking Launch button from the top bar in editor, you should be redirected to /start/launch-site which is the default Launch flow in Calypso.

When clicking on "Launch", I'm shown a prompt to confirm I want to leave the editor, and I'm then redirected to wordpress.com/home/[siteid]

Here's a screen recording, in case I'm missing any step

@ciampo
Copy link
Contributor

ciampo commented Nov 17, 2020

When clicking on "Launch", I'm shown a prompt to confirm I want to leave the editor, and I'm then redirected to wordpress.com/home/[siteid]

Update: without sandboxing, I'm able to test the changes correctly.

Can be merged once the outstanding comments are discussed / addressed

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

LGTM

@razvanpapadopol razvanpapadopol added the Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin label Nov 17, 2020
@razvanpapadopol razvanpapadopol merged commit 03161b0 into master Nov 17, 2020
@razvanpapadopol razvanpapadopol deleted the fix/launch-after-new-onboarding-with-free-plan branch November 17, 2020 14:57
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 17, 2020
@ockham ockham mentioned this pull request Nov 17, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin Launch [Type] Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants