-
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: Create flow to buy a domain for Gravatar #90414
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 (~180 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~2376 bytes removed 📉 [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 (~1208 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. |
984c4bf
to
bd3db90
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 |
|
||
export function getDomainSuggestionsVendor( | ||
options: DomainSuggestionsVendorOptions = {} | ||
): DomainSuggestionsVendor { | ||
if ( isDomainForGravatarFlow( options.flowName ) ) { | ||
return 'gravatar'; |
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.
You can change this for variation2_front
while the problem with .link
domains in the test environment is not fixed
@@ -397,6 +397,16 @@ export function generateFlows( { | |||
showRecaptcha: true, | |||
hideProgressIndicator: true, | |||
}, | |||
{ | |||
name: 'domain-for-gravatar', | |||
steps: [ 'domain-only', 'site-or-domain', 'site-picker' ], |
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 the site-or-domain
and site-picker
steps should be removed from this flow, since they're always skipped by default. I wasn't able to remove them because I wasn't sure how to create the domain-only site and how to provide the siteId
and siteSlug
flow dependencies without them 🤔
client/signup/config/flows-pure.js
Outdated
{ | ||
name: 'domain-for-gravatar', | ||
steps: [ 'domain-only', 'site-or-domain', 'site-picker' ], | ||
destination: getDomainSignupFlowDestination, // TODO: Redirect to Gravatar |
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.
We might want to either create a new thank you page for the Gravatar flow or somehow redirect to the Gravatar profile page when checkout completes, not sure how to do 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.
I didn't test the UI yet, Just left some suggestions.
I also think we need to disable multi domain select. I believe we said we would only allow selecting one domain for this step. This should also remove a few complications, I think.
<div className={ className }> | ||
<div className="domain-product-price__free-text"> | ||
<span className="domain-product-price__free-price"> | ||
{ translate( 'Free domain for one year' ) } |
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.
What do you think about using Free for first year
? That was the text used on Gravatar's side as well, if I remember correctly.
It also matches the method 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.
I agree 👍 I had used Free domain for one year
because it was being used for some other flow, but I like your suggestion better. I'll use Free for the first year
since it's the same as the text we use when there are plans ("Free for the first year with annual paid plans")
domain: suggestion.domain_name, | ||
productSlug: suggestion.product_slug, | ||
extra: { | ||
domain_for_gravatar: true, |
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.
what do you think about is_gravatar_domain
? to follow the is_*
for booleans.
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.
Yep, that makes sense 👍
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 tested the flow and works greats! I also agree with @ramynasr's suggestions.
About the 2 skipped step, I think your solution it's the best one. Otherwise we have to create a new step cloning domain-only
one, and it's not ideal.
Thanks @ramynasr and @gius80 for the review!
@ramynasr multi-domain selection is disabled for this flow, the flows where it's enabled are |
f2a64b4
to
75be13b
Compare
0eac081
to
a29c21b
Compare
This fixes an issue where the Gravatar flow introduced in PR #90414 showed discounted prices even when the discount was not applied.
Proposed Changes
This PR creates a new
domain-for-gravatar
onboarding flow that will be used for the Domains on Gravatar project (pcYYhz-24z-p2). This flow lets users select one.link
domain (domain search is restricted to.link
domains by thegravatar
vendor string) and buy it. The 100% discount coupon will abe applied in the backend.Note: There's some problem when buying
.link
domains in the test environment, so this screen recording uses other TLDs than.link
.Screen.Recording.2024-05-15.at.19.53.16.mov
Testing Instructions
USE_STORE_SANDBOX
in your backend to prevent buying domains in production/start/domain-for-gravatar?search=yes&new=your-test-domain.com
(you can changeyour-test-domain.com
by any domain you want)your-test-domain.com
(or the domain you typed in thenew
parameter) is the default search query and was searched forPre-merge Checklist