Skip to content
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

Merged

Conversation

AllTerrainDeveloper
Copy link
Contributor

@AllTerrainDeveloper AllTerrainDeveloper commented Dec 20, 2021

Changes proposed in this Pull Request

Initial code for a new comparison component in Emails Comparison page.

Testing instructions

  1. Go to a site with domains without email subscription
  2. Click on 'Add email' for the desired site
  3. Once you are in the comparison page, add at the end the following flag: ?flags=emails/new-email-comparison
  4. Click then in the "see how they compare" in the top of the screen

image

Related to {1200182182542585-as-1201334995813848}

@AllTerrainDeveloper AllTerrainDeveloper self-assigned this Dec 20, 2021
@github-actions
Copy link

github-actions bot commented Dec 20, 2021

const ProfessionalEmailComparisonObject: ProviderComparison = {
header: <h1> Professional Email </h1>,
tools: translate( 'Integrated email management, Inbox, calendar and contacts.'),
storage: translate( '30 GB storage.' ),
Copy link

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.'),
Copy link

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.')
Copy link

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

@matticbot
Copy link
Contributor

matticbot commented Dec 20, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~31 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-main                   +76 B  (+0.0%)      +15 B  (+0.0%)
entry-domains-landing        +76 B  (+0.0%)      +16 B  (+0.0%)

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])

name   parsed_size           gzip_size
email      +1223 B  (+0.2%)     +322 B  (+0.2%)

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

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.' ),
Copy link

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.' ),
Copy link

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' ),
Copy link

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' ),
Copy link

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

Copy link
Contributor

@olaseni olaseni left a 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 > = () => {
Copy link
Contributor

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.

const ProfessionalEmailComparisonObject: ProviderComparison = {
header: <h1> Professional Email </h1>,
tools: translate( 'Integrated email management, Inbox, calendar and contacts' ),
storage: translate( '30 GB storage' ),
Copy link
Contributor

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?

Copy link
Contributor Author

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' ),
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

/>
{ inDepthComparison && (
<InDepthComparison
comparisonObject={ [
Copy link
Contributor

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' ),
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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 ) }
Copy link
Contributor

@stephanethomas stephanethomas Dec 22, 2021

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).

Copy link
Contributor Author

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' ),
Copy link

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

@AllTerrainDeveloper AllTerrainDeveloper marked this pull request as ready for review December 22, 2021 10:28
@AllTerrainDeveloper AllTerrainDeveloper requested a review from a team as a code owner December 22, 2021 10:28
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 22, 2021
@AllTerrainDeveloper AllTerrainDeveloper changed the title Emails: Initial code/draft to create new comparison component Emails: Initial codeto create new comparison component Dec 22, 2021
client/my-sites/email/controller.js Outdated Show resolved Hide resolved
client/my-sites/email/controller.js Outdated Show resolved Hide resolved
onClick={ () => page( emailManagementInDepthComparison( siteName, selectedDomainName ) ) }
>
{ translate( 'See how they compare.' ) }
</Button>
Copy link
Contributor

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/paths.js Outdated Show resolved Hide resolved
storage: TranslateResult;
importing: TranslateResult;
support: TranslateResult;
footerBadge?: ReactElement;
Copy link
Contributor

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.

…ison-page

# Conflicts:
#	client/my-sites/email/email-providers-stacked-comparison/style.scss
Copy link
Contributor

@stephanethomas stephanethomas left a 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.

@AllTerrainDeveloper AllTerrainDeveloper changed the title Emails: Initial codeto create new comparison component Emails: Initial code to create new comparison component Dec 23, 2021
@AllTerrainDeveloper AllTerrainDeveloper merged commit 511b132 into trunk Dec 23, 2021
@AllTerrainDeveloper AllTerrainDeveloper deleted the add/in-depth-comparison-in-new-email-comparison-page branch December 23, 2021 14:20
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 23, 2021
@a8ci18n
Copy link

a8ci18n commented Dec 23, 2021

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.

@a8ci18n
Copy link

a8ci18n commented Jan 14, 2022

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants