woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
314 stars 113 forks source link

[Woo POS] Extract cart to aggregate model #14400

Closed joshheald closed 1 week ago

joshheald commented 1 week ago

Closes: #14387

Description

This PR extracts the responsibility for the cart contents to the aggregate model.

Some state/actions remain split between the cart and the dashboard; these interact with OrderStage, which will be extracted later.

Testing information

This requires general testing that the cart can be manipulated as expected; adding, removing, clearing, creating an order.

I've tested it across various scenarios on an iPad Air running 17.7

Screenshots

https://github.com/user-attachments/assets/4472ad1f-e77a-45b1-8dc5-783023919840


Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

wpmobilebot commented 1 week ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14400-08dd345
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commit08dd345093b1eb9e2da51d1e76d64c02d1649532
App Center BuildWooCommerce - Prototype Builds #11560

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.