Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Oct 28, 2025

Part of WOOMOB-1240

Description

This PR adds the support for multiple selection in Team member, Service/Event, Payment status, and Attendance status filters. Support for Customer name will be added in a separate PR.

Test Steps

  1. Log in to a CIAB store with existing bookings.
  2. Navigate to Bookings tab > All > Filters.
  3. Select Team member and confirm that more than one option can be selected.
  4. Navigate back and confirm that the selected items are displayed correctly: name of the item if only one is selected - number of items if multiple are selected, or Any otherwise.
  5. Navigate back to Team member and confirm that the selected items are already marked.
  6. Tap Any and confirm that all selected items are cleared.
  7. Repeat steps 3 to 6 for Service/event, Payment status, and Attendance status filters.

Screenshots

Simulator.Screen.Recording.-.iPhone.17.-.2025-10-28.at.18.37.27.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 28, 2025
@itsmeichigo itsmeichigo added the type: task An internally driven task. label Oct 28, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 28, 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 Numberpr16285-a0ed11e
Version23.5
Bundle IDcom.automattic.alpha.woocommerce
Commita0ed11e
Installation URL7456ml28punu8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Base automatically changed from woomob-1240-filter-datetime to trunk October 28, 2025 11:44
@itsmeichigo itsmeichigo marked this pull request as ready for review October 28, 2025 11:45
@RafaelKayumov RafaelKayumov self-assigned this Oct 28, 2025
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

LGTM. Works as described.

Left a couple of questions.
Another question is - should all selected filters be persisted after the filter selector is closed and re-opened? I can see that the "Filter (N)" button displays the amount of filters configured. But when I open the selector, I can see that all filters are set to "Any" except customer name and date+time.

Comment on lines 308 to 310
selected.selectedValue = MultipleFilterSelection(items: selectedOptions)
self?.updateUI(numberOfActiveFilters: self?.viewModel.filterTypeViewModels.numberOfActiveFilters ?? 0)
self?.listSelector.reloadData()
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this code is being repeated in a few places:

  • case .multiSelectStaticOptions(let options):
  • case .bookingResource(let siteID):
  • case .bookableProduct(let siteID):
  • case .bookingDateTime:

May be it's work putting in a separate private method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reuse an existing closure in 39f47d3.

isSelected: selectedItems.isEmpty,
onSelection: {
selectedItems.removeAll()
onSelection(selectedItems)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intended to pass cleaned selectedItems array when "Any" is selected? How about passing [] explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch - updated in 49ead88.

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@itsmeichigo
Copy link
Contributor Author

Another question is - should all selected filters be persisted after the filter selector is closed and re-opened? I can see that the "Filter (N)" button displays the amount of filters configured. But when I open the selector, I can see that all filters are set to "Any" except customer name and date+time.

Thanks for catching this! This is a bug with showing the selected filters with multiple selection - I fixed it in a0ed11e:

Simulator.Screen.Recording.-.iPhone.17.-.2025-10-29.at.09.44.43.mov

This PR is ready for another look 🙏

Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

Thx for the updates. LGTM.

@itsmeichigo itsmeichigo merged commit a696bb2 into trunk Oct 29, 2025
13 checks passed
@itsmeichigo itsmeichigo deleted the woomob-1240-multiple-selection branch October 29, 2025 09:19
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.

5 participants