-
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
Congrats: Update design for ecommerce plan #79525
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
client/my-sites/checkout/checkout-thank-you/standard-checkout-thank-you.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Card, ConfettiAnimation } from '@automattic/components'; | ||
import classNames from 'classnames'; | ||
import { translate } from 'i18n-calypso'; | ||
import QuerySitePurchases from 'calypso/components/data/query-site-purchases'; | ||
import HappinessSupport from 'calypso/components/happiness-support'; | ||
import Main from 'calypso/components/main'; | ||
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker'; | ||
import isRedesignV2 from './redesign-v2/is-redesign-v2'; | ||
import MasterbarStyled from './redesign-v2/masterbar-styled'; | ||
import { CheckoutThankYouCombinedProps } from '.'; | ||
|
||
type AnalyticsProperties = { | ||
delay?: number; | ||
path: string; | ||
recorder?: () => void; | ||
hasSelectedSiteLoaded?: boolean; | ||
selectedSiteId?: number; | ||
properties?: Record< string, unknown >; | ||
options?: Record< string, unknown >; | ||
}; | ||
|
||
type StandardCheckoutThankYouProps = { | ||
productRelatedMessages: () => JSX.Element; | ||
isDataLoaded: () => boolean; | ||
getAnalyticsProperties: () => AnalyticsProperties; | ||
showHappinessSupport: boolean; | ||
wasJetpackPlanPurchased: boolean; | ||
} & CheckoutThankYouCombinedProps; | ||
|
||
const StandardCheckoutThankYou = ( { | ||
productRelatedMessages, | ||
isDataLoaded, | ||
getAnalyticsProperties, | ||
showHappinessSupport, | ||
wasJetpackPlanPurchased, | ||
...props | ||
}: StandardCheckoutThankYouProps ) => { | ||
return ( | ||
<Main | ||
className={ classNames( 'checkout-thank-you', { | ||
'is-redesign-v2': isRedesignV2( props ), | ||
} ) } | ||
> | ||
<PageViewTracker { ...getAnalyticsProperties() } title="Checkout Thank You" /> | ||
{ isDataLoaded() && isRedesignV2( props ) && <ConfettiAnimation delay={ 1000 } /> } | ||
{ isRedesignV2( props ) && props.selectedSite?.ID && ( | ||
<> | ||
<QuerySitePurchases siteId={ props.selectedSite.ID } /> | ||
<MasterbarStyled | ||
onClick={ () => page( `/home/${ props.selectedSiteSlug ?? '' }` ) } | ||
backText={ translate( 'Back to dashboard' ) } | ||
canGoBack={ true } | ||
showContact={ true } | ||
/> | ||
</> | ||
) } | ||
<Card className="checkout-thank-you__content">{ productRelatedMessages() }</Card> | ||
{ showHappinessSupport && ( | ||
<Card className="checkout-thank-you__footer"> | ||
<HappinessSupport | ||
isJetpack={ wasJetpackPlanPurchased } | ||
contactButtonEventName="calypso_plans_autoconfig_chat_initiated" | ||
/> | ||
</Card> | ||
) } | ||
</Main> | ||
); | ||
}; | ||
|
||
export default StandardCheckoutThankYou; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 doesn't look safe to me,
AtomicStoreThankYouCard
is doing email verification and sets the CTA url tositeWooCommerceWizardUrl
, can we wrapStandardCheckoutThankYou
insideAtomicStoreThankYouCard
and keep the same behavior?We're also losing the "Create your store!" CTA text. "Lets work on the site" doesn't sound right for the ecommerce plan.
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 PR also sets the CTA to the same URL as
siteWooCommerceWizardUrl
.As for email verification, I tested, and with the current flow, the user will get redirected to another email verification page when clicking on the CTA
siteWooCommerceWizardUrl
Once they verify their email and click on connect jetpack, they will go to the store setup page
Summarizing the flow for unverified emails:
How this PR currently changes the flow:
The current production flow:
Any ideas on how we could incorporate the old flow into the new design
cc: @JanaMW27
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.
How did we add the Jetpack connection step?
I'd need to dig in to really judge this but I think the new design needs to support the old design's functionality other wise the only option is to revert to the "new" thank you component approach and let them control the flow and we just control the basic design outline.
I guess you could change something higher up to but I don't know how that would work.
What are you thinking?
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, also this option looked ok if I'm remembering it correctly:
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 add anything in particular. It was... just there 😅 when I tested the flow with the PR.
Maybe it would be helpful if we have more people to test the flow within this PR to confirm.
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 was only taking account of how things "look" right now. For example, I'm not sure where would be the sweet spot to add the resend email button or add the copy. Asked for more input here: p9Jlb4-7Hx-p2#comment-8670
I agree that code-wise it's not going to be too far from:
Even if we create a new component, it's going to copy that behavior.