Reports - Fallback WS avatar shown when clearing the "From" filter on "Submit" while offline#69869
Conversation
There was a problem hiding this comment.
Looking to address this fallback avatar appearing makes sense in principle, but I'm not sure about how this is being achieved by removing lastNonEmptySearchResults.current. @JS00001 @luacmartins @s77rt - does this seem kosher to you?
|
No clear idea. I'm more concerned about the existence of |
|
Not sure, maybe came from #65421? CC: @mountiny @SzymczakJ |
|
🤔 I'm a bit confused by this offline implementation. It looks like currently, if you're offline and select a search that you don't have cached, we show the results of old search, rather than a 'youre offline' message. @trjExpensify Is this the expected behavior when offline? |
The In fact I found the PR that introduced this concept, this is how it is explained here:
So to conclude, I think in offline mode we still show "you're offline" message and if we want to remove this |
|
Lets get Tom's opinion, but I think we should be showing the 'youre offline' screen for the 'fix' to this issue. I dont think we should be fixing the avatar, but rather, not letting the user get into that state at all |
Yep, I agree with that. 👍 Though, do we see this avatar bug on a cached search result as well potentially? |
|
We shouldnt, there was a PR to fix that thats on staging now: #69335 |
|
Ah okay, great. 👌 |
@JS00001 I think the solution from #69335 is just a workaround. The RCA is the |
|
Can you explain the RCA a bit more? |
|
@JS00001 The App/src/pages/Search/SearchPage.tsx Line 780 in f286e03 App/src/components/Search/index.tsx Line 289 in f286e03 Line 50 in f286e03 App/src/pages/Search/SearchPage.tsx Line 633 in f286e03 |
|
@mkzie2 I agree with all of that, my question though is what issues does that cause, and how? Once the issue has been defined, how would you fix it, and why would that fix work? |
@JS00001 That is the reason for the fallback avatar bug; the search item is the result of the previous data, but the child component gets the data of the current query. In our case, it's App/src/components/AvatarWithDisplayName.tsx Line 160 in 96e0102 App/src/components/ReportSearchHeader/index.tsx Lines 7 to 20 in 96e0102 Or another example is that the violation can be empty at this time. |
My suggestion is to remove |
|
That sounds okay to me. I agree w/ @s77rt , what was lastsearchresult being used for, whats the idea behind it and what happens if we remove it? |
|
Still finding the solution. |
|
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp69869_android_native.movAndroid: mWeb Chrome69869_android_web.moviOS: HybridApp69869_ios_native.moviOS: mWeb Safari69869_ios_web.movMacOS: Chrome / Safari69869_web_chrome.movMacOS: Desktop69869_web_desktop.mov |
JS00001
left a comment
There was a problem hiding this comment.
Can you address #69869 (comment) and then we can merge?
|
@JS00001 @carlosmiceli I 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/JS00001 in version: 9.2.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.2.17-6 🚀
|
Explanation of Change
Fixed Issues
$ #68821
PROPOSAL: #68821 (comment)
Tests
Prerequisite: Account has at least one workspace created.
Prerequisite 2: Delayed submissions enabled.
Offline tests
QA Steps
Prerequisite: Account has at least one workspace created.
Prerequisite 2: Delayed submissions enabled.
Expected Result:
After clearing the "From" filter on "Submit" section while offline, the user should be redirected to the new search results.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
desktop.mov
MacOS: Desktop
web.mov