-
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: Tweaks to the 100-year domain transfer flow #98849
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
@@ -22,6 +22,7 @@ import HundredYearPlanLogo from './hundred-year-plan-logo'; | |||
import InfoModal from './info-modal'; | |||
|
|||
import './style.scss'; | |||
|
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.
Just adding back the whitespace wrongly removed in the parent PR.
export function isTransferredInDomain( domain: ResponseDomain ) { | ||
return domain.type === domainTypes.TRANSFER; | ||
} |
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.
Type guards could also be added here to improve type assertion. However, since this won't be used for now, it's better to filter the list and return the result for simplicity's sake.
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~449 bytes added 📈 [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 (~27 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. |
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 |
{ ! isHundredYearTransfer && ( | ||
<Button className="bulk-domain-transfer__add-domain" icon={ plus } onClick={ addDomain }> | ||
{ __( 'Add more' ) } | ||
</Button> | ||
) } |
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.
Skipping the Add more
button entirely since no more than one product is allowed for 100-year product purchases, as per validation in the backend, wouldn't make sense to have the button here. Plus, adding two domain transfers or more would leave only the last one in the cart.
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 tested the 100-year domain transfer flow and all the points I had mentioned in the previous PR were fixed, thanks! I also tested the other 100-year flows (plan and domain only) and the regular bulk transfer flow and they're all working correctly. Left some small comments in the code but for the sake of agility, I'm approving this now 👍
client/my-sites/checkout/checkout-thank-you/hundred-year-thank-you/index.tsx
Show resolved
Hide resolved
action: | ||
productSlug === domainProductSlugs.DOTCOM_DOMAIN_REGISTRATION | ||
? translate( 'registered' ) | ||
: translate( 'transferred' ), |
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 know just changing the word here is simpler, but I think it might be confusing to say that "he domain has been transferred" 🤔 maybe something like "Your 100-Year Domain is being transferred"?
Also, I think the best i18n practice (PCYsg-3hI-p2) here would be to have two entirely separate strings, one for domain registration and one for domain transfers, even if they're almost the same. Maybe we can separate the "Our Premier Support team will be in touch by email shortly to schedule a welcome session and walk you through your exclusive benefits. We’re looking forward to supporting you every step of the way.'" part since that will be the same for both.
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're absolutely correct. I'll fix this one before deploying.
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.
@leonardost what do you think of 5c6a0c6? I've seen some occurrences of `${str1} ${str2}`
to interpolate both translations, and I think the good practices are being applied here.
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 that works! Left just a minor suggestion there
client/my-sites/checkout/checkout-thank-you/hundred-year-thank-you/index.tsx
Show resolved
Hide resolved
const isPageLoading = | ||
isReceiptLoading || | ||
isLoadingDomains || | ||
( productSlug !== PLAN_100_YEARS && ! isDomainDataLoaded ); |
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 only want to check if the domain data is being loaded in case we're not within the 100-year plan flow.
The other flows (100-year domain, 100-year transfer) need the queried data to load CTAs and other component labels/descriptions, but the 100-year plan one doesn't - that's why the productSlug !== PLAN_100_YEARS && ! isDomainDataLoaded
check is performed here.
styles={ css` | ||
main.checkout-thank-you { | ||
&.is-redesign-v2 { | ||
&.main { | ||
max-width: unset; | ||
} | ||
} | ||
} | ||
|
||
body.is-section-checkout, | ||
body.is-section-checkout .layout__content, | ||
body.is-section-checkout-thank-you, | ||
body.is-section-checkout-thank-you .layout__content { | ||
background: linear-gradient( 233deg, #06101c 2.17%, #050c16 41.26%, #02080f 88.44% ); | ||
} | ||
` } |
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.
Inline style was used to ensure these styles would be loaded regardless of imports/dynamic styles being applied into the component - probably not 100% needed, but added just for good measure.
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.
Tested again and still LGTM, thanks for all the explanations and updates! 🚀
client/my-sites/checkout/checkout-thank-you/hundred-year-thank-you/index.tsx
Show resolved
Hide resolved
client/my-sites/checkout/checkout-thank-you/hundred-year-thank-you/index.tsx
Outdated
Show resolved
Hide resolved
action: | ||
productSlug === domainProductSlugs.DOTCOM_DOMAIN_REGISTRATION | ||
? translate( 'registered' ) | ||
: translate( 'transferred' ), |
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 that works! Left just a minor suggestion there
I'll rebase this one on |
Co-authored-by: leonardost <[email protected]>
358f7fb
to
1af8da5
Compare
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17215428 Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Hi @rafaelgallani, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:
Thank you in advance! |
Related to #95634 - follow up.
Proposed Changes
Adds the specific "Thank-you" page for the 100-year domain transfer flow and some more changes/tweaks: UI-related changes, checkout, etc.
Please notice that adding the domain transfer along with the 100-year plan is still unsupported - this will be handled in the future, not in this PR.
Comments from the previous PR handled here
Why are these changes being made?
Follow up to #95634 so the review gets easier - plus the specific thank you page was accounted for in the original design file.
Testing Instructions
Follow all the same steps from the previous PR, but this time make sure all the comments addressed are fixed - also try completing the checkout and ensure the "thank-you" page looks good now.
Also ensure other 100-year related flows are left unchanged.
Pre-merge Checklist