-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Reports - "Nothing to show" shown on chats, when opening a message and returning. #56969
Comments
Triggered auto assignment to @maddylewis ( |
Job added to Upwork: https://www.upwork.com/jobs/~021891598421702594676 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-18 12:14:34 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Reports - "Nothing to show" shown on chats, when opening a message and returning What is the root cause of that problem?We display the "Nothing to show" message based on the shouldShowEmptyState condition. In this case, shouldShowEmptyState is true, which causes "Nothing to show" to be displayed. App/src/components/Search/index.tsx Lines 380 to 389 in 1eb00b0
When scrolling to the end of the list, we handle loading more items using the App/src/components/Search/index.tsx Lines 449 to 454 in 1eb00b0
NOTE: this issue does not relate step 'opening any message' What changes do you think we should make in order to solve the problem?We should update the condition for App/src/components/Search/index.tsx Line 256 in 1eb00b0
const shouldShowLoadingMoreItems = !shouldShowLoadingState && searchResults?.search?.isLoading
// Or check if searchResults?.search?.offset >= 0
const shouldShowLoadingMoreItems = !shouldShowLoadingState && searchResults?.search?.isLoading && searchResults?.search?.offset >= 0; Since we updated the App/src/components/Search/index.tsx Lines 536 to 543 in 1eb00b0
listFooterContent={
shouldShowLoadingMoreItems && searchResults?.search?.hasMoreResults ? (
<SearchRowSkeleton
shouldAnimate
fixedNumItems={5}
/>
) : undefined
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A, UI bug What alternative solutions did you explore? (Optional)
const fetchMoreResults = () => {
if (!searchResults?.search?.hasMoreResults || shouldShowLoadingState || shouldShowLoadingMoreItems || searchResults?.search?.isLoading) {
return;
}
setOffset(offset + CONST.SEARCH.RESULTS_PAGE_SIZE);
};
|
@linhvovan29546 I don't think I can reproduce it. My account has ~500 reports but couldn't find a way to reproduce. Do you have any trick or tip to reproduce this issue? Thanks |
My account has 100 reports, so I can easily reproduce the issue by continuously scrolling down
|
Thanks. I can now reproduce but couldn't reproduce it consistently. Will review the proposal later today. |
Updated proposal #56969 (comment) |
Reproducible steps: Precondition: Account has 50+ chats
OR easier steps:
When receiving new report actions, we perform a
With App/src/components/Search/index.tsx Line 243 in be56d24
After data is updated, we make changes to App/src/components/Search/index.tsx Line 453 in be56d24
This causes another App/src/components/Search/index.tsx Lines 198 to 204 in be56d24
Because we moved to end of search, increased offset will return empty data: ![]() Because data returned is an empty array, performing Existing proposal is another issue and their solution doesn't fix this issue. We should fix this issue in BE, returning empty object instead of empty array when offset is too high. Optionally we can fix the failure data in FE here to empty object as well: App/src/libs/actions/Search.ts Line 136 in be56d24
|
This comment has been minimized.
This comment has been minimized.
ProposalPlease re-state the problem that we are trying to solve in this issueReports - "Nothing to show" shown on chats, when opening a message and returning. What is the root cause of that problem?Note Note regarding reproducing the issueI can consistently reproduce with the following steps ⤵
The reason for seeing the 🛑 The main cause comes from this code block which does not work as expected, which is to keep a record of the This probably used to work when navigating to an individual chat report was done in a modal, which was keeping the 📓 Since navigation changed a lot, the logic is outdated and when the Search component remounts upon returning from the individual chat report page, we don't have any state data in the Additionally, this condition is also a cause because ![]() What changes do you think we should make in order to solve the problem?🟢 In order to fix the issue according to the Expected result and display the This means that when returning back from the individual chat report, this data will be available right away -> rendering the search list messages just like before the user navigated to the individual chat report. ♻ To do this, we have to implement the following main changes:
// ...under existing logic
const backTo = Navigation.getActiveRoute();
// ...add setParams
Navigation.setParams({
backTo,
...(Object.keys(currentSearchResults?.data ?? {})?.length > 0 && {lastNonEmptySearchResults: JSON.stringify(currentSearchResults)}),
});
const searchResults = Object.keys(currentSearchResults?.data ?? {})?.length > 0 ? currentSearchResults : lastNonEmptySearchResults;
🔄 This will ensure that the issue is fixed according to the Expected result by understanding the root cause. Note Here's a test branch with all changes for convenience: ikevin127-searchResultsNavigationCache. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?No need for automated tests since this is related to data cache functionality. Result videos (before / after)Android: Native
|
Still under reviewing |
@hungvu193 It looks like my proposal and steps are related to a different issue. If that's the case, could you help report it? I don't have access to Slack to do so. Thank you! Precondition: Account has 50+ chatsAction Performed:
Expected Result:The list should be displayed. Actual Result:The "Nothing to show" message appears after scrolling stops. Platforms:Android (Native) Version Number:Issue can be reproduced in production. media_20250220_142714_7736211243490200984.mp4 |
@linhvovan29546 I don't think I can reproduce it, I think you can try to create a post on #expensify-open-source |
I don't have access to Slack |
Please request to join slack:
|
I've requested before, but I still haven't joined 😔 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.99-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome
App Component: Other
Action Performed:
Expected Result:
The user should be able to keep scrolling through the messages on chats section after returning from any opened message.
Actual Result:
"Nothing to show" is displayed on chats section, after the user scrolls to the bottom of the section, opens any message and returns using device back button. User has to return to inbox and reopen "Chats" to see the messages list again.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6746011_1739817191453.Nothing.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hungvu193The text was updated successfully, but these errors were encountered: