-
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
Emails: Show discount star in the Google Workspace section in the Email Comparison page #59189
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-22361 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~66 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. 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. |
09e421a
to
81c473a
Compare
…il Comparison page
81c473a
to
9e07df8
Compare
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.
Looks good to me, I've noted some unimportant things :)
@@ -42,16 +43,29 @@ function EmailProviderCard( { | |||
|
|||
const labelForExpandButton = expandButtonLabel ? expandButtonLabel : buttonLabel; | |||
|
|||
const showStar = detailsExpanded && starLabel; |
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 see sometimes we use "should" prefix in this kind of constants. What's the general rule for this?
const showStar = detailsExpanded && starLabel; | |
const shouldShowStar = detailsExpanded && starLabel; |
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 don't think there is a rule for that, at least I'm not aware of any one. I'm not a big fan of this notation for booleans though, as it is longer and doesn't really clarify anything in my opinion. I'll mention that discussion in our Slack channel to see what others think of that.
'is-expanded': detailsExpanded, | ||
'is-forwarding': providerKey === 'forwarding', | ||
} ) } | ||
image={ logo } | ||
title={ title } | ||
badge={ badge } | ||
> | ||
{ showStar && ( |
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.
Same nit as above
{ showStar && ( | |
{ shouldShowStar && ( |
return ( | ||
<PromoCard | ||
className={ classnames( 'email-providers-comparison__provider-card', { | ||
'has-star': showStar, |
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.
Same nit as above
'has-star': showStar, | |
'has-star': shouldShowStar, |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7041286 Thank you @stephanethomas for including a screenshot in the description! This is really helpful for our translators. |
Sharing some notes regarding these,
Sharing what this page should look like in the interim: Link to Figma: https://www.figma.com/file/oIzh3T78bXjCC8GIeNLhH5/1.Onboarding---Email-Comparison-Page-i1?node-id=801%3A11309 cc'ing @poligilad-auto as she will be taking over emails experience along with domains starting from 2022. |
Translation for this Pull Request has now been finished. |
This pull request updates the
Email Comparison
page to show a star with a discount in the Google Workspace section when Google Workspace is on sale:Testing instructions
git checkout add/google-workspace-star
and start your server, or access a live branchEmails
pageAdd Email
button to access theEmail Comparison
page