Add new SearchButton to all pages and tweak SearchRouter#49379
Add new SearchButton to all pages and tweak SearchRouter#49379luacmartins merged 10 commits intoExpensify:mainfrom
Conversation
c5ca3b4 to
584ac31
Compare
bbc400e to
6cdeaae
Compare
3825dfe to
83fab84
Compare
| return UserUtils.hashText(query, 2 ** 32); | ||
| } | ||
|
|
||
| function getExpenseTypeTranslationKey(expenseType: ValueOf<typeof CONST.SEARCH.TRANSACTION_TYPE>): TranslationPaths { |
| * @private | ||
| * traverses the AST and returns filters as a QueryFilters object | ||
| */ | ||
| function getFilters(queryJSON: SearchQueryJSON) { |
|
@ikevin127 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] |
|
@luacmartins originally I planned for this PR to be something else, but now the scope changed a bit. I'll check why reassure tests fail on Monday |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb ChromeUploading android-mweb.mov… iOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
Note Observations
Please confirm whether all of the above are expected. |
I think it should be present there too.
I think this one is expected for now, since those pages will have a full width search bar instead of the magnifying glass icon
This is expected since at that point the user is seeing a custom search |
Great question. I think we'll always want it on the right to ensure the router stays consistently in the top right corner when it opens. |
Yeah I made a similar assumption and I'm always putting it furthest to the right on all the views. |
|
@ikevin127 @luacmartins icon added to Subscription page As for the other two like Carlos said they are expected. LHN items are only highglighted when you are on the exact query that the buttons link to, so There is a separate PR to add full width input to Search Results page, and that is why we don't need 🔍 there. (See #49462) |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 This is looking good, I just verified that the search button was added to the Subscription page.
@Kicu SearchButton which does not seem to be mocked given the error message of the failing performance test:
● [ReportScreen] should render report list
TypeError: _Permissions.default.canUseNewSearchRouter is not a function
15 | const {openSearchRouter} = useSearchRouterContext();
16 |
> 17 | if (!Permissions.canUseNewSearchRouter()) {
| ^
18 | return;
19 | }
20 ||
Unrelated jest tests are failing on main too. Gonna wait for a fix before we merge this PR. |
|
Main merged and the missing mock in perf tests fixed, thanks for pointing this out @ikevin127 Now the If nothing else fails then I think we're good to go. |
|
Failing tests are unrelated to the changes in this PR, merging. |
|
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ 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.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.40-6 🚀
|
|
FYI, We should remove the magnifying glass button from the report header when the report is opened in the RHP. Issue: #50963 |
| title={title} | ||
| shouldShowBackButton | ||
| onBackButtonPress={() => Navigation.goBack(backTo)} | ||
| shouldDisplaySearchRouter |
| </PressableWithoutFeedback> | ||
| </Tooltip> | ||
| )} | ||
| {shouldDisplaySearchRouter && <SearchButton />} |


Details
SearchButtonis added to almost every page (as listed in the design doc)ChatFinderwill be removed in a separate issueuseKeyboardShortcuthook, since you can trigger search from router via Enter key, butuseKeyboardShortcutconsumed the ENTER keypress eventmisc notes:
WorkspacesListPageandTroubleShootPagewere migrated touseOnyxin compliance with new CI checkFixed Issues
$ #49122
$ #49118
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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.Screenshots/Videos
Android: Native
rec-andr-searchb.mp4
Android: mWeb Chrome
iOS: Native
rec-ios-searchb.mp4
iOS: mWeb Safari
https://github.com/user-attachments/assets/e9eb66ff-03af-4fde-a497-8770b7c6dff5MacOS: Chrome / Safari
rec-web-searchb.mp4
MacOS: Desktop