woocommerce-ios
woocommerce-ios copied to clipboard
[Woo POS] Split `PointOfSaleDashboardViewModel` responsibilities
Follow-up from p1717587902586389-slack-C070SJRA8DP
The way the view model is split up and held may not be optimal right now... I'm not working with it much, but from what I've seen it feels like it's covering a lot of concerns. The subviews have access to much more of it than they actually need.
The top level dashboard VM that manages is currently tied to many smaller views and we might want to create smaller view models for subviews. If resetting the dashboard VM isn’t straightforward, products provider and payment service (which are DI’ed) can remain the same while other states are cleared.
Update with some experimentation: p1719463677829039/1717587902.586389-slack-C070SJRA8DP
- Product List: https://github.com/woocommerce/woocommerce-ios/pull/13188
- Cart: https://github.com/woocommerce/woocommerce-ios/pull/13191
- Totals: TBD
- Payments: TBD