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

Signup: Add a domain to an existing site (/domains) #13605

Merged
merged 23 commits into from
May 26, 2017

Conversation

aidvu
Copy link
Contributor

@aidvu aidvu commented May 3, 2017

Add steps that allow adding a domain to an existing eligible site coming from /domains.

Added site-picker step for logged-in users which creates a new cart and redirects to checkout, because this is a regular purchase with an existing site.

What to test for logged in user:

  • /domains picking an existing site which has a plan (only domain added)
  • /domains picking an existing site w/o plan (plan and domain added)
  • /domains picking an existing site which is domain-only (plan and domain added)
  • shouldn't see any Jetpack sites in the site-picker

Easiest way is to hit: http://calypso.localhost:3000/start/domain-first/?new=some-random-url-xxx-test.com

Fixes: #12196

@aidvu aidvu added [Feature Group] Emails & Domains Features related to email integrations and domain management. NUX [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. [Status] In Progress labels May 3, 2017
@aidvu aidvu added this to the Tortuga: Development milestone May 3, 2017
@aidvu aidvu self-assigned this May 3, 2017
@matticbot
Copy link
Contributor

@matticbot matticbot added [Size] M Medium sized issue [Size] XL Probably needs to be broken down into multiple smaller issues and removed [Size] M Medium sized issue labels May 3, 2017
stepName: 'site-picker',
apiRequestFunction: stepActions.linkExistingSite,
props: {
headerText: i18n.translate( 'Choose your site?' ),
Copy link

Choose a reason for hiding this comment

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

Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Choose a site' ) ES Score: 7

Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).

@aidvu aidvu force-pushed the update/add-existing-site-domain-only branch 2 times, most recently from 079c192 to b450976 Compare May 5, 2017 18:55
{
type: 'domain',
label: 'Just buy a domain',
label: translate( 'Just buy a domain' ),
Copy link

Choose a reason for hiding this comment

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

Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Buy Domain' ) ES Score: 6

Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).

@aidvu aidvu 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 May 5, 2017
@aidvu aidvu requested review from umurkontaci, gwwar and klimeryk May 5, 2017 19:58
Copy link
Contributor

@klimeryk klimeryk left a comment

Choose a reason for hiding this comment

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

Overal, the approach seems good - I'll test more tomorrow.

@@ -13,7 +13,7 @@ export default () => (
<use xlinkHref="#path-1"></use>
</mask>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch!

export default connect(
( state ) => {
return {
sites: getSites( state )
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused here - what's the purpose of this sites vs the global ones on line 18? It seems like you're only using the global ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought I might use this one, forgot to remove it. Not there yet. :)

<SiteSelector
filter={
function( site ) {
return ! site.jetpack;
Copy link
Contributor

Choose a reason for hiding this comment

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

A possible additional criteria - being an admin on the site :) Otherwise, they user won't be able to manage the domain, right?

@klimeryk
Copy link
Contributor

klimeryk commented May 8, 2017

It seems with this patch, the plans page is in the loading state indefinitely (the /plans endpoint finished returning, but the UI did not update for some reason):
screen shot 2017-05-08 at 12 02 38

Small desing nitpick - I think these boxes should have the same height (ha! I remember you had the same nitpick on one of my PRs - revennnnnge! 😈)
screen shot 2017-05-08 at 12 03 46
Actually, it seems like at least one of the containers has the same height, since when you hover one of them, the border is the same height for all of them (but the white part is not):
ngwxtsifhj

While testing, I've realized that this flow could introduce some confusion for existing users - when they start at /domains, they are given a price per one domain (without plan), but if they then proceed to add the domain to an existing site, a lot of things could change:

  • Probably most common scenario: they are on Free plan and will have to upgrade to a paid plan - something we don't mention at all on /domains and could cause confusion and/or anger.
  • They have free domain credit unused from their existing plan - great, they don't owe us anything, but it's a shame they learn that at the very last step of the flow.

Honestly, I'm not sure if/how this could be improved given the flow right now (which is non-site centric). Just noting it here in case someone has any ideas or if we should at least prepare the HEs for those type of questions.

Edit: I've just noticed the Free domain included with all plans. bit:
screen shot 2017-05-08 at 12 25 54
But it doesn't stand out at all (the highlight is my doing ;)) and could be easily missed.

@klimeryk
Copy link
Contributor

klimeryk commented May 8, 2017

As discussed on Slack, I can't reproduce the first issue (infinitely loading plans page) anymore, so unless someone else can reproduce it, I'd treat it as a one-off issue on my end.

import defer from 'lodash/defer';
import isEmpty from 'lodash/isEmpty';
import pick from 'lodash/pick';
import { assign, defer, isEmpty, isNull, omitBy, pick, startsWith } from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

At this number of imports, it might be better to put them on new line each.

@aidvu aidvu force-pushed the update/add-existing-site-domain-only branch from 931c6cd to df8bc6e Compare May 8, 2017 17:31
stepName: 'site-picker',
props: {
headerText: i18n.translate( 'Choose your site?' ),
},
Copy link

Choose a reason for hiding this comment

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

Hi! I've found a possible matching string that has already been translated 18 times:
translate( 'Choose a site' ) ES Score: 7

Help me improve these suggestions: react with 👎 if the suggestion doesn't make any sense, or with 👍 if it's a particularly good one (even if not implemented).

@gwwar
Copy link
Contributor

gwwar commented May 8, 2017

Can we not use siteSelection in my-sites/controller.js? I think we'll want to pass around the slug in the route for the next steps. When I tested this I hit site selection again after choosing a domain and site.

screen shot 2017-05-08 at 11 53 43 am

@aidvu aidvu added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 8, 2017
@aidvu
Copy link
Contributor Author

aidvu commented May 8, 2017

@gwwar still not for review. Forgot to remove the label.

@klimeryk
Copy link
Contributor

@aidvu, I can't seem to finish (or get to) checkout with the newest change - I get redirected to something like checkout/undefined, then to /plans/, as if the selected site was not persisted.
This happens for a DWPO user and it doesn't seem to matter if I select a site on the Free plan or a paid one.
Just go through the NUX flow, trying to add the domain to an existing site.

@aidvu aidvu force-pushed the update/add-existing-site-domain-only branch from bbd6325 to 0e716f6 Compare May 25, 2017 20:11
Copy link
Contributor

@klimeryk klimeryk left a comment

Choose a reason for hiding this comment

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

Tested again - now all works fine 👍 Thank you for your perseverance with this PR! 😅 NOW MERGE IT WHILE IT'S WORKING! 😀

@aidvu aidvu force-pushed the update/add-existing-site-domain-only branch from db8369e to dcf7c4b Compare May 26, 2017 13:05
@aidvu aidvu merged commit 5da1ab2 into master May 26, 2017
@klimeryk klimeryk deleted the update/add-existing-site-domain-only branch May 27, 2017 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. NUX [Size] XL Probably needs to be broken down into multiple smaller issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants