woocommerce-ios icon indicating copy to clipboard operation
woocommerce-ios copied to clipboard

[Tablet Orders] Improve product selection/deselection behaviour to reduce sync errors

Open joshheald opened this issue 1 year ago • 0 comments

Potential approaches:

  • Block product selection during "major updates" (current approach, inheirited from iPhone)
  • Block product selection for every update (should be reliable, but quite frustrating to use. Probably our quickest option for M3)
  • Cancel or ignore API requests that update the order whenever we send a new request (explored in dc044c1)
  • Keep a copy of the latest in-flight request and use that as the basis of the order summary and selection changes (started exploring in eb3033e)
  • Implement a request queue and ensure they all get sent/applied
  • Refactor/wrap RemoteOrderSynchronizer to make it the source of truth for the view models (editable order, product selector, variation selector)
  • Have another shared source of truth for the view models – essentially one class which accepts change requests from any of the three views, and maps them to an order request. Vends the selected items for correct display on the three views. May combine with some of the above approaches. Would be good to pull some of the Product/ItemID-based logic out of the view models.

See p1707147517909389-slack-C025A8VV728 for more context

joshheald avatar Feb 05 '24 17:02 joshheald