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: create shopping-cart package and ShoppingCartProvider #46532

Merged
merged 35 commits into from
Oct 22, 2020

Commits on Oct 22, 2020

  1. Configuration menu
    Copy the full SHA
    1a98506 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bde0cf9 View commit details
    Browse the repository at this point in the history
  3. Move SiteData type to its own TS file

    This doesn't feel like the right place to put it, but I'm not sure where
    is better at the moment.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b3a1c63 View commit details
    Browse the repository at this point in the history
  4. Use useShoppingCart in CompositeCheckout

    This replaces the useShoppingCartManager hook with a simpler hook that
    gets its data from the ShoppingCartProvider.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b71562f View commit details
    Browse the repository at this point in the history
  5. Wrap CompositeCheckout in ShoppingCartProvider

    This creates a new function, getCartKey, to handle calculating the cart
    key (or undefined).
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    9191c14 View commit details
    Browse the repository at this point in the history
  6. Replace canInitializeCart with a falsy cartKey

    This modifies useShoppingCartManager so that if its cartKey is falsy, it
    will delay loading the cart (or will mark the cart as loading if it has
    already loaded).
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    127561d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3e11d5b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cdec721 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1eac03d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3a62fcd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e5fe787 View commit details
    Browse the repository at this point in the history
  12. Add withShoppingCart HOC

    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b1314fb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    11c3910 View commit details
    Browse the repository at this point in the history
  14. Add basic README

    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    44ebd71 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c139de2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    a4d1372 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    32beed1 View commit details
    Browse the repository at this point in the history
  18. Remove after_purchase_url

    This was accidentally left in from a previous PR.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    6dc5d91 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1e776fd View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    f85a2b8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    b50573f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    64879de View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    553cbe9 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ecd7dc1 View commit details
    Browse the repository at this point in the history
  25. Allow initializing the cart multiple times

    Previously, the concept of initializing the cart happened only once.
    Now, the CART_RELOAD action can cause another initialize, so
    useInitializeCartFromServer cannot count on a flag to know if it should
    allow an initialize or not. Instead, we rely on the cache status, which
    is notified that we are fetching the initial data by a new action on the
    shopping cart reducer.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b179210 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1fabbe6 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    560831a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c773d18 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    2cabf12 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    b747379 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    83b0f2e View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    53f225a View commit details
    Browse the repository at this point in the history
  33. Remove formatValueForCurrency from composite-checkout README

    It does not exist.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    627560d View commit details
    Browse the repository at this point in the history
  34. Remove exported cart functions from shopping-cart

    They are all internal only.
    sirbrillig committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    93f13ca View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    19b38ee View commit details
    Browse the repository at this point in the history