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] Remove dashboard view model #14483

Open joshheald opened 20 hours ago

joshheald commented 20 hours ago

Closes: #14458

Description

This PR removes the POS Dashboard view model.

To do this, I made the connectivity banner view self-contained, relying on its connectivity observer directly. Additionally, I moved some flags used to control the display of the support modal and the exit POS confirmation modal, to @State variables on the dashboard view, with bindings where required by the floating controls view.

Testing information

Again, with this PR most of the functionality had previously been stripped out of the dashboard view model. The main areas to test are whether the support and exit POS modals still display and dismiss correctly, and to check that the no internet connection banner animates in and out as it should.

I've tested the full flow on an iPad Air running iOS 17.7.

Screenshots

https://github.com/user-attachments/assets/79ae306e-91e6-433f-a593-2f7a0d6ca170


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 20 hours 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 Numberpr14483-355b86e
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commit355b86ece0f98215452b66a5cfe0d90a7b0e0bc3
App Center BuildWooCommerce - Prototype Builds #11713

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

wpmobilebot commented 5 hours ago

Version 21.2 has now entered code-freeze, so the milestone of this PR has been updated to 21.3.