-
Notifications
You must be signed in to change notification settings - Fork 121
[Woo POS] Remove dashboard view model #14483
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
Conversation
|
|
|
Version |
staskus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Tested on iPad Air M2 18.1
- Support modal
- Connectivity notice
- Smoke test payment and order flow
| init(viewModel: PointOfSaleDashboardViewModel) { | ||
| self.viewModel = viewModel | ||
| } | ||
| @State private var showExitPOSModal: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Given this state var is only used to reflect user selection within the dashboard to open the modal, I think using '@State + @Binding` is a good move. Rather than using a view model as an intermediary.
WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift
Outdated
Show resolved
Hide resolved
WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Povilas Staskus <[email protected]>
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
@Statevariables 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
remove-dashboard-view-model.mp4
RELEASE-NOTES.txtif necessary.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: