-
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
Domains: Add professional email upsell route #54941
Domains: Add professional email upsell route #54941
Conversation
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 looking really good, @sangeeth96! The description and testing instructions covered pretty much everything. The only thing that may be worth adding is making it clear that the upsell content will be coming in another PR.
Other than that, I have a few small comments that you can take on. I am hoping we can get this shipped tomorrow!
const translate = useTranslate(); | ||
|
||
const handleGoBack = () => { | ||
page( `/domains/add/${ selectedSiteSlug }` ); |
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 think it would be better to use domainAddNew( selectedSiteSlug)
from calypso/my-sites/domains/paths.js
.
}; | ||
|
||
return ( | ||
<Fragment> |
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.
Nit: The Letero team has been trying to use <>
instead of Fragment
or React.Fragment
.
Not blocking, but a minor thing.
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.
@daledupreez I used that first, but then thought you peeps prefer to be explicit about it and changed it back anyway. 😅 But will do this. ✌️
{ translate( 'Register %(domain)s', { args: { domain } } ) } | ||
</HeaderCake> | ||
|
||
<PromoCard |
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.
As a question, is the goal to improve/expand this content in a follow-up PR?
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.
@daledupreez Yes, that is indeed the goal. I've updated the PR description as you requested.
@@ -21,6 +21,7 @@ import { | |||
import { getCurrentUser } from 'calypso/state/current-user/selectors'; | |||
import DomainSearch from './domain-search'; | |||
import SiteRedirect from './domain-search/site-redirect'; | |||
import EmailProvidersUpsell from './email-providers-upsell'; |
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.
Nit: I know this import list isn't in order, but I'd prefer that the new import not make it less ordered! Could you move this new import one line up so it's below import DomainSearch
?
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.
On it. Is there an eslint config or some other editor automation folks use to automate this or is this a manual work at the moment? 🤔
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.
Oh nvm, I see that work is being done on this. ❤️
@@ -212,6 +213,25 @@ const googleAppsWithRegistration = ( context, next ) => { | |||
next(); | |||
}; | |||
|
|||
const emailWithRegistration = ( context, next ) => { |
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.
For full specificity and clarity, it may be better to call this emailUpsellForDomainRegistration
.
|
||
<PromoCard | ||
isPrimary | ||
title={ translate( 'Add a professional email address to %(domainName)s', translateArgs ) } |
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.
Given that we're only using translateArgs
once, it may be simpler to inline the details.
@daledupreez Addressed the comments. Let me know if there's more. |
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 should have gotten to this earlier today! 😐
There are still two more fixes/tweaks I'd like you to add before we merge and deploy. (I was going to try and handle them myself, but I don't have permissions to push them to the talk-to
repo.)
/> | ||
<DocumentHead | ||
title={ translate( 'Register %(domain)s', { | ||
args: { domain: context.params.registerDomain }, |
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.
Small bug: this should be context.params.domain
- registerDomain
is not defined in the main URL path as a variable.
args: { domain: context.params.registerDomain }, | |
args: { domain: context.params.domain }, |
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.
Whoops, gonna fix that.
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.
Done.
* Style dependencies | ||
*/ | ||
import emailIllustration from 'calypso/assets/images/email-providers/email-illustration.svg'; | ||
import { domainAddNew } from '../paths'; |
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 should be under Internal dependencies and should be relative to the repo rather than the current file. (I''ll add a comment RE where to add.)
import { domainAddNew } from '../paths'; |
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.
Made the change to use the repo alias.
I genuinely thought PRs were editable by upstream maintainers but turns out org forks can't allow this (isaacs/github#1681). I'll see if I can add you to the repo's collaborators list. |
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.
LGTM! I'll get this deployed first thing tomorrow.
Congrats on your first Calypso PR! 🎉
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/6303536 Thank you @sangeeth96 for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
This PR is the first step to proposed changes in domain purchase flow. It adds a new route for the professional email upsell page at:
The content for this page will be added in an upcoming PR based on this one.
Side note: I referred to @daledupreez's previous approach at #50152 and @stephanethomas's work on #53712 to come up with this.
Testing instructions
Run git checkout
add/titan-email-upsell-route
and start your serverLog into a WordPress.com account that has a site
Open the Domains page (replace
yoursite
with a site slug that you have):http://calypso.localhost:3000/domains/manage/yoursite.wordpress.com
Click Add Domain button > to this site from the popover
Search for a domain or choose one of the suggestions by clicking Select button
Once the page loads, replace
google-workspace
in the domain withemail
. For example:If the URL shown is:
replace it with:
Verify that the new route loads and renders without errors
Screenshots