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-10-17] [$250] Book travel - Book travel animation becomes blank while RHP is dismissed #49744

Closed
6 tasks done
lanitochka17 opened this issue Sep 25, 2024 · 43 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

@lanitochka17
Copy link

lanitochka17 commented Sep 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.40-0
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
Email or phone of affected tester (no customers): applausetester+kh230901@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open FAB
  3. Click Book travel
  4. Dismiss the RHP

Expected Result:

Book travel animation will not become blank while RHP is dismissed

Actual Result:

Book travel animation becomes blank while RHP is dismissed

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

Bug6615160_1727291080522.20240926_020845.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021840763606281462254
  • Upwork Job ID: 1840763606281462254
  • Last Price Increase: 2024-09-30
  • Automatic offers:
    • suneox | Reviewer | 104245520
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @sakluger
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Sep 25, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

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

@rushatgabhane
Copy link
Member

don't know what caused it, but def NOT A BLOCKER

@Nodebrute
Copy link
Contributor

This happens with all the animations, like on the wallet, security, and troubleshoot pages.

@rushatgabhane
Copy link
Member

let's close 😄

@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 25, 2024
@MonilBhavsar
Copy link
Contributor

Thanks for looking! Demoting from blocker, but let's try if we can fix it

@neonbhai
Copy link
Contributor

Proposal

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

Default name in name field displays user/report ID instead of user/report name

What is the root cause of that problem?

This happens as we render an empty view here if the user has navigated away. The issue we set hasNavigatedAway quickly before the RHP animation has been completed. This then shows the user an empty view while RHP is dismissing.

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

We will change the state change here: to run after interactions, which will make it wait for the animation to be completed:

// If the page navigates to another screen, the image fails to load, app is in background state, animation file isn't ready, or the splash screen isn't hidden yet,
// we'll just render an empty view as the fallback to prevent
// 1. memory leak, see issue: https://github.com/Expensify/App/issues/36645
// 2. heavy rendering, see issues: https://github.com/Expensify/App/issues/34696 and https://github.com/Expensify/App/issues/47273
// 3. lag on react navigation transitions, see issue: https://github.com/Expensify/App/issues/44812
if (
hasNavigatedAway ||

InteractionManager.runAfterInteractions(() => {
    setHasNavigatedAway(true);
});

Result

Screen.Recording.2024-09-26.at.2.36.22.AM.mov

@rushatgabhane
Copy link
Member

rushatgabhane commented Sep 25, 2024

@MonilBhavsar @neonbhai the reasons mentioned here suggest that we should do nothing. Or it may cause issues 1, 2, 3

But I guess that is only the case when the image hasn't loaded

// If the page navigates to another screen, the image fails to load, app is in background state, animation file isn't ready, or the splash screen isn't hidden yet,
// we'll just render an empty view as the fallback to prevent
// 1. memory leak, see issue: https://github.com/Expensify/App/issues/36645
// 2. heavy rendering, see issues: https://github.com/Expensify/App/issues/34696 and https://github.com/Expensify/App/issues/47273
// 3. lag on react navigation transitions, see issue: https://github.com/Expensify/App/issues/44812
if (
hasNavigatedAway ||

@MonilBhavsar
Copy link
Contributor

Since this was reported as a regression, may be it comes from #48040 🤔
Going to check

@MonilBhavsar
Copy link
Contributor

Not reproducible after reverting #48040
@Krishna2323 @hungvu193 if you could please take a look

@hungvu193
Copy link
Contributor

Not reproducible after reverting #48040 @Krishna2323 @hungvu193 if you could please take a look

No. It came from this one (#48444). It shows empty view while navigating away.

hasNavigatedAway ||

Long story short, While working on #48040 with @Krishna2323, we found a bug, and it from PR of #47273, I commented there #47273 (comment). After that, the contributor of #47273 submitted another PR to fix the issue that we found which is #48444

@MonilBhavsar
Copy link
Contributor

#48444 was deployed to production 2 weeks ago and this bug was only reproducible on staging. I don't think so it has caused this, unless I am missing something.

The bug stems from one of the PR from checklist #49662

@hungvu193
Copy link
Contributor

hungvu193 commented Sep 28, 2024

#48444 was deployed to production 2 weeks ago and this bug was only reproducible on staging. I don't think so it has caused this, unless I am missing something

It's because we used static images for the BookTravel placeholder before. We switched to use LottieAnimation recently that's why you saw this issue. This issue will happen with any RHP that has Lottie animation because we hide them while navigating away to fix #47273
cc @QichenZhu and @suneox

@QichenZhu
Copy link
Contributor

@hungvu193 Previously, playing animations in the background made the user interface unresponsive (#47273), so we stopped them after navigating away.

Now, after some updates in the app (possibly the RN upgrade), performance has improved. Although background animations still consume CPU, they no longer make the interface unresponsive.

If the high CPU usage is acceptable, we could allow animations to play in the background again.

cc @suneox

@suneox
Copy link
Contributor

suneox commented Sep 28, 2024

I commented there #47273 (comment).

@hungvu193 I have another comment to verify behavior on PR still works as expected after your comment

After that, the contributor of #47273 submitted another PR to fix the issue that we found

Nope, the PR is fix crashed issue

This issue will happen with any RHP that has Lottie animation because we hide them while navigating away to fix #47273

Before this PR, we didn’t have any use cases similar to this issue.

#48444 was deployed to production 2 weeks ago and this bug was only reproducible on staging. I don't think so it has caused this, unless I am missing something.

@MonilBhavsar Actually, I don’t think the PR from 2 weeks ago is a regression of the new feature because, at the time of the old PR, we didn’t have any context for the new feature. So, I believe this should be considered a new issue, and the scope of the old PR doesn’t cover the new one.

@suneox
Copy link
Contributor

suneox commented Sep 28, 2024

@QichenZhu I believe our PR shouldn’t cover the new feature introduced several weeks later, so you can go provide a new proposal for this issue.​

@hungvu193
Copy link
Contributor

@suneox Hey I'm not trying to be picky here. This issue is clearly a regression from #48444.
We can reproduce this issue even when we reverted #48040. It happened with every single Lottie animation, but it can be easily reproducible with RHP.

Screen.Recording.2024-09-28.at.18.47.17.mov
Screen.Recording.2024-09-28.at.18.50.38.mov

That means, QA didn't find it during regression period of #48444. Since regression period was over for #48444. We can consider this as a new issue.

@QichenZhu
Copy link
Contributor

QichenZhu commented Sep 28, 2024

@hungvu193 Yes, you're right that similar issues exist on other pages too. It wasn’t considered a problem before, probably because it’s not noticeable to the human eye. I have to use a slow motion camera to catch it.

Why is this issue noticeable on the travel page? Because the page slides out more softly. Below is a comparison video of the Preference and Travel pages at 16x slower speed.

animation.mp4

@suneox
Copy link
Contributor

suneox commented Sep 30, 2024

it’s not noticeable to the human eye, I have to use a slow motion camera to catch it.

Agreed, I only caught the issue on different pages by recording and replaying it. So, I think it should be handled as a new issue

@neonbhai proposal is straightforward for fixing the issue.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 3, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

📣 @suneox 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 3, 2024

📣 @layacat You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@layacat
Copy link
Contributor

layacat commented Oct 4, 2024

Thanks for assigning. I'll raise PR today!

@layacat
Copy link
Contributor

layacat commented Oct 4, 2024

I created PR #50199

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 10, 2024
@melvin-bot melvin-bot bot changed the title [$250] Book travel - Book travel animation becomes blank while RHP is dismissed [HOLD for payment 2024-10-17] [$250] Book travel - Book travel animation becomes blank while RHP is dismissed Oct 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 10, 2024
Copy link

melvin-bot bot commented Oct 10, 2024

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

Copy link

melvin-bot bot commented Oct 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.47-4 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-10-17. 🎊

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

Copy link

melvin-bot bot commented Oct 10, 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:

  • [@suneox] The PR that introduced the bug has been identified. Link to the PR:
  • [@suneox] 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:
  • [@suneox] 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:
  • [@suneox] Determine if we should create a regression test for this bug.
  • [@suneox] 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.
  • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 17, 2024
@sakluger
Copy link
Contributor

Summarizing payment on this issue:

Contributor: @layacat $250, please apply to the Upwork job or comment with your Upwork profile
Contributor+: @suneox $250, paid via Upwork

@suneox please complete the BZ checklist.

@layacat
Copy link
Contributor

layacat commented Oct 18, 2024

Hi @sakluger I submitted work on Upwork, please check

@suneox
Copy link
Contributor

suneox commented Oct 18, 2024

Checklist

  • [@suneox] The PR that introduced the bug has been identified. Link to the PR: Prevent Lottie from running in the background after navigating to other pages #47960
  • [@suneox] 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
  • [@suneox] 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
  • [@suneox] Determine if we should create a regression test for this bug: N/A
  • [@suneox] 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. N/A

@sakluger
Copy link
Contributor

@layacat thanks! I didn't realize you had already applied. I sent an offer via Upwork.

@layacat
Copy link
Contributor

layacat commented Oct 21, 2024

I just submitted work for payment on Upwork. Please check

@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2024
@sakluger
Copy link
Contributor

Perfect, thanks! All contracts have been paid out now.

@melvin-bot melvin-bot bot removed the Overdue label Oct 21, 2024
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
None yet
Development

No branches or pull requests

10 participants