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

Update the email comparison page to use a stacked card layout and embed account creation #51062

Closed
wants to merge 29 commits into from

Conversation

daledupreez
Copy link
Contributor

@daledupreez daledupreez commented Mar 15, 2021

Changes proposed in this Pull Request

  • This PR implements the basic design for the new Email Comparison page from pcDL0W-79-p2, which includes a stacked card layout and account creation from within the page.
    Note that this PR depends on Implement mailbox provisioning components for Email/Titan #51217 for the Email account creation component in that PR, and existing logic for Google Workspace. As such, some of the form fields from that PR may change slightly. (The most likely change is to increase the height to support the password reset field.)

You can access the new layout by navigating to the email comparison page for a domain without email (/email/:domain/manage/:siteSlug?titan/provision-mailboxes or via Upgrades -> Domains -> Add (next to a domain), and then adding ?flags=titan/provision-mailboxes to the URL.) Note: this flag has been updated from an earlier version of this PR

The following implementation items are not covered by this PR:

  • Implement Email Forwarding creation logic -- we may take this on in a later PR, but it's not critical
  • Implement state to indicate email can't be purchased for the domain
  • Implement states where one or more of the options can't be purchased
  • Implement handling for cases where the domain isn't eligible for the free trial -- we'll take this on later this week, as we don't need this to launch this functionality to users as-is

Screenshots

Before:

Existing email comparison page

After:

Initial, unexpanded state
Initial state with Email expanded

Google Workspace expanded
Google Workspace expanded

Email Forwarding expanded
Email Forwarding expanded

Testing instructions

Verify that you can add all three types of email account via this UI.

@daledupreez daledupreez added the Professional Email Issues with Professional Email powered by Titan label Mar 15, 2021
@daledupreez daledupreez requested a review from a team March 15, 2021 11:48
@daledupreez daledupreez self-assigned this Mar 15, 2021
@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 Mar 15, 2021
@matticbot
Copy link
Contributor

translate( '30GB storage' ),
translate( 'Email, calendars, and contacts' ),
translate( 'One-click import of existing emails and contacts' ),
translate( 'Apps for Android and iOS' ),
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 4 times:
translate( 'Jetpack for Android and iOS' ) ES Score: 7

? newUsers( domain.name )
: this.state.googleUsers;

const formattedPrice = translate( '{{price/}} /user /month billed yearly', {
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 29 times:
translate( '%(price)s per month, billed yearly' ) ES Score: 8
See 1 additional suggestions in the PR translation status page

@matticbot
Copy link
Contributor

matticbot commented Mar 15, 2021

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

Sections (~1122 bytes added 📈 [gzipped])

name   parsed_size           gzip_size
email      +6355 B  (+1.5%)    +1122 B  (+0.9%)

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.

@daledupreez daledupreez force-pushed the add/updated-email-comparison-page branch from 306c643 to 95309df Compare March 15, 2021 13:28
comment: '{{price/}} is the formatted price, e.g. $20',
};
const formattedPrice = config.isEnabled( 'email/centralized-home' )
? translate( '{{price/}} /user /month billed annually', priceArguments )
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 3 times:
translate( 'per month{{br/}}billed yearly' ) ES Score: 6

<>
<FormFieldset>
<FormLabel>
{ translate( 'Emails sent to' ) }
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 30 times:
translate( 'Emails sent to', { context: 'Form label: Email sent to [address] (will arrive at...)'} ) ES Score: 12
See 1 additional suggestions in the PR translation status page

</FormFieldset>
<FormFieldset>
<FormLabel>
{ translate( 'Will be forwarded to' ) }
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 22 times:
translate( 'Will be forwarded to', { context: 'Form label: (Email sent to [address]) will arrive at [address]'} ) ES Score: 15
See 1 additional suggestions in the PR translation status page

@daledupreez daledupreez force-pushed the add/updated-email-comparison-page branch from ad94fa3 to 458c207 Compare March 19, 2021 14:20
@daledupreez daledupreez changed the base branch from trunk to add/titan-mailbox-provisioning-new-components March 21, 2021 18:58
@daledupreez daledupreez force-pushed the add/updated-email-comparison-page branch from ce80d96 to f502056 Compare March 21, 2021 19:46
value,
error:
! error && ! /^[0-9a-z_-](\.?[0-9a-z_-])*$/i.test( value )
? translate( 'Only numbers, letters, dashes, underscores, and periods are allowed.' )
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( 'Only numbers, letters, dashes, underscores, apostrophes and periods are allowed.' ) ES Score: 12
See 2 additional suggestions in the PR translation status page

@daledupreez daledupreez force-pushed the add/titan-mailbox-provisioning-new-components branch 2 times, most recently from 82d420c to 3231985 Compare March 22, 2021 10:02
@daledupreez daledupreez force-pushed the add/updated-email-comparison-page branch from ab5507b to 5607008 Compare March 22, 2021 10:25
@daledupreez daledupreez changed the title [WIP] Update the email comparison page to use a stacked card layout Update the email comparison page to use a stacked card layout and embed account creation Mar 22, 2021
@daledupreez daledupreez marked this pull request as ready for review March 22, 2021 11:13
Copy link
Contributor

@hambai hambai left a comment

Choose a reason for hiding this comment

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

Hmm - I tried testing this but the areAllMailboxesValid returns false (I guess because alternativeEmail is empty). Is that intentional?

Base automatically changed from add/titan-mailbox-provisioning-new-components to trunk March 22, 2021 18:13
@daledupreez
Copy link
Contributor Author

Hmm - I tried testing this but the areAllMailboxesValid returns false (I guess because alternativeEmail is empty). Is that intentional?

Definitely not intentional -- the validation should allow alternativeEmail to be empty if we're not showing the field (which is the case while we're adding it on the back end.

I'll do some testing and exploring in the morning to see what's going on.

@daledupreez
Copy link
Contributor Author

I am closing this massive PR in favour of #51298 and #51307.

@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 24, 2021
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

4 participants