[WOOMOB-3390] Revert order-status CIAB gating#16181
Conversation
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #16181 +/- ##
============================================
- Coverage 42.15% 42.14% -0.02%
+ Complexity 13492 13476 -16
============================================
Files 2474 2473 -1
Lines 142821 142750 -71
Branches 20650 20639 -11
============================================
- Hits 60212 60157 -55
+ Misses 76524 76514 -10
+ Partials 6085 6079 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR removes CIAB-specific order-status gating and mapping so order statuses behave consistently across all sites (full editable status list, no “Open” collapsing), and deletes the now-dead CIAB order-status machinery across UI, domain, and tests.
Changes:
- Removed
CIABOrderStatusMapperusage throughout orders/dashboard flows and deleted the mapper + its unit tests and related “open” status UI branches/resources. - Made order-status UI always editable and enabled multi-select unconditionally (removed CIAB feature gating in fragments).
- Simplified dashboard “top orders” filtering in
OrderListRepository/DashboardOrdersViewModelfrom multi-status lists to a single nullable status filter, updating tests accordingly.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/OrderListViewModelTest.kt | Removes CIAB mapper mocking/wiring from order list VM tests. |
| WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/OrderDetailViewModelTest.kt | Removes CIAB mapper mocking/wiring from order detail VM tests. |
| WooCommerce/src/test/kotlin/com/woocommerce/android/ui/orders/creation/UnifiedOrderEditViewModelTest.kt | Removes CIAB mapper dependency from unified order edit VM test setup. |
| WooCommerce/src/test/kotlin/com/woocommerce/android/ui/dashboard/orders/DashboardOrdersViewModelTest.kt | Updates mocks/stubs for new nullable single-status filter API on repository calls. |
| WooCommerce/src/test/kotlin/com/woocommerce/android/ui/aiassistant/AiAssistantOrderCardRendererTest.kt | Removes CIAB “open” status color test expectation. |
| WooCommerce/src/test/kotlin/com/woocommerce/android/ciab/CIABOrderStatusMapperTest.kt | Deletes mapper tests (mapper removed). |
| WooCommerce/src/main/res/values/strings.xml | Removes CIAB “Open” status string resource. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/OrderStatusTag.kt | Removes special-case coloring for CIAB “open” status key. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListViewModel.kt | Removes CIAB mapper injection and identity mapping for status options. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListRepository.kt | Changes dashboard top-orders filtering from list-of-statuses to single nullable status. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/OrderListFragment.kt | Always enables multi-select (removes CIAB feature gate). |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/list/GetWCOrderListDescriptorWithFiltersBySiteId.kt | Removes CIAB filter-key expansion; passes selected keys through unchanged. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/filters/domain/GetWCOrderListDescriptorWithFilters.kt | Removes CIAB filter-key expansion; passes selected keys through unchanged. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/filters/domain/GetOrderStatusFilterOptions.kt | Removes CIAB option grouping/mapping; returns raw options list. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/details/OrderDetailViewModel.kt | Removes CIAB status mapping when resolving order status. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/details/OrderDetailFragment.kt | Always initializes status view in editable mode (no CIAB gating). |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/creation/OrderCreateEditViewModel.kt | Removes CIAB status mapping when observing status data. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/creation/OrderCreateEditFormFragment.kt | Always initializes order status view as editable in edit mode. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/dashboard/orders/DashboardOrdersViewModel.kt | Removes CIAB status mapping + “open” color special-casing; uses raw status/options. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ui/aiassistant/AiAssistantOrderCardRenderer.kt | Removes CIAB “open” status special-case color mapping. |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ciab/CIABOrderStatusMapper.kt | Deletes mapper implementation (no longer used). |
| WooCommerce/src/main/kotlin/com/woocommerce/android/ciab/CIABAffectedFeature.kt | Removes OrderStatusEditing enum entry (no longer used). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Generated by 🚫 Danger |
563cf3b to
cc9ee78
Compare
2d89a27 to
b498548
Compare
irfano
left a comment
There was a problem hiding this comment.
LGTM! 👍🏻 Thanks for the changes.
cc9ee78 to
c35e2fe
Compare
3aa1dc2 to
12a4823
Compare

Description
Fixes WOOMOB-3390
Sub-task of the CIAB ("Commerce In A Box") retirement on Android. On CIAB sites, order statuses are currently gated in two ways: the full status list is collapsed into a single "Open" status, statuses are shown read-only (non-editable), and status filters are grouped/remapped. This PR reverts that gating so order statuses behave the same on every site — full editable status list, no "Open" collapsing — and removes the now-unused order-status CIAB machinery entirely.
Stacked PR: this targets
issue/WOOMOB-3387-revert-ipp-gating(the IPP-gating revert), nottrunk. It should merge after that base. It is otherwise independent and safe to ship on its own.What changed:
OrderDetailFragment,OrderCreateEditFormFragment, andOrderListFragmentno longer branch onCIABAffectedFeature.OrderStatusEditing; the status view is alwaysMode.OrderEditand multi-select is always enabled. TheciabSiteGateKeeperfield was dropped from these fragments (it was used only for this gate).CIABOrderStatusMappertransform call (mapOrderStatus,mapOrderStatusOptionsList,mapFilterOptions,resolveFilterKeys) was inlined to use the input unchanged, and the injectedciabOrderStatusMapperwas removed fromOrderListViewModel,OrderDetailViewModel,OrderCreateEditViewModel,DashboardOrdersViewModel,GetOrderStatusFilterOptions,GetWCOrderListDescriptorWithFilters, andGetWCOrderListDescriptorWithFiltersBySiteId.CIABOrderStatusMapperdeleted. With all transform callers inlined, the class and its remaining staticOPEN_KEYreferences became dead. Removed the class + its test, the three now-dead "Open"-status display branches (OrderStatusTag,AiAssistantOrderCardRenderer, and theDashboardOrdersViewModelstatus-color helper — a custom "open" status now falls through to the default color like any other custom status), and the now-unusedciab_order_status_opensource string. (Translated copies are GlotPress-managed and cleaned up by the translation sync.)OrderStatusEditingvalue fromCIABAffectedFeature(mirrors the base branch removingInPersonPayments).ciabOrderStatusMappermock wiring from the four affected ViewModel tests (they already stubbed it as identity, so behavior is unchanged) and removed the CIAB "open"-status color test fromAiAssistantOrderCardRendererTest. Kept theciabSiteGateKeepermock inOrderDetailViewModelTest(still used for the unrelated "is CIAB -> fetch fulfillments" logic).Test Steps
Images/gif
N/A
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.