Update SearchPageHeaderInput to display recent search and chats#53198
Conversation
8e813c9 to
4ee583b
Compare
549ff19 to
3b68543
Compare
3b68543 to
fc50688
Compare
|
Reviewing now |
|
@rojiphil I have pushed 1 additional commit with the changes suggested by @blazejkustra |
Thanks @Kicu for the update.
The above-mentioned case is implemented for 53198-initialquery-issue.mp4 |
|
Yes you're right, thanks for pointing this out.
I think it makes some sense because if you're on But it could be considered confusing. Do you have any thought @luacmartins ? |
|
This is an interesting case. I think the empty first item is confusing. I'd just remove it to make it consistent with the router. |
|
Ok I will remove the empty item, however there was a convo about this here: https://swmansion.slack.com/archives/C06ML6X0W9L/p1732623340138529, and Vit suggested it's confusing for him. |
bb85e0e to
9675b9c
Compare
|
@rojiphil I added the change suggested by Carlos (no empty item), and fixed newest conflicts with main. I did a |
|
@rojiphil let's prioritize reviewing this PR once you're available |
| return; | ||
| } | ||
|
|
||
| // TODO remove special handling of policyID after navigation is merged https://github.com/Expensify/App/pull/49539 |
There was a problem hiding this comment.
I created an issue for this. Let's remove the comment - #53480
|
Awesome job on this one! |
|
✋ 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.73-0 🚀
|
|
Found KI on mWeb only - issue #53783 |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.73-8 🚀
|
|
This had a regression: which was confirmed by author in follow-up PR #53859 description. |
|
Agree that was a regression. But we addressed multiple issues at once here and there was quite a lot of quality work that went into the PR. |
@ikevin127 Yeah, and next time, please tag me also for regression issues where I am the original PR reviewer and as mentioned in the C+ Process Doc here. Thanks. |
I concur that we should not avoid the penalty as this would set a precedent for both past / future issues, when the rules are clear on regressions regardless of how many test cases were included in PR description (as long as they were included).
Sure, I'll try to be more careful next time - hopefully will not get a penalty for this 🤕 |
Oh! What I meant is that as per the process, there is a provision to increase the compensation when there is more work involved. And usually, I take this up at the time of payment considering the entire issue holistically. |
I don't think it matters how you word it, it's the same thing since you are only asking for increase after the regression was brought to your attention, not before you started the review, Not sure what the procedure is on issues that don't have a set price, as far as I know it's $250 unless an increase was asked for, justfied and granted before starting the PR review (at least that would make sense to me), during issue / proposal review. Maybe I'm missing something though! |
|
@ikevin127 As per the process, I think it's incorrect to say |
|
I think it's fine to keep the original amount in this case given the workload for the original issue. |
| /> | ||
| )} | ||
| {(isDataLoaded || !!debouncedInputValue) && ( | ||
| {isRecentSearchesDataLoaded && ( |
| // When user is on `/search` page we focus the Input instead of showing router | ||
| const toggleSearch = () => { | ||
| const isUserOnSearchPage = isSearchTopmostCentralPane(); |
There was a problem hiding this comment.
Coming from #59643, We have a case when isSearchTopmostCentralPane is true but user is not on search page, he is in multiple expenses report, which cause no action after CMD + K is pressed
| useEffect(() => { | ||
| ReportUserActions.searchInServer(autocompleteQueryValue.trim()); | ||
| }, [autocompleteQueryValue]); |
There was a problem hiding this comment.
The autocompleteQueryValue contains filters that shouldn't be passed to the BE report search endpoint as they are irrelevant and causes two identical search values to be treated differently resulting in 2 API calls e.g.
type:expense status:all group-by:reports ExpenseReportNametype:expense status:drafts group-by:reports ExpenseReportName
In both queries the report that we are searching for is ExpenseReportName. That's all what we should send to the server and only do it once.
Coming from #60336

Explanation of Change
This PR refactors SearchPageHeaderInput and SearchRouter, to put all (expect contextual search) Router features into the Input on Search results.
Also when
cmd+kshortcut is used while on Search Results Page, then we will focus on the Input and not show the Router.Fixed bugs
Other things
I'm providing a video which shows that from the perspective of Search list components there is exactly 1 render, which introduces all the items, and there is nothing weird happening with data lengths. Thus the source of the flicker is most likely inside
SelectionList, and I'd prefer to not change this list in this PRflicker with console logs of renders
rec-web-list-flicker.mp4
Fixed Issues
$ #53126
PROPOSAL:
Tests
Offline tests
QA 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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
Android focus bug fixrec-andr-focus-bug.mp4
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
rec-search-web.mp4
MacOS: Desktop