Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Oct 24, 2025

Part of WOOMOB-1240

Description

This PR updates the selector for Service/Event and Customer name filters for bookings:

  • Adds a new type conforming to ListSyncable to support showing selector for bookable products (named as Service/Event on the UI).
  • Updates the Customer selector:
    • Renames the title to match the filter option for bookings
    • Updates the navigation to use push instead of modal.
    • Adds new configuration for the presentation type to ensure that the selector is still presented modally from order creation form.
    • Update UI for the customer rows to better match the design. I'm keeping the search bar for simplicity.
    • Avoid dismiss selector upon selection. We'll need to support multiple selection in a subsequent PR.

Testing steps

  • Log in to a CIAB site with existing bookings.
  • Navigate to Bookings > All > Filter.
  • Select Service/Event and confirm that only bookable products are displayed. Selecting any option should show a checkmark next to the option. Dismissing the view should display the product name on the filter screen.
  • Select Customer name and confirm that the customer selector is pushed from the same navigation stack.
  • Confirm that the customer selector has the correct title and selecting any option would show a checkmark next to the option. Dismissing the view should display the customer name on the filter screen.

Testing information

  • Tested and confirmed with simulator iPhone 17.
  • Also checked the customer selector on Order filter and Order creation form and confirmed that no regression was made.

Screenshots

Simulator.Screen.Recording.-.iPhone.17.-.2025-10-27.at.14.34.02.mov

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

@itsmeichigo itsmeichigo added this to the 23.6 milestone Oct 24, 2025
@itsmeichigo itsmeichigo added the type: task An internally driven task. label Oct 24, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 24, 2025

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 Numberpr16278-b6ed021
Version23.5
Bundle IDcom.automattic.alpha.woocommerce
Commitb6ed021
Installation URL7c89kbs94j4lo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review October 24, 2025 11:11
@adborbas
Copy link
Contributor

Hi @itsmeichigo, There might be something I'm missing, but I could not get the selections dismiss working.

Case Recording Description
Service / Event selection Simulator Screen Recording - iPhone 17 Pro - 2025-10-27 at 09 14 34 Selection does not dismiss the view
Customer selection Simulator Screen Recording - iPhone 17 Pro - 2025-10-27 at 09 15 22 Selection does not dismiss the view
No name customer selection Simulator Screen Recording - iPhone 17 Pro - 2025-10-27 at 09 15 37 Selecting a "No name" customer after a "No name" customer changes the order.
  • Also, there is no option to clear selection
  • @itsmeichigo
    Copy link
    Contributor Author

    itsmeichigo commented Oct 27, 2025

    Thanks @adborbas for the feedback!

    I could not get the selections dismiss working.

    I just updated all the filters for bookings in this PR to not dismiss the selector immediately upon selection. This will keep the behavior consistent with the static options as well (attendance status, booking status). Also we'll need to support multiple selections, but that will be handled later. So for now, one would need to either tap < arrow to add more filter or tap Show bookings to apply the filters.

    Selecting a "No name" customer after a "No name" customer changes the order.

    I updated the sort descriptor in fb76687 to fix this.

    there is no option to clear selection

    I asked Wagner in lxixW6aBBNkCd9ooBK70Z1-fi-1421_3698#1478520395 - I'll update this later when I get a response from him.

    Base automatically changed from woomob-1240-filter-team-member to trunk October 27, 2025 09:56
    @adborbas
    Copy link
    Contributor

    I just updated all the filters for bookings in this PR to not dismiss the selector immediately upon selection.

    @itsmeichigo Ok, thanks for the clarification! This makes sense now.

    In this case I think the "Testing steps" needs some adjustment cause it says:

    • "Selecting any option should dismiss the view and display the product name on the filter screen."
    • "Selecting any option would dismiss the view and display the customer name on the filter screen."

    I'd expect them to say not dismiss the view.

    I'll check the code now.

    Copy link
    Contributor

    @adborbas adborbas left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Nice work on this 👍 Had one small comment.

    ///
    public struct BookingProductFilter: Codable, Hashable {
    /// The underlying product
    public let product: Product
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    One small concern — I wonder if we really need to store the entire Product here. Having both product, id, and name feels a bit redundant and might make it easier for other parts of the code to start depending on BookingProductFilter for full product data instead of just treating it as a lightweight filter value.

    Would it make sense for this type to only keep the minimal info needed for filtering (e.g. id and name) and drop the product property? That would keep the model focused on its purpose and avoid any unintended coupling later on.

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    This is a valid point! I added an update in b6ed021 with the following changes:

    • Removed the full product model from BookingProductFilter.
    • Updated SyncableListSelectorView to accept a closure for checking initial selection rather than comparing full models.
    • Updated FilterListViewController following the selection logic change.

    @itsmeichigo
    Copy link
    Contributor Author

    I'd expect them to say not dismiss the view.

    My bad, I updated the code but forgot to update the PR description. I updated it to avoid confusion in case someone else visits the PR.

    I just addressed the issue you found above, will enable automerge now to unblock my other PR. Please feel free to leave comments if any, I'll address them in subsequent PRs.

    Thanks!

    @itsmeichigo itsmeichigo enabled auto-merge October 28, 2025 03:36
    @itsmeichigo itsmeichigo merged commit 8c4f0f1 into trunk Oct 28, 2025
    13 checks passed
    @itsmeichigo itsmeichigo deleted the woomob-1240-filter-service-event branch October 28, 2025 03:52
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    type: task An internally driven task.

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    4 participants