Skip to content
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

[PAID] [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling #43396

Closed
4 of 6 tasks
m-natarajan opened this issue Jun 10, 2024 · 47 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 10, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when validating #43206
Version Number: 1.4.81-1
Reproducible in staging?: y
Reproducible in production?: no , new feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Navigate to https://staging.new.expensify.com/

  2. Log in with an account that has a lot of expenses

  3. Open Search

  4. Scroll down multiple times

Expected Result:

Skeleton loader should always show when it's loading data.

Actual Result:

Sometimes blank space appears instead of skeleton loader when scrolling

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6508205_1718032227825.az_recorder_20240610_170155.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bb69abaa0bdb0869
  • Upwork Job ID: 1800230851436781734
  • Last Price Increase: 2024-06-10
  • Automatic offers:
    • ahmedGaber93 | Reviewer | 102732933
Issue OwnerCurrent Issue Owner: @strepanier03
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jun 10, 2024

Triggered auto assignment to @aldo-expensify (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jun 10, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@m-natarajan
Copy link
Author

@aldo-expensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@luacmartins luacmartins changed the title Search - Sometimes blank space appears instead of skeleton loader when scrolling [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling Jun 10, 2024
@luacmartins luacmartins removed the DeployBlocker Indicates it should block deploying the API label Jun 10, 2024
@luacmartins
Copy link
Contributor

hmm I think this might be a performance issue, where mobile clients struggle to keep up with a huge list of items. I'm gonna demote this to NAB since it doesn't break the feature.

@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jun 10, 2024
@luacmartins luacmartins added the External Added to denote the issue can be worked on by a contributor label Jun 10, 2024
@melvin-bot melvin-bot bot changed the title [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01bb69abaa0bdb0869

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

@melvin-bot melvin-bot bot added the Overdue label Jul 2, 2024
Copy link

melvin-bot bot commented Jul 4, 2024

@Kicu, @strepanier03, @luacmartins, @ahmedGaber93 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@ahmedGaber93
Copy link
Contributor

We are still discussing the possible solution

@Kicu
Copy link
Contributor

Kicu commented Jul 5, 2024

I wanted to take a look at it this week, however I got tangled with react concurrent mode followups and bugs, navigation bugs and Search actions implementation.
Will return to this next week.

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

@Kicu @strepanier03 @luacmartins @ahmedGaber93 this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

@Kicu, @strepanier03, @luacmartins, @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@Kicu
Copy link
Contributor

Kicu commented Jul 9, 2024

Some loose thoughts from me
@luacmartins

We know from investigation by @zfurtak with some help from @j-piasecki that what happens is definitely because the render of 1 list item takes a long time. (#43396 (comment)).

There is no easy way to try to use React.memo to help with this, because basically whenever any prop changes we need to re-render. This view is quite heavy with a lot of data that we want ot be fresh. Whenever props like isSelected, any part of data of item changes - we need to re-render. So the implementation of comparator for memo would be basically "check every prop" - which gives us nothing.

Next: IMO unfortunately part of the problem is how the component SelectionList was written. There is no simple way to pass any extra props or functions to the rendered components. Every piece of data has to be added to the item being rendered itself. Because of that we have this function https://github.com/Expensify/App/blob/main/src/libs/SearchUtils.ts#L146-L151 that does a lot of work. It makes the whole search flow from Search component to the list itself to the items be less flexible, and its harder to experiment.

That being said the actual problem is still inside the render of Items, and I believe Search component itself doesn't rerender that often, and specifically it should not rerender when we scroll.
I have 2 new ideas:

If these 2 things give us nothing, then we might want to start considering usage of some other list implementation FlashList etc for Search.
Search is the list that has the most complex items inside I think. And within this items are interactive buttons, potentially images (receipts) etc - so this might be the use case for a different List component.

@melvin-bot melvin-bot bot removed the Overdue label Jul 9, 2024
@luacmartins
Copy link
Contributor

Thanks for the detailed breakdown @Kicu! I think we can start with the memoize solutions you laid out and check if that improves anything. If that doesn't work, we might wanna profile this view and see which functions are taking the most resources and look for ways to improve those before we move to a different list component, since that's also not a guarantee that we'd fix the issue.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Jul 10, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling [HOLD for payment 2024-07-24] [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-24. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 17, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ahmedGaber93] The PR that introduced the bug has been identified. Link to the PR:
  • [@ahmedGaber93] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ahmedGaber93] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ahmedGaber93] Determine if we should create a regression test for this bug.
  • [@ahmedGaber93] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ahmedGaber93
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ahmedGaber93] The PR that introduced the bug has been identified. Link to the PR: Fix wrong scrolling in Search list when navigating by keyboard #43490
  • [@ahmedGaber93] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: No need, current issue already fixed by them
  • [@ahmedGaber93] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • [@ahmedGaber93] Determine if we should create a regression test for this bug. No
  • [@ahmedGaber93] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

This is an improvement performance issue, I think no need for regression test.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 23, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-07-24] [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling [PAID] [$250] [Search v1] - Sometimes blank space appears instead of skeleton loader when scrolling Jul 24, 2024
@strepanier03
Copy link
Contributor

Paid and closed the contract in Upwork, thank you for the checklist @ahmedGaber93!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

10 participants