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

[HOLD for payment 2024-07-30] [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox #44587

Closed
3 of 6 tasks
lanitochka17 opened this issue Jun 28, 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. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 28, 2024

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.3-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com/settings/preferences/priority-mode
  2. Click Account settings
  3. Go to Inbox
  4. Go to Search

Expected Result:

In Step 2, avatar will be instantly highlighted when clicking on Account settings
In Step 4, Search page will open instantly

Actual Result:

In Step 2, avatar is not instantly highlighted when clicking on Account settings
In Step 4, Search page opens with blank page for a few seconds

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

Add any screenshot/video evidence

Bug6526861_1719530887474.20240628_070751.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011ff0642a6c2f2946
  • Upwork Job ID: 1806537464995654813
  • Last Price Increase: 2024-06-28
  • Automatic offers:
    • ikevin127 | Reviewer | 102989312
Issue OwnerCurrent Issue Owner: @lschurr
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jun 28, 2024
Copy link

melvin-bot bot commented Jun 28, 2024

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

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.

@lanitochka17
Copy link
Author

@robertjchen 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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@robertjchen robertjchen added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Jun 28, 2024
Copy link

melvin-bot bot commented Jun 28, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011ff0642a6c2f2946

@melvin-bot melvin-bot bot changed the title Settings - Delay in avatar highlight and blank Search page when opening from Inbox [$250] Settings - Delay in avatar highlight and blank Search page when opening from Inbox Jun 28, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 28, 2024
Copy link

melvin-bot bot commented Jun 28, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

In Step 2, avatar is not instantly highlighted when clicking on Account settings
In Step 4, Search page opens with blank page for a few seconds

What is the root cause of that problem?

The check to show loading isn't correct.

const isLoadingItems = (!isOffline && isLoadingOnyxValue(searchResultsMeta)) || searchResults?.data === undefined;

isLoadingOnyxValue(searchResultsMeta) is only true at the first time this key is loaded in Onyx. So after the first time we open the search page, the blank will appear when the search API is called.

About the delay bug, I think it maybe related here https://expensify.slack.com/archives/C01GTK53T8Q/p1719497873778469

What changes do you think we should make in order to solve the problem?

We should change to show the loading if the onyx value is loading or the search api is calling

const isLoadingItems = (!isOffline && (isLoadingOnyxValue(searchResultsMeta) || currentSearchResults?.search.isLoading)) || searchResults?.data === undefined;

const isLoadingItems = (!isOffline && isLoadingOnyxValue(searchResultsMeta)) || searchResults?.data === undefined;

What alternative solutions did you explore? (Optional)

NA

@mountiny
Copy link
Contributor

cc @luacmartins

@luacmartins
Copy link
Contributor

I wonder if we can simplify the loading condition to just !isOffline && searchResults?.data === undefined. I think we should have data defined in all other instances when we got a response from the API so that would either display the empty state or the data

@luacmartins luacmartins self-assigned this Jun 28, 2024
@luacmartins luacmartins changed the title [$250] Settings - Delay in avatar highlight and blank Search page when opening from Inbox [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox Jun 28, 2024
@ikevin127
Copy link
Contributor

@luacmartins' suggestion is a definite improvement on the Search page loading logic.

Regarding the bottom tam navigator tab switch UI delay, it still happens and I checked the slack discussion about the recent introduction of React StrictMode and this does not seem to be the issue as the behaviour is also present on latest staging.

Not sure which direction we should move forward with this issue:

  1. Go with nkdengineer's proposal which would only improve the Search page loading logic.
  2. Keep looking for proposals for one that would fix the issue entirely including the bottom tab navigator tab switch delays.

cc @mountiny @robertjchen

@Zakpak0
Copy link
Contributor

Zakpak0 commented Jul 2, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

On the Expensify Website, the bottom tab navigator has a significant delay when switching tabs.

(a) The Account avatar is not highlighted immediately.

(b) The search tab renders content after an unwarranted delay.

What is the root cause of that problem?

(a) The navigation state is not being reported to child components promptly.

(b) Rendering logic needs to be improved for the search tab.

What changes do you think we should make in order to solve the problem?

(a)
Within the tab navigator component, the current route is being reported via the ActiveTabContext.
We can utilize this to fix our problem with a few edits.
This should be renamed to ActiveBottomTabContext as it only ever reports the state of the bottom tab.
Additionally, the navigation state currently fed to this Context is a bit limited in scope.
It should be expanded to report all changes to the bottom tabs vs just the routes that are referred to as CentralPlaneRoutes
Now when we useContext in our child components we will get an immediate report and re-render the state. This will show the Account avatar highlighted immediately on tab change, rather than after a delay.

(b) Apply the solution provided in comment by @luacmartins

The solution can be reviewed here on my test branch

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Jul 2, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox [HOLD for payment 2024-07-24] [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox 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:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jul 18, 2024
@ikevin127
Copy link
Contributor

@luacmartins @robertjchen Can you please add the Bug label to assign somebody for payments ?

Note: I don't think we need a BZ Checklist here since the issue wasn't caused by any recent PR, but instead it's more of a performance improvement task.

@robertjchen robertjchen added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

Triggered auto assignment to @lschurr (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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Jul 22, 2024
@lschurr
Copy link
Contributor

lschurr commented Jul 24, 2024

@Zakpak0 - can you link your Upwork profile here so that I can send along the offer?

@lschurr
Copy link
Contributor

lschurr commented Jul 24, 2024

Payment summary:

@Zakpak0
Copy link
Contributor

Zakpak0 commented Jul 24, 2024

@Zakpak0 - can you link your Upwork profile here so that I can send along the offer?

@lschurr sure https://www.upwork.com/freelancers/~0144a75be415af6251

@ikevin127
Copy link
Contributor

@lschurr 👋 Before closing here, there's one more payment due on 30th coming from a follow-up polishing PR #45663 which I reviewed. More context on the payment due date here and confirmation that it should be handled in this issue from Carlos in #45663 (comment).

⚠️ Looks like automation failed -> reason for which the 2nd payment due date wasn't added to this issue automatically.

@lschurr
Copy link
Contributor

lschurr commented Jul 26, 2024

@lschurr
Copy link
Contributor

lschurr commented Jul 26, 2024

I'll change the date in the title for the other payment that's due on the 30th. That PR was created by @WojtekBoman and reviewed by @ikevin127 - so we just need payment for you, right Kevin?

@ikevin127
Copy link
Contributor

@lschurr Yes, only for me as reviewer since the author is from SWM. Thank you!

@lschurr lschurr changed the title [HOLD for payment 2024-07-24] [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox [HOLD for payment 2024-07-30] [$250] [Search v1] Settings - Delay in avatar highlight and blank Search page when opening from Inbox Jul 26, 2024
@lschurr lschurr added Weekly KSv2 and removed Daily KSv2 labels Jul 26, 2024
@ikevin127
Copy link
Contributor

cc @lschurr

@lschurr
Copy link
Contributor

lschurr commented Jul 30, 2024

@ikevin127 - I added a bonus rather than sending a new offer on this one.

Additional $250 paid in Upwork for this PR.

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. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

9 participants