woocommerce-ios
woocommerce-ios copied to clipboard
[Tablet Orders] Make order sync blocking in side-by-side mode to improve product selection sync reliability
Part of: #11908
Description
This isn't pretty.
With the side-by-side order creation process, we sync product selections and removals as soon as they are performed.
This makes it easy to rapidly make significant changes to the order, which is not reliable. In particular, by quickly selecting and deselecting multiple products, it's easy to get the product selector out of sync with the order.
This PR implements the simplest fix, which is to always block the UI when a change is in flight. We only block when the side-by-side mode is used.
Unfortunately, this currently includes quantity changes, which makes that part of order creation frustrating to use.
This PR may be OK for a temporary solution, or it may be better to allow the potential out-of-sync orders... but neither are good.
Testing instructions
- Enable the
sideBySideViewForOrderForm
feature flag - Launch the app on an iPad, and go to the
Orders
tab. Tap+
- Add a product to the order – observe that the UI is blocked while the sync completes
- Add another – observe that it's blocked again
- Remove a product – observe that the UI is blocked
- Open a product card and change the quantity – observe that you get a moment to tap it multiple times, if you're fast, but then the UI is blocked for the sync.
- Set a split view so that the screen shows in modal-on-modal
- Change a product's quantity – observe that the UI is not blocked.
Screenshots
https://github.com/woocommerce/woocommerce-ios/assets/2472348/b0735067-f7e7-4a3b-945a-647173e91754
- [x] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txt
if necessary.
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | ![]() |
|
Build Number | pr12055-7a533ef | |
Version | 17.4 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 7a533ef13c80ed019ca5fe74cbcce2bdbb9eceef | |
App Center Build | WooCommerce - Prototype Builds #8113 |