-
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: Initial code to create new comparison component #59402
Emails: Initial code to create new comparison component #59402
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-23363 |
const ProfessionalEmailComparisonObject: ProviderComparison = { | ||
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts.'), | ||
storage: translate( '30 GB storage.' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 5 times:
translate( '30 GB of Storage' )
ES Score: 12
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts.'), | ||
storage: translate( '30 GB storage.' ), | ||
importing: translate( 'One-click import of existing email and contacts.'), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 20 times:
translate( 'One-click import of existing emails and contacts' )
ES Score: 9
tools: translate( 'Integrated email management, Inbox, calendar and contacts.'), | ||
storage: translate( '30 GB storage.' ), | ||
importing: translate( 'One-click import of existing email and contacts.'), | ||
support: translate( '24/7 support via email.') |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 18 times:
translate( '24/7 support via email' )
ES Score: 8
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~31 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~322 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. |
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts.' ), | ||
storage: translate( '30 GB storage.' ), | ||
importing: translate( 'One-click import of existing email and contacts.' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 20 times:
translate( 'One-click import of existing emails and contacts' )
ES Score: 9
tools: translate( 'Integrated email management, Inbox, calendar and contacts.' ), | ||
storage: translate( '30 GB storage.' ), | ||
importing: translate( 'One-click import of existing email and contacts.' ), | ||
support: translate( '24/7 support via email.' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 18 times:
translate( '24/7 support via email' )
ES Score: 8
const ProfessionalEmailComparisonObject: ProviderComparison = { | ||
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ), | ||
storage: translate( '30 GB storage' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 5 times:
translate( '30 GB of Storage' )
ES Score: 12
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ), | ||
storage: translate( '30 GB storage' ), | ||
importing: translate( 'One-click import of existing email and contacts' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 20 times:
translate( 'One-click import of existing emails and contacts' )
ES Score: 9
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.
There are a couple of suggestions here. While your illustration alludes to it, the instructions are not super clear that one actually has to click on the see how they compare
button.
comparisonObject: ProviderComparison[]; | ||
}; | ||
|
||
export const InDepthComparison: FunctionComponent< InDepthComparison > = () => { |
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 feel like we can take the opportunity to name this component better, so it is easier to read. Using the same variable name as the type can be confusing at a glance.
client/my-sites/email/email-providers-stacked-comparison/in-depth-comparison/index.tsx
Outdated
Show resolved
Hide resolved
const ProfessionalEmailComparisonObject: ProviderComparison = { | ||
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ), | ||
storage: translate( '30 GB storage' ), |
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 have used 30GB storage
in the past. Is this a deliberate change?
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.
No, I just followed mock ups, I will reuse 30GB storage
then.
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ), | ||
storage: translate( '30 GB storage' ), | ||
importing: translate( 'One-click import of existing email and contacts' ), |
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.
Did you mean to use emails
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.
👍
/> | ||
{ inDepthComparison && ( | ||
<InDepthComparison | ||
comparisonObject={ [ |
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 plural if it's a list of things/objects i.e. comparisonObjects
|
||
const ProfessionalEmailComparisonObject: ProviderComparison = { | ||
header: <h1> Professional Email </h1>, | ||
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ), |
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.
Would it be better to see these texts as a list of features and pass an array instead? It might be easier to wrangle and display then.
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 this way is safer in the sense of providing what we need to provide for each case, the component will just read that object and place everything in place and in the right order.
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.
Let's leave it like this and see if it fits good with what I've designed in the next PR 🙂
<Button | ||
borderless | ||
className="email-providers-stacked-comparison__how-they-compare-link" | ||
onClick={ () => setInDepthComparison( ! inDepthComparison ) } |
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.
Please let's redirect the user to a new page. The Email Comparison
page and the In Depth Comparison
page should have their own url, and should be responsible for loading any data they require. Let's have a clear separation of responsibilities (such as stylesheets).
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'll do it for the next PR if that's fine?
const GoogleWorkspaceComparisonObject: ProviderComparison = { | ||
header: <h1> Google </h1>, | ||
tools: translate( 'Gmail, Calendar, Meet, Chat, Drive, Docs, Sheets, Sliders and more' ), | ||
storage: translate( '30 GB storage' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 5 times:
translate( '30 GB of Storage' )
ES Score: 12
onClick={ () => page( emailManagementInDepthComparison( siteName, selectedDomainName ) ) } | ||
> | ||
{ translate( 'See how they compare.' ) } | ||
</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.
On the mockup this is just a link, why do we need this <Button>
component? As far as I know, we can achieve the same thing with an HTML anchor, and without additional CSS styles.
client/my-sites/email/email-providers-stacked-comparison/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/index.tsx
Outdated
Show resolved
Hide resolved
storage: TranslateResult; | ||
importing: TranslateResult; | ||
support: TranslateResult; | ||
footerBadge?: ReactElement; |
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 don't define that particular prop in the other component, let's remove it for now.
client/my-sites/email/email-providers-in-depth-comparison/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/in-depth-comparison/index.tsx
Outdated
Show resolved
Hide resolved
…ison-page # Conflicts: # client/my-sites/email/email-providers-stacked-comparison/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.
I've tested it, and it works. I had a few comments about naming but nothing serious so feel free to merge this pull request once they have been addressed.
client/my-sites/email/email-providers-in-depth-comparison/comparison-table/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/data.ts
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/comparison-table/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/comparison-table/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/comparison-table/index.tsx
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-in-depth-comparison/data.ts
Outdated
Show resolved
Hide resolved
client/my-sites/email/email-providers-stacked-comparison/style.scss
Outdated
Show resolved
Hide resolved
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7056303 Thank you @AllTerrainDeveloper 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
Initial code for a new comparison component in Emails Comparison page.
Testing instructions
?flags=emails/new-email-comparison
Related to {1200182182542585-as-1201334995813848}