Repository navigation
Suggested Search - #62851
Suggested Search#62851
Conversation
…ions Suggested Search & Filter Revamp
…ions Suggested Search & Filter Revamp
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@ZhenjaHorbach 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] |
|
🚧 @JS00001 has triggered a test app build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
✋ 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.1.55-0 🚀
|
|
I suspect this PR caused the Deploy Blocker assigned to me here (it has an Hourly label applied). I think the problem could be this part. Maybe we are not filtering out the personal policy? Though, I also see that is also gated behind a |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.1.56-2 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.1.58-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.1.58-4 🚀
|
| // Get a list of all options/personal details and filter them by the current search term | ||
| const listData = useMemo(() => { | ||
| const optionsList = getValidOptions( | ||
| { | ||
| reports: options.reports, | ||
| personalDetails: options.personalDetails, | ||
| }, | ||
| { | ||
| selectedOptions, | ||
| excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT, | ||
| includeSelectedOptions: true, | ||
| includeCurrentUser: true, | ||
| }, | ||
| ); |
There was a problem hiding this comment.
At the time of write. This caused an inconsistency with the from RHP filter SearchFiltersParticipantsSelector.
- SearchFiltersParticipantsSelector: The current user option was obtained separately via
currentUserOptionreturned fromOptionsListUtils.filterAndOrderOptions - UserSelectPopup: The current user option was obtained from the returned personal details list (just like any other account).
The former had extra search terms (you) so you could find your account easily however the later didn't and searching for you didn't return the expected results.
FWIW, now we are using the personal details to return the current user option and added the missing search terms here #67071
Coming from #63856
| <SelectionList | ||
| canSelectMultiple | ||
| textInputAutoFocus={false} | ||
| shouldClearInputOnSelect={false} |
There was a problem hiding this comment.
Selecting search result should have cleared the input: #63575
| const filterFormValuesKey = JSON.stringify(filterFormValues); | ||
|
|
||
| const openAdvancedFilters = useCallback(() => { | ||
| updateAdvancedFilters(filterFormValues); |
There was a problem hiding this comment.
Coming from #68127, we should use
Onyx.set(ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM, values); here to reset all data

Explanation of Change
Implemented suggested search! See below for the expected behavior.
Fixed Issues
$ #61112
$ #61114
$ #61116
$ #61117
$ #61189
Tests
Test all variations of search. The following are supposed to be in the LHN:
Expenses, Reports, Chats: Always in LHN
'Submit' - Only in LHN when user is in a workspace
'Approve' - Only when a user is the policys 'approver', OR the user is the 'submitsTo' value for another user
'Pay' - Only when the user is a workspace admin
'Export' - Only when the user is an exporter for one of the accounting integrations
Ensure that all expected results show up, ensure that all new 'filter dropdowns' show the expected behavior and behave as expected, ensure that the new 'Filters' button works & has the expected behavior
Similarly, the following should be tested and verified to be working/not broken or buggy:
ajnsdjkaskjand then clicking the 'clear' button actually clears the inputQA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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
Screen.Recording.2025-05-09.at.11.59.29.AM.mov
Screen.Recording.2025-05-09.at.11.42.49.AM.mov
Screen.Recording.2025-05-09.at.11.35.58.AM.mov