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

Checkout: update initial view of review step (3) #42866

Merged
merged 21 commits into from
Jun 3, 2020

Conversation

michaeldcain
Copy link
Member

@michaeldcain michaeldcain commented Jun 1, 2020

In #42678, the "Order Review" step was pulled out of the step flow for Checkout and made persistent. This PR introduces a default summary view of that step to make the already-completed information easier to scan.

Summary mode (default):
summary

Edit mode:
edit

As part of the PR, I needed to make the following changes to the composite checkout package:

  • I attempted to decouple step flow control from the CheckoutStepBody wherever possible. CheckoutStep(s) act as a wrapper for CheckoutStepBody and handle mechanics of progressing through steps.
  • I introduced an areStepsActive prop to CheckoutSteps to allow for the entire set of steps to be inactive when another element of Checkout is focused.

To Test:

  • Add an item to your cart and visit Checkout with ?flags=composite-checkout-force
  • Verify that the "Your Order" section renders in a summary mode, without a tax line item, remove buttons, or plan variations
  • Click "Edit" on "Your Order"
  • Verify that the section renders in an edit mode, with all items returned as before and an additional "save order" button.
  • Verify that the other Checkout steps are rendered, collapsed and inactive.
  • Verify that clicking "save order" returns the section to summary mode.
  • Commence jerk testing the rest of Signup. Add and remove items, progress through steps, edit
    and complete steps, return to edit your order, make sure that Checkout progress is maintained… your journey awaits.

@michaeldcain michaeldcain added the [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. label Jun 1, 2020
@michaeldcain michaeldcain requested review from fditrapani and a team June 1, 2020 21:00
@michaeldcain michaeldcain self-assigned this Jun 1, 2020
@matticbot
Copy link
Contributor

@michaeldcain michaeldcain changed the title Checkout: update initial view or review step Checkout: update initial view of review step Jun 1, 2020
@matticbot
Copy link
Contributor

matticbot commented Jun 1, 2020

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

Sections (~185 bytes added 📈 [gzipped])

name      parsed_size           gzip_size
checkout      +1079 B  (+0.1%)     +185 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.

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.

@michaeldcain michaeldcain force-pushed the update/checkout-review-step-summary branch from 46f9f42 to 2139dfd Compare June 2, 2020 21:03
@michaeldcain michaeldcain marked this pull request as ready for review June 2, 2020 21:17
@michaeldcain michaeldcain force-pushed the update/checkout-review-step-summary branch from 2139dfd to fe164db Compare June 2, 2020 21:22
@michaeldcain michaeldcain added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 2, 2020
@sirbrillig
Copy link
Member

One thing I noticed:

  • Click "Edit" on the review order step.
  • While that step is active, click "Edit" on the contact info step.
  • Nothing appears to happen.

@fditrapani
Copy link
Contributor

fditrapani commented Jun 3, 2020

Looking good! I made some minor edits to the font sizes and spacing around the coupon. Not blocking for merging but I wanted to change the review order step title while you're in edit mode but couldn't figure out how to bring the isSummary state up to that level.

One last note, I can confirm the issue with the Edit that Payton mentioned.

@michaeldcain
Copy link
Member Author

Thanks for catching the editing issue - it's much more apparent now that the contact details step might be marked as complete when the cart loads.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

Works for me!

@michaeldcain michaeldcain merged commit ee7e296 into master Jun 3, 2020
@michaeldcain michaeldcain deleted the update/checkout-review-step-summary branch June 3, 2020 19:35
@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 Jun 3, 2020
@a8ci18n
Copy link

a8ci18n commented Jun 3, 2020

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

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

@sirbrillig sirbrillig changed the title Checkout: update initial view of review step Checkout: update initial view of review step (3) Jun 9, 2020
@a8ci18n
Copy link

a8ci18n commented Jun 11, 2020

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
[Feature] Checkout The checkout screen and process for purchases made on WordPress.com.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants