-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commerce): expose emitCartAction action and decouple purchase an…
…d emitPurchase (#4227) https://coveord.atlassian.net/browse/KIT-3346 This PR includes a minor breaking change, but I very much doubt it will affect anyone as the cart controller's behavior remains unchanged. That being said, I can revert this part of the change if we feel uncomfortable about it. What changes is that the `purchase` and `emitPurchase` actions are now decoupled. So theoretically, someone who was dispatching the `purchase` action directly (without going through the controller) would now have to dispatch the `emitPurchase` action first to get the same behavior as before (i.e., emitting the `ec.purchase` event and then clearing the cart). Other than that, this PR also decouples the `updateItemQuantity` and `emitCartAction` actions so that the two can be dispatched separately. This does not affect the behavior of the `updateItemQuantity` method on the cart controller, and is not a breaking change because we're simply introducing a new dispatchable action. --------- Co-authored-by: Alex Prudhomme <[email protected]> Co-authored-by: Louis Bompart <[email protected]>
- Loading branch information
1 parent
221e1bc
commit d1b5110
Showing
8 changed files
with
126 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.