-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix Reports back and refresh behavior #58495
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
Fix Reports back and refresh behavior #58495
Conversation
…/56969-reports-back-behavior
@hungvu193 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] |
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.
Looking good. I have a concern about useSearchHightlightAndScroll
hook
src/components/Search/index.tsx
Outdated
return; | ||
} | ||
|
||
setOffset(0); |
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.
Would you mind adding a comment to explain this here?
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.
Done - c51078f.
@@ -53,7 +55,7 @@ function useSearchHighlightAndScroll({searchResults, transactions, previousTrans | |||
const hasReportActionsIDsChange = !isEqual(reportActionsIDs, previousReportActionsIDs); | |||
|
|||
// Check if there is a change in the transactions or report actions list | |||
if ((!isChat && hasTransactionsIDsChange) || (isChat && hasReportActionsIDsChange)) { | |||
if (isFocused && ((!isChat && hasTransactionsIDsChange) || (isChat && hasReportActionsIDsChange))) { |
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.
I believe isFocused
was added here to avoid unnecessary search
API calls. However, if we open a report and another person submits an expense while the report is opening, we won't receive that expense because the Search screen is not focused and search
API was ignored.
Screen.Recording.2025-03-18.at.13.38.34.mov
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.
I've synced it up. |
Thanks. Reviewing shortly 👀 |
I got crashed on Safari while trying to over scroll to the bottom, also I can still reproduce the bug 🤔 Screen.Recording.2025-03-19.at.22.29.26.movScreen.Recording.2025-03-19.at.22.30.33.mov |
Working on the fix. |
I am actively working on the fix and have a couple of ideas. Currently checking which one is better. Going to push them tomorrow. |
Oops we have conflicts @rezkiy37 |
…/56969-reports-back-behavior
…r improved row visibility tracking.
…ity tracking" This reverts commit 0606ac3.
@hungvu193 They have changed the scroll component. So, I needed to reintegrate it for the newly implemented one. I think we need to do a retest round. I will do it as well. |
Cool. Thanks for the update! |
…allback for improved row visibility tracking.
I works properly now. |
I'll retest again later today |
…/56969-reports-back-behavior
I've synced it up and fixed conflicts. |
I'm again struggling with my ios build, asking for help in #expert-contributor group. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-24.at.10.38.27.movAndroid: mWeb ChromeScreen.Recording.2025-03-24.at.10.47.09.moviOS: NativeScreen.Recording.2025-03-29.at.15.56.23.moviOS: mWeb Safarisafari.movMacOS: Chrome / SafariScreen.Recording.2025-03-18.at.13.21.12.movScreen.Recording.2025-03-18.at.13.17.29.movMacOS: Desktop |
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
…/56969-reports-back-behavior
I've synced it up. |
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.
Is there any possible unit test that can be added to show the bug exists and that this PR fixes it?
…/56969-reports-back-behavior
I've synced it up. |
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.
Thank you!
✋ 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/tgolen in version: 9.1.23-1 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.23-7 🚀
|
Explanation of Change
The PR fixes the "Nothing to show" bug when opening a message and returning it. Also, it changes the refresh behavior and the app does not scroll the list to the very top. Once the user reaches the very top of the list it automatically fetches updates. It prevents the list jumps when some updates have been fetched.
Fixed Issues
$ #56969
PROPOSAL: N/A
Tests
Fix "Nothing to show" shown on chats
Highlight newly added expense
Highlight newly added message
Offline tests
Fix "Nothing to show" shown on chats
Highlight newly added expense
Highlight newly added message
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Android.mp4
Android: mWeb Chrome
Android.Chrome.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
IOS.Safari.mp4
MacOS: Chrome / Safari
Chrome.mp4
Chrome.Chats.mp4
Chrome.Expenses.mp4
MacOS: Desktop
Desktop.mp4