-
Notifications
You must be signed in to change notification settings - Fork 121
[Woo POS][Historical Orders] Order List Search UI and Functionality (Wireframe UI) #16089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Woo POS][Historical Orders] Order List Search UI and Functionality (Wireframe UI) #16089
Conversation
|
|
…list-search-ui-and-functionality
I haven't checked the code yet, from testing I found something that I'm not sure if is expected yet: Pagination does not trigger when we close the initial search unless we do a pull to refresh first. Example:
Screen.Recording.2025-09-05.at.15.49.22.movI'll check the code now! |
Generated by 🚫 Danger |
iamgabrielma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as described, LGTM!
| let mapper = OrderListMapper(siteID: siteID) | ||
| let orders: [Order] = try await enqueue(request, mapper: mapper) | ||
| let hasMorePages = orders.count == pageSize | ||
| return PagedItems(items: orders, hasMorePages: hasMorePages, totalItems: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have/want access to totalItems here? I have not tested this much, but consider using the the PagedItems method that parses the responseHeaders as well, ie:
let (orders, responseHeaders) = try await enqueueWithResponseHeaders(request, mapper: mapper)
return createPagedItems(items: orders, responseHeaders: responseHeaders, currentPageNumber: pageNumber)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll check it out!
| let result = try await remote.searchPOSOrders(siteID: sampleSiteID, searchTerm: "test", pageNumber: 1, pageSize: 25) | ||
|
|
||
| // Then | ||
| XCTAssert(result.items.count == 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, should we use order-load-all for this test? As is always going to return the 4 orders no matter the searchTerm we pass through. Maybe is there some other file that fits better the test? Or a new response? Not a big deal in any case since we're checking that the function parses the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mm... There's actually not much to test here since our request expects the same type of Order that we already tested in other tests. Search query doesn't produce any special results. Only the second test is meaningful to verify that we're making the request with the expected parameters.
@iamgabrielma good catch, you're right. |

WOOMOB-1137
Description
Implemented Order List Search using the same patterns from Products and Coupons:
keywordto the orders endpoint, together filteringpos-rest-apiPOSSearchViewthat is displayed with animation when the search icon is tappedPointOfSaleOrderListController- not caching search results, showing cached list when the search is cleared, remembering the last selection if the search is closed.Steps to reproduce
Empty, error states are outside the scope
Testing information
Tested on iPad Air 18.5 Simulator
Screenshots
Simulator.Screen.Recording.-.iPad.Air.11-inch.M3.-.2025-09-05.at.15.25.21.mov
RELEASE-NOTES.txtif necessary.