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

[$500] Android - When entering a manual request description, the previously entered description briefly reappears for a second #31718

Closed
1 of 6 tasks
kbecciv opened this issue Nov 22, 2023 · 10 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Nov 22, 2023

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: 1.4.2.0
Reproducible in staging?: y
Reproducible in production?: y
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. Launch app
  2. Tap fab---Request money----Manual
  3. Enter an amount
  4. Tap next
  5. Tap description
  6. Enter a text and tap save
  7. Again tap description
  8. Select the text and tap cross button and delete the text
  9. Enter a new text and save it

Expected Result:

In the manual request description, only the currently entered and saved description should be displayed, and the previously entered description should not be shown.

Actual Result:

When entering a manual request description, the previously entered description briefly reappears for a second

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

Bug6287350_1700667629347.previous.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a93921082b8f7dc2
  • Upwork Job ID: 1727356459602784256
  • Last Price Increase: 2023-11-29
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 22, 2023
@melvin-bot melvin-bot bot changed the title Android - When entering a manual request description, the previously entered description briefly reappears for a second [$500] Android - When entering a manual request description, the previously entered description briefly reappears for a second Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

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

Copy link

melvin-bot bot commented Nov 22, 2023

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Nov 22, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 22, 2023

Proposal

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

What is the root cause of that problem?

We merge the comment into Onyx and navigate back immediately. So sometimes, the data is merged into Onyx after the navigation transaction is complete.

IOU.setMoneyRequestDescription(value.moneyRequestComment);
navigateBack();

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

We should set a delay to the navigate function to make sure the data is merged into Onyx before navigating like this

const id = setTimeout(() => {
    navigateBack()
},CONST.ANIMATED_TRANSITION)
return () => {
    clearTimeout(id);
}

IOU.setMoneyRequestDescription(value.moneyRequestComment);
navigateBack();

We should do the same with other edit pages and we can only apply the delay for native.

What alternative solutions did you explore? (Optional)

We can create a function like navigationWithDelay and use it in many places of the app.

Result

Screen.Recording.2023-11-22.at.23.46.51.mov

@rojiphil
Copy link
Contributor

Proposal

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

When description is edited for a manual money request, the previous description is briefly displayed before getting updated with the new description.

What is the root cause of that problem?

As the description content is shared between confirmation page and description page via Onyx, the delay in Onyx merge here causes the delayed display of new description in money request confirmation page.

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

To solve the problem, we can wait for the Onyx.merge promise to return before navigating back. We can make the setMoneyRequestDescription function to return the promise of Onyx.merge and make the following change here to fix this.

    IOU.setMoneyRequestDescription(value.moneyRequestComment).then(() => {
        navigateBack();            
    });

Test Video

31718-fix.mp4

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@c3024
Copy link
Contributor

c3024 commented Nov 27, 2023

I see this delay on Android Emulator. The change is reflected instantly on my physical Android device. I think this is an issue for low end devices.

The RCA is correct but I don't think this is a bug worth fixing using setTimeOut.

I am also not sure if it is worth to refactor setMoneyRequestDescription and other functions to return promises so that we can wait for finishing writing to Onyx before navigating.

Based on the proposals received and the bug being specific to low end devices, I don't think this is a bug worth fixing. @muttmuure

@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
Copy link

melvin-bot bot commented Nov 29, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Nov 30, 2023

@muttmuure, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Nov 30, 2023
@muttmuure
Copy link
Contributor

Sounds good to me. We can always reopen if we deem it important to fix this later.

@melvin-bot melvin-bot bot removed the Overdue label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants