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

Initial work towards new email home page #50790

Closed
wants to merge 13 commits into from

Conversation

daledupreez
Copy link
Contributor

@daledupreez daledupreez commented Mar 5, 2021

Changes proposed in this Pull Request

  • This is a WIP to match some design work happening at the moment.

Testing instructions

  • TBD

To enable the new UI, visit /email/[your.site]?flags=email/centralized-home

@daledupreez daledupreez added the Professional Email Issues with Professional Email powered by Titan label Mar 5, 2021
@daledupreez daledupreez self-assigned this Mar 5, 2021
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Mar 5, 2021

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

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

name                   parsed_size           gzip_size
entry-main                  +139 B  (+0.0%)       +5 B  (+0.0%)
entry-login                 +139 B  (+0.0%)      +13 B  (+0.0%)
entry-gutenboarding         +139 B  (+0.0%)      +13 B  (+0.0%)
entry-domains-landing       +139 B  (+0.0%)      +13 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~11415 bytes added 📈 [gzipped])

name                      parsed_size           gzip_size
email                        +25561 B  (+7.0%)    +5819 B  (+5.7%)
domains                        +535 B  (+0.0%)     +279 B  (+0.1%)
zoninator                       +70 B  (+0.0%)      +18 B  (+0.0%)
wp-super-cache                  +70 B  (+0.0%)      +18 B  (+0.0%)
woocommerce-installation        +70 B  (+0.0%)      +18 B  (+0.0%)
woocommerce                     +70 B  (+0.0%)      +18 B  (+0.0%)
themes                          +70 B  (+0.0%)      +18 B  (+0.0%)
theme                           +70 B  (+0.0%)      +18 B  (+0.0%)
stats                           +70 B  (+0.0%)      +18 B  (+0.0%)
sites                           +70 B  (+0.1%)      +18 B  (+0.0%)
site-purchases                  +70 B  (+0.0%)      +32 B  (+0.0%)
settings-writing                +70 B  (+0.0%)      +18 B  (+0.0%)
settings-security               +70 B  (+0.0%)      +18 B  (+0.0%)
settings-performance            +70 B  (+0.0%)      +18 B  (+0.0%)
settings-jetpack                +70 B  (+0.0%)      +18 B  (+0.0%)
settings-discussion             +70 B  (+0.0%)      +18 B  (+0.0%)
settings                        +70 B  (+0.0%)      +18 B  (+0.0%)
sensei                          +70 B  (+0.1%)      +18 B  (+0.0%)
scan                            +70 B  (+0.0%)      +18 B  (+0.0%)
purchases                       +70 B  (+0.0%)      +32 B  (+0.0%)
preview                         +70 B  (+0.0%)      +18 B  (+0.0%)
posts-custom                    +70 B  (+0.0%)      +18 B  (+0.0%)
posts                           +70 B  (+0.0%)      +18 B  (+0.0%)
plugins                         +70 B  (+0.0%)      +18 B  (+0.0%)
plans                           +70 B  (+0.0%)     -156 B  (-0.1%)
people                          +70 B  (+0.0%)      +49 B  (+0.0%)
pages                           +70 B  (+0.0%)      +18 B  (+0.0%)
migrate                         +70 B  (+0.0%)      +18 B  (+0.0%)
media                           +70 B  (+0.0%)      +18 B  (+0.0%)
marketing                       +70 B  (+0.0%)      +18 B  (+0.0%)
jetpack-search                  +70 B  (+0.0%)      +18 B  (+0.0%)
jetpack-connect                 +70 B  (+0.0%)      -28 B  (-0.0%)
jetpack-cloud-settings          +70 B  (+0.0%)      +18 B  (+0.0%)
jetpack-cloud-pricing           +70 B  (+0.0%)      -37 B  (-0.0%)
jetpack-cloud                   +70 B  (+0.1%)      +18 B  (+0.0%)
import                          +70 B  (+0.0%)      +18 B  (+0.0%)
hosting                         +70 B  (+0.0%)      +18 B  (+0.0%)
home                            +70 B  (+0.0%)      +18 B  (+0.0%)
hello-dolly                     +70 B  (+0.1%)      +18 B  (+0.0%)
google-my-business              +70 B  (+0.0%)      +18 B  (+0.0%)
export                          +70 B  (+0.0%)      +18 B  (+0.0%)
earn                            +70 B  (+0.0%)      +18 B  (+0.0%)
customize                       +70 B  (+0.0%)      +18 B  (+0.0%)
concierge                       +70 B  (+0.0%)      +18 B  (+0.0%)
comments                        +70 B  (+0.0%)      +18 B  (+0.0%)
backup                          +70 B  (+0.0%)      +18 B  (+0.0%)
activity                        +70 B  (+0.0%)      +18 B  (+0.0%)
gutenberg-editor                -38 B  (-0.0%)      -24 B  (-0.0%)
checkout                        -33 B  (-0.0%)     +138 B  (+0.0%)

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 (~196 bytes removed 📉 [gzipped])

name                                             parsed_size           gzip_size
async-load-calypso-blocks-editor-checkout-modal       -183 B  (-0.0%)     -159 B  (-0.1%)
async-load-design-playground                          -103 B  (-0.0%)      -37 B  (-0.0%)
async-load-design-blocks                              -103 B  (-0.0%)      -37 B  (-0.0%)
async-load-design                                     -103 B  (-0.0%)      -37 B  (-0.0%)

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

<img
className="email-management-list-item__header-icon email-forward"
src={ emailForwardingIcon }
alt={ translate( 'Email Forwarding icon' ) }
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 31 times:
translate( 'Email Forwarding' ) ES Score: 7

{ this.renderEmails() }
{ this.canUserAddEmailAccounts( domain ) && (
<VerticalNavItem path="#" onClick={ wrappedAddEmailHandler }>
{ translate( 'Add new mailbox' ) }
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 17 times:
translate( 'Add New Mailboxes' ) ES Score: 8

const numberOfMailboxes = this.getMailboxCount( domain );
const mailboxCountText = numberOfMailboxes
? '- ' +
translate( '%(numberOfMailboxes)d mailbox', '%(numberOfMailboxes)d mailboxes', {
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 8 times:
translate( 'You have %(numberOfMailboxes)d unused mailbox', 'You have %(numberOfMailboxes)d unused mailboxes' ) ES Score: 7

@@ -0,0 +1,3 @@
export function getTitanMailOwnerId( domain ) {
return domain?.titanMailSubscription?.ownedByUserId;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to your pull request, but it would be great to follow a consistent naming for this product in our code: sometimes we refers to it as TitanMail and sometimes as just Titan (even in this client/lib/titan folder).

<React.Fragment>
<SectionHeader label={ translate( 'Active Email Plans' ) } />
<div className="email-management-list__active-emails">{ activeEmailItems }</div>
</React.Fragment>
Copy link
Contributor

Choose a reason for hiding this comment

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

Note you can also use the <>[...]</>` shorter notation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL! I'll take that on today.

@hambai hambai force-pushed the try/new-email-nav-structure branch from 5151cb3 to ddfa7ed Compare March 15, 2021 15:29
@hambai hambai force-pushed the try/new-email-nav-structure branch from ddfa7ed to c0d7f85 Compare March 15, 2021 15:44
@hambai hambai mentioned this pull request Mar 29, 2021
@daledupreez
Copy link
Contributor Author

Closing this in favour of #51452.

@daledupreez daledupreez deleted the try/new-email-nav-structure branch April 20, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Professional Email Issues with Professional Email powered by Titan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants