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

Email: Create Titan Mail checkout flow #48600

Merged
merged 19 commits into from
Dec 29, 2020
Merged

Email: Create Titan Mail checkout flow #48600

merged 19 commits into from
Dec 29, 2020

Conversation

eltongo
Copy link
Contributor

@eltongo eltongo commented Dec 24, 2020

Changes proposed in this Pull Request

This PR creates the checkout flow for Titan Mail.

Testing instructions

  • Enable the titan/phase-2 flag by appending ?flags=titan/phase-2 to the Calypso URL
  • Try to add Titan Mail to one of your domains, it should lead to this form where you need to specify the quantity:

titan_step2

Verify that Cancel button works as expected by sending you to the /email page, and the Continue button adds the product to the cart.

@eltongo eltongo requested review from a team as code owners December 24, 2020 13:40
@matticbot
Copy link
Contributor

@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 24, 2020
@eltongo eltongo self-assigned this Dec 24, 2020
@eltongo eltongo added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 24, 2020
@matticbot
Copy link
Contributor

matticbot commented Dec 24, 2020

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

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

name        parsed_size           gzip_size
entry-main        +85 B  (+0.0%)      +22 B  (+0.0%)

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

Sections (~5193 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
email                     +19118 B  (+5.5%)    +4968 B  (+5.2%)
checkout                    +802 B  (+0.1%)     +204 B  (+0.1%)
site-purchases              +349 B  (+0.0%)      +82 B  (+0.0%)
purchases                   +349 B  (+0.0%)      +78 B  (+0.0%)
domains                     +349 B  (+0.0%)      +84 B  (+0.0%)
woocommerce                 +322 B  (+0.0%)      +61 B  (+0.0%)
themes                      +322 B  (+0.1%)      +71 B  (+0.1%)
theme                       +322 B  (+0.1%)      +71 B  (+0.1%)
signup                      +322 B  (+0.1%)      +71 B  (+0.1%)
settings-writing            +322 B  (+0.1%)      +71 B  (+0.0%)
settings-security           +322 B  (+0.1%)      +71 B  (+0.1%)
settings-performance        +322 B  (+0.1%)      +71 B  (+0.1%)
settings-jetpack            +322 B  (+0.1%)      +71 B  (+0.1%)
settings-discussion         +322 B  (+0.1%)      +71 B  (+0.1%)
settings                    +322 B  (+0.1%)      +71 B  (+0.0%)
plans                       +322 B  (+0.0%)      +71 B  (+0.0%)
marketing                   +322 B  (+0.1%)      +71 B  (+0.0%)
jetpack-search              +322 B  (+0.2%)      +71 B  (+0.2%)
jetpack-connect             +322 B  (+0.0%)      +71 B  (+0.0%)
jetpack-cloud-pricing       +322 B  (+0.1%)      +71 B  (+0.1%)
home                        +322 B  (+0.1%)      +71 B  (+0.1%)
help                        +322 B  (+0.1%)      +71 B  (+0.0%)
export                      +322 B  (+0.1%)      +71 B  (+0.1%)
customize                   +322 B  (+0.1%)      +71 B  (+0.1%)
activity                    +322 B  (+0.1%)      +71 B  (+0.0%)
account-close               +322 B  (+0.1%)      +71 B  (+0.1%)

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 (~269 bytes added 📈 [gzipped])

name                                                              parsed_size           gzip_size
async-load-calypso-blocks-editor-checkout-modal                        +802 B  (+0.1%)     +204 B  (+0.1%)
async-load-design-blocks                                               +322 B  (+0.0%)      +65 B  (+0.0%)
async-load-design                                                      +322 B  (+0.0%)      +71 B  (+0.0%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice       +322 B  (+0.7%)      +71 B  (+0.6%)
async-load-calypso-blocks-inline-help-popover                          +322 B  (+0.1%)      +71 B  (+0.1%)

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.

@eltongo eltongo added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Dec 24, 2020
Copy link
Contributor

@klimeryk klimeryk left a comment

Choose a reason for hiding this comment

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

From a functional point of view, LGTM. I tested without the feature flag and did not notice any regressions.
The only functional nitpick is about how these products are rendered in the shopping cart:

Screenshot 2020-12-25 at 22 21 09

We need to include the domain part somewhere in there, otherwise it's completely unclear which one if for which domain. It's also not visible how many items (emails) you're buying and I think that's a very useful information to include. Apologies if this is already on your radar 🙇

Code-wise, there's the suggestion about using selectors, but that's pending Payton's feedback. Since this is behind a feature flag, it should be to safe to merge as-is and iterate, especially if it's blocking further PRs.

@eltongo eltongo requested a review from klimeryk December 28, 2020 13:33
@eltongo eltongo merged commit a08af68 into trunk Dec 29, 2020
@eltongo eltongo deleted the add/titan-checkout branch December 29, 2020 14:48
@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 Dec 29, 2020
@a8ci18n
Copy link

a8ci18n commented Dec 29, 2020

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/5378831

Thank you @eltongo for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Jan 8, 2021

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.

5 participants