Minimal server search / enable improved focus mode - #27819
Conversation
|
@roryabraham @aldo-expensify taking this out of draft to start some reviews... Still waiting on:
It's been testing well for me locally more or less. One thing that was missed is that when we switch the priority mode from "#focus" to "Most recent" we need to return all the chats so that view can be populated. This situation is possible:
The obvious solution seems to be to just get and send all the chats via Pusher when the priority mode changes, but I am not actually sure if it would be a problem to send these large payloads via Pusher... will think more about it. I think it's not much of a blocker to do some testing on an Ad Hoc build. But maybe we want to hold merging this until there's a solution for that. My plan after the review is done is to do an Ad Hoc build - but not merge this PR until:
|
|
@hoangzinh 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] |
|
as we go, I will also add some more manual test steps for checking to see that the correct focus mode chats will come back when signing in. |
|
Looks like https://github.com/Expensify/Web-Expensify/pull/38916 is now on staging 🎉 . Does that mean this PR is now off hold? |
|
@marcaaron no need to keep holding on https://github.com/Expensify/Web-Expensify/pull/38916, right? since it hit staging already |
|
🎯 @hoangzinh, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #29046. |
Beamanator
left a comment
There was a problem hiding this comment.
Code looks good, but we're missing a few new proptypes, no?
|
@Beamanator thanks for the review ❤️ ! Made the changes 🙇 |
Beamanator
left a comment
There was a problem hiding this comment.
Looks great and is working well here! But there's conflicts :'(
And I wonder if @roryabraham wants to review before I merge? Aldo is OOO i beleive
|
I think they are both OOO |
roryabraham
left a comment
There was a problem hiding this comment.
Not officially requesting changes because I don't want to delay this while I'm OOO, but I had a few comments that maybe should be addressed. Don't think anything will blow up if they're not addressed
| /** | ||
| * @param {string} searchInput | ||
| */ | ||
| function searchInServer(searchInput) { |
There was a problem hiding this comment.
NAB
| function searchInServer(searchInput) { | |
| function searchForReportsInServer(searchInput) { |
There was a problem hiding this comment.
it's already Report.searchInServer() so you would have Report.searchForReportInServer() 🤷
There was a problem hiding this comment.
true that reads a bit funky
| initWithStoredValues: false, | ||
| }, | ||
| network: { | ||
| key: ONYXKEYS.NETWORK, |
There was a problem hiding this comment.
I think we should use the withNetwork HOC instead of withOnyx. Also ONYXKEYS.NETWORK should typically be initWithStoredValues: false, because we don't have any reason to think that the persisted value for isOffline should be accurate the next time the user opens the app.
There was a problem hiding this comment.
Updating to withNetwork since it will reduce a subscription.
But there are so many places where we do not consider this...
we don't have any reason to think that the persisted value for isOffline should be accurate the next time the user opens the app
nothing super bad happens AFAICT
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
…y/App into marcaaron-minimalSearch
|
Updated! |
|
✋ 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/Beamanator in version: 1.3.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 1.3.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
Details
Adds server assisted searching to the "Search" page.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/318005
$ https://github.com/Expensify/Expensify/issues/318006
Tests
The tests here are primarily designed to prove that we can return reports that hit on the following search queries from Auth...
SearchForReportscommand returns the Concierge reportSearchForReportsfirstNamefield of the personal details to "Bob"Test that switching from "#focus" to "Most recent" will restore chats
Offline tests
QA Steps
(probably Internal so that we can help verify)
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)/** 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)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android