-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add new SearchButton to all pages and tweak SearchRouter #49379
Add new SearchButton to all pages and tweak SearchRouter #49379
Conversation
c5ca3b4
to
584ac31
Compare
bbc400e
to
6cdeaae
Compare
3825dfe
to
83fab84
Compare
@@ -407,6 +397,20 @@ function getQueryHashFromString(query: SearchQueryString): number { | |||
return UserUtils.hashText(query, 2 ** 32); | |||
} | |||
|
|||
function getExpenseTypeTranslationKey(expenseType: ValueOf<typeof CONST.SEARCH.TRANSACTION_TYPE>): TranslationPaths { |
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.
only moved
* @private | ||
* traverses the AST and returns filters as a QueryFilters object | ||
*/ | ||
function getFilters(queryJSON: SearchQueryJSON) { |
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.
only moved
@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) |
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.
🟢 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 |
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.
LGTM
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 |
@@ -85,6 +85,7 @@ function AddressPage({title, address, updateAddress, isLoadingApp = true, backTo | |||
title={title} | |||
shouldShowBackButton | |||
onBackButtonPress={() => Navigation.goBack(backTo)} | |||
shouldDisplaySearchRouter |
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.
FYI, This caused this issue: #51009
@@ -261,6 +263,7 @@ function HeaderWithBackButton({ | |||
</PressableWithoutFeedback> | |||
</Tooltip> | |||
)} | |||
{shouldDisplaySearchRouter && <SearchButton />} |
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.
FYI, This caused this issue: #51077
Details
SearchButton
is added to almost every page (as listed in the design doc)ChatFinder
will be removed in a separate issueuseKeyboardShortcut
hook, since you can trigger search from router via Enter key, butuseKeyboardShortcut
consumed the ENTER keypress eventmisc notes:
WorkspacesListPage
andTroubleShootPage
were migrated touseOnyx
in compliance with new CI checkFixed Issues
$ #49122
$ #49118
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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