Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Fix invalid handling of checkouts without shipping #571

Merged
merged 19 commits into from
Jan 27, 2020

Conversation

orzechdev
Copy link
Contributor

@orzechdev orzechdev commented Jan 14, 2020

Changes:

Notion:

  • Updated graphql dependency due to Error: Cannot find module 'graphql/validation/rules/PossibleTypeExtensions' when apollo codegen:generate --target=typescript types executed.

Refactor (tldr: redirection and determination of checkout route is moved to a higher position in the components hierarchy):

  • Create useCheckoutStepState() hook to handle state of step and removed step out of checkout context - it should not be there as there it is not connected with context, step state is just memoization of step, where the user left his/her work. Moreover step state now can depend on other contexts and data, so it is not tight coupled with checkout context anymore.
  • Remove StepCheck out of checkout pages - the logic of redirection to prevent user from entering invalid step by manually pasting the url is moved to main index.js of checkout, i.e. CheckoutApp.
  • Refactor CheckoutDispatcher and move it to routes directory as CheckoutRouteDispatcher.

Screenshots

Pull Request Checklist

  1. All visible strings are translated with proper context.
  2. All data-formatting is locale-aware (dates, numbers, and so on).
  3. The changes are tested.
  4. The code is documented (docstrings, project documentation).
  5. Changes are mentioned in the changelog.

@orzechdev orzechdev self-assigned this Jan 14, 2020
@netlify
Copy link

netlify bot commented Jan 14, 2020

Deploy preview for saleor-storefront-stage processing.

Building with commit 9a3b5c2

https://app.netlify.com/sites/saleor-storefront-stage/deploys/5e2ef58267651a000b4a91e5

@orzechdev orzechdev marked this pull request as ready for review January 21, 2020 12:28
@orzechdev orzechdev merged commit a13e8c7 into master Jan 27, 2020
@orzechdev orzechdev deleted the fix/invalid_checkouts_without_shipping branch January 27, 2020 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants