Skip to content

Conversation

@RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented Nov 7, 2025

WOOMOB-1653

Description

Repetitive order details presentation from booking was broken on iPhone. If a booking order was presented by tapping on "View Order" in booking details, dismissed and then triggered to be presented again - the order details won't be opened the second time.

The issue is happening because selectedOrderID and selectedIndexPath keep their value even when order details get dismissed on iPhone. The following logic prevented the details presentation:

let orderNotAlreadySelected = selectedOrderID != orderID
let indexPath = dataSource.indexPath(for: identifier)
let indexPathNotAlreadySelected = selectedIndexPath != indexPath
let shouldSwitchDetails = orderNotAlreadySelected || indexPathNotAlreadySelected

To resolve the above issue the isTriggeredByUserAction attribute was added to force order details presentation if the navigation was manually triggered by the user action. Also the derails presentation logic was changed in OrdersSplitViewWrapperController - the new details VC wasn't re-created and applied in case if the new order has the same id. In that case the existing details VC was obtained and re-presented.

Test Steps

TC1: Basic scenario

  • Run on iPhone and iPad at the same time to compare behaviour.
  • Use CIAB site with existing bookings and corresponding orders.
  • Navigate to a booking that has an order.
  • In booking details tap on "View Order" CTA
  • Make sure the "Orders" tab is opened and the corresponding order is selected in orders list and also presented in Order Details screen.
  • Dismiss the booking details (on iPhone)
  • Go back to the Bookings tab where the same booking is opened.
  • Tap on the "View Order" CTA again.
  • Make sure the Order Details correctly re-opened in Orders tab.
OrderReSelectDemo1.mov

TC2: don't dismiss the order details

  • Repeat the steps from the TC1 but skip the "Dismiss the booking details"
  • Make sure when the order details are opened for the 2nd time - there is no screen re-creation. The same screen should be just re-opened.
Demo2.mov

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@RafaelKayumov RafaelKayumov added this to the 23.7 milestone Nov 7, 2025
@RafaelKayumov RafaelKayumov added type: bug A confirmed bug. Bug labels Nov 7, 2025
@RafaelKayumov RafaelKayumov marked this pull request as ready for review November 7, 2025 15:58
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16331-79bf356
Version23.6
Bundle IDcom.automattic.alpha.woocommerce
Commit79bf356
Installation URL4jdcpj02b6v4g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants