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

Private by default launch flow #30242

Merged
merged 36 commits into from Mar 1, 2019

Conversation

niranjan-uma-shankar
Copy link
Contributor

@niranjan-uma-shankar niranjan-uma-shankar commented Jan 18, 2019

Changes proposed in this Pull Request

  • This PR implements the Private by default launch flow.
  • The following happens when a user clicks the launch button on a private site:
    • If the site does not have a domain and/or a plan, we will take them through a site-launch flow.
      This flow will show the domain step and the plan step before taking them to the preview page with a
      successful launch banner:
    • If the site has both a domain and a plan, then the user is directly taken to the Preview page with a launch banner celebrating the success.

screenshot 2019-01-29 at 5 25 39 pm

Testing instructions

Please apply D23389-code and follow the testing instructions given there.

Scenario-1 - Launch a site that does not have either a domain or a plan

  1. Create a site on the Free plan without a domain (except the default *.wordpress.com domain)
  2. Clicking Launch Site should go through the launch flow, showing both the domain and plan steps.
    There are a few scenarios that can be tested here:
    • Add both a domain and a plan to your cart so that you're taken to the checkout page. At this point, cancelling the purchase (by navigating away from checkout either by clicking the Trash icon in the cart on the left menu, or just closing the browser tab) should still launch the site. Check back in Preview that you no longer see the Launch Site button.
    • After adding both a domain and plan to your cart, make the purchase at the Checkout page. You should be redirected to the Site preview page with a success banner message.
    • You should be allowed to skip both the Domain purchase (by clicking Skip Purchase in the domain step) and Plan purchase (by clicking the Keep this Plan button in the plan step). You will then be directly taken to the Preview page with success banner (no checkout page)

Scenario-2 - Launch a site that does not have a domain but has a plan

  1. Create a site with a paid plan but don't purchase a domain.
  2. Clicking Launch Site should go through the launch flow, showing only the domain step. Test both with purchasing a domain and skipping Purchase - in both cases, it should take you to the Preview page with Success banner.

Scenario-3 - Launch a site that has a domain but does not have a plan

  1. Create a site with a domain but no plan (for this you need to first create a site on a paid plan, purchase a domain, and then cancel the Plan purchase while retaining the domain).
  2. Clicking Launch Site should go through the launch flow, showing only the plan step. Test both with purchasing a plan and skipping Purchase - in both cases, it should take you to the Preview page with Success banner.

Scenario-4 - Launch a site that has both a domain and a plan

  1. Create a site on a paid plan with a domain
  2. Launch the site, it should directly take you to the preview page (without going through the launch flow) and show a success banner.

Other tests

  1. Test signup works correctly via the main and onboarding flows.
  2. Test Add a new site option works correctly.
  3. Test the subdomain flow works correctly. This is being used in .blog landing pages (photo.blog, food.blog etc). /start/subdomain?vertical=a8c.8 should show the default recommendation on the domain step to be a *.food.blog.

@matticbot
Copy link
Contributor

@niranjan-uma-shankar
Copy link
Contributor Author

Ooops... I did something while rebase that closed this PR. Re-opening.

@scruffian
Copy link
Member

I made some changes to the cart which mean you no longer to supply the site Id - you can just use the site slug. That might simplify this code a bit...

addToCartAndProceed();
}
}
export function addDomainToCart(
Copy link
Member

Choose a reason for hiding this comment

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

I think we have several different ways of adding things to the cart. There's one for domains and one for plans. It would be good if they both used the same code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check 829ce5d. I've consolidated the common parts of the code in processItemCart(). I still had to retain addPlanToCart() and addDomainToCart() as separate functions because they provide different dependencies. Does it align with your suggestion or am I missing something?

@scruffian
Copy link
Member

This is looking like it's heading in the right direction, great job :)

client/signup/main.jsx Outdated Show resolved Hide resolved
@niranjan-uma-shankar niranjan-uma-shankar changed the title (WIP) Private by default launch flow Private by default launch flow Jan 29, 2019
@niranjan-uma-shankar niranjan-uma-shankar added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Jan 29, 2019
@niranjan-uma-shankar niranjan-uma-shankar requested review from a team January 29, 2019 12:45
@niranjan-uma-shankar
Copy link
Contributor Author

There are a few places where the destination is not respected.

  1. On the checkout page, if you click the Trash icon on the cart in the left menu, you will be taken to the Upgrades page
  2. If you go through the launch flow on a site that has a plan but without a domain, then the checkout page will take you to /thank-you/{siteSlug}/{receiptId}
  3. If you purchase a domain or plan in the launch flow, then you'll be taken to Calypso preview /view/{siteSlug} instead of to https://{siteSlug}

At least some of them are due to the destination not being respected, and could get fixed with the work happening in #29136

@fditrapani
Copy link
Contributor

Thanks for all this work @niranjan-uma-shankar and @scruffian. It tested well with a free plan, paid plan plus subdomain, and paid plan plus a domain. Here are a couple notes:

  • It would be good to get a video/animated gif walkthrough of the flow as part of the description of this PR. It took me some time to get this all running on my machine.
  • Clicking on the Launch button opens in a new tab feels disorienting to me. I think it would work better in the same tab.

These items can most likely be addressed in separate PRs:

  • Domains screen: I like the suggestions there but it's not super clear right off the bat that they are suggestions.
  • Domains: The skip option isn't super obvious because it's bundled in with the other choices.
  • Domains: If I search and don't like the options, it's not clear to me that I have to clear the search to see the skip option again.
  • Domains: The "Skip purchase" call to action doesn't seem right because we're asking folks to purchase a plan and not a domain.
  • Plans: The "upgrade" call to action doesn't quite seem right — I do like the "Keep this plan" one though.

cc @danhauk

@niranjan-uma-shankar
Copy link
Contributor Author

The success launch banner(shown after launch) and the private site banner(before launch) both have the same icon. Maybe we could have different icons to show a difference.

Pre-address verification:
screenshot 2019-01-30 at 1 41 02 am

Pre-launch:

screenshot 2019-01-30 at 1 41 36 am

Post-launch:

screenshot 2019-01-29 at 5 25 39 pm

@danhauk
Copy link
Contributor

danhauk commented Jan 29, 2019

Maybe we could have different icons to show a difference.

I agree. It would be great to have something more celebratory there. I'll work on something for that.

…he framework. In the launch flow, if the site has a domain or a paid plan, then the corresponding step is skipped.
…iables with undefined values since they are not needed to submit the signup step. Outcome: code is cleaner
…licable to all steps. It also combines the functionality of submitQueryDependencies()
…ing excluded even if just one dependency was getting fulfilled. Introduced a change in which we exclude a step only if all of the dependencies it provides have been fulfilled 2. Added the isSiteTopicFulfilled callback to the site topic step of the preview flow
…flow. This should hopefully fix the failing e2e test (though hacky)
Copy link
Member

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

Lets merge this and deal with the remaining issues in another PR. @niranjan-uma-shankar are you ok to create a new issue which compiles the remaining unaddressed feedback?

@niranjan-uma-shankar
Copy link
Contributor Author

Lets merge this and deal with the remaining issues in another PR. @niranjan-uma-shankar are you ok to create a new issue which compiles the remaining unaddressed feedback?

Happy to do it @scruffian.

@scruffian
Copy link
Member

Great 🚢

@scruffian scruffian added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 28, 2019
@niranjan-uma-shankar niranjan-uma-shankar merged commit cf78231 into master Mar 1, 2019
niranjan-uma-shankar added a commit that referenced this pull request Mar 1, 2019
@scruffian scruffian deleted the add/private-by-default-launch-flow branch March 1, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants