[Search v2.5] Allow Searching for multiple statuses#52185
Conversation
|
@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
BUG: Users can deselect all statuses which makes sortBy:data as a status when users select a new status


Also, I think we want to keep the default behavior as selecting a single status. Maybe we can add a keyboard shortcut, e.g. press cmd or long press on mobile to allow selecting multiple statuses in the UI. cc @JmillsExpensify
Screen.Recording.2024-11-07.at.10.16.20.AM.mov
@luacmartins I've reverted my changes so only a single status can be selected. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2024-11-08.at.10.00.19.AM.movAndroid: NativeAndroid: mWeb ChromeiOS: NativeScreen.Recording.2024-11-08.at.10.10.29.AM.moviOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.60-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.60-3 🚀
|
| const isDataLoaded = | ||
| searchResults?.data !== undefined && searchResults?.search?.type === type && Array.isArray(status) | ||
| ? searchResults?.search?.status === status.join(',') | ||
| : searchResults?.search?.status === status; |
There was a problem hiding this comment.
Might be related, when searching with conflicting queries backend responds with an error. We didn't handle this case and page shows loading infinitely. #52907
Explanation of Change
Handle multiple statuses
Screen.Recording.2024-11-08.at.10.43.46.mov
Fixed Issues
Frontend part of #51838
Tests
Prerequisite: having a workspace with expenses in different statuses (e.g
drafts,outstandingetc).Searchpage{url}/search?q=type%3Aexpense%20status%3Aoutstanding,drafts%20sortBy%3Adate%20sortOrder%3AdescQA Steps
Same as in tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-11-08.at.10.43.46.mov
MacOS: Desktop