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-16] [$250] Expense - No "Payment completed" animation when paying a held expense #49262

Closed
6 tasks done
IuliiaHerets opened this issue Sep 16, 2024 · 24 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 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 16, 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.35-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #48615
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit an expense.
  4. Click Pay elsewhere button in the expense preview on the main chat.
  5. Note that it shows "Payment completed" animation.
  6. Submit another expense.
  7. Go to transaction thread > Click report header > Hold.
  8. Hold the expense.
  9. Return to the main chat.
  10. Click Pay elsewhere button in the expense preview on the main chat.
  11. Click Pay all.

Expected Result:

There will be a "Payment completed" animation.

Actual Result:

There is no "Payment completed" animation when paying a held expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6603121_1726283620870.20240914_111027.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021835789304601494355
  • Upwork Job ID: 1835789304601494355
  • Last Price Increase: 2024-09-16
  • Automatic offers:
    • shubham1206agra | Reviewer | 104079418
    • etCoderDysto | Contributor | 104079419
Issue OwnerCurrent Issue Owner: @puneetlath
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

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

@IuliiaHerets
Copy link
Author

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

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Sep 16, 2024

Edited by proposal-police: This proposal was edited at 2024-09-16 21:45:11 UTC.

Proposal

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

No "Payment completed" animation when paying a held expense

What is the root cause of that problem?

When user pays from confirmation modal (ProcessMoneyReportHoldMenu), we are not running animation by calling setIsPaidAnimationRunning(true) before we trigger IOU.payMoneyRequest

} else if (chatReport && paymentType) {
IOU.payMoneyRequest(paymentType, chatReport, moneyRequestReport, full);

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

We should pass setIsPaidAnimationRunning(true) as call back function to ProcessMoneyReportHoldMenu, and call it above IOU.payMoneyRequest
Note: We can wrap setIsPaidAnimationRunning(true) and HapticFeedback.longPress() in a function (startAnimation), and call startAnimation in ProcessMoneyReportHoldMenu. And we should only call setIsPaidAnimationRunning(true) conditionally when it is present. To memorize the function (startAnimation) we can use useCallback

const startAnimation = useCallback(() => {
setIsPaidAnimationRunning(true);
HapticFeedback.longPress()
}, []);
if (startAnimation) {
startAnimation ()
}
Result
Screen.Recording.2024-09-17.at.12.43.14.at.night.mp4

What alternative solutions did you explore? (Optional)

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Sep 16, 2024
@melvin-bot melvin-bot bot changed the title Expense - No "Payment completed" animation when paying a held expense [$250] Expense - No "Payment completed" animation when paying a held expense Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

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

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

melvin-bot bot commented Sep 16, 2024

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

@raza-ak
Copy link
Contributor

raza-ak commented Sep 18, 2024

Proposal

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

Expense - No "Payment completed" animation when paying a held expense

What is the root cause of that problem?

The root cause of this issue is that the boolean value for setIsPaidAnimationRunning is not being set when the expense is on hold. Instead, the application only opens the confirmation modal when the report status is on hold, without updating the animation state.

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

To resolve the problem, implement the following changes:

  1. Update isPaidAnimationRunning State:
    • After clicking the submit button in the confirmation modal for a held expense, ensure that the isPaidAnimationRunning state is set to true.
  2. Pass and Update State Function:
    • Pass the setIsPaidAnimationRunning function to the ProcessMoneyReportHoldMenu component.
    • Update the isPaidAnimationRunning value after the expense is submitted through the confirmation modal.

By implementing the following changes, the "Payment completed" animation should be displayed correctly when paying a held expense.
image
image

Video:

368533552-cc878c7a-8d18-40db-914d-27b744871d42.mp4

Copy link

melvin-bot bot commented Sep 20, 2024

@puneetlath, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Sep 20, 2024
@puneetlath
Copy link
Contributor

@shubham1206agra thoughts on the proposal?

@shubham1206agra
Copy link
Contributor

@etCoderDysto's proposal looks good.

🎀👀🎀 C+ reviewed

Engineer - Can you confirm if we need haptic feedback here?

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2024
Copy link

melvin-bot bot commented Sep 21, 2024

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@puneetlath
Copy link
Contributor

Is there haptic feedback when you pay it the normal way? Not through the "hold" dialog? I think we should just have it behave the same way.

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

melvin-bot bot commented Sep 22, 2024

📣 @shubham1206agra 🎉 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 Sep 22, 2024

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@etCoderDysto
Copy link
Contributor

Is there haptic feedback when you pay it the normal way? Not through the "hold" dialog? I think we should just have it behave the same way.

I think we should use heptic feedback since we are using it for ReportPreview

setIsPaidAnimationRunning(true);
HapticFeedback.longPress();

@etCoderDysto
Copy link
Contributor

PR will be ready soon

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 23, 2024
@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 9, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - No "Payment completed" animation when paying a held expense [HOLD for payment 2024-10-16] [$250] Expense - No "Payment completed" animation when paying a held expense Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.46-5 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-16. 🎊

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

Copy link

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

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] Determine if we should create a regression test for this bug.
  • [@shubham1206agra] 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.
  • [@puneetlath] 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 Overdue and removed Weekly KSv2 labels Oct 16, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

@puneetlath, @shubham1206agra, @etCoderDysto Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor

@etCoderDysto has been paid.

@shubham1206agra bump on the checklist. And on accepting the Upwork offer.

@shubham1206agra
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:

  1. Go to App.
  2. Go to workspace chat.
  3. Submit an expense.
  4. Go to transaction thread > Click report header > Hold.
  5. Hold the expense.
  6. Return to the main chat.
  7. Click Pay elsewhere button in the expense preview on the main chat.
  8. Click Pay all, and observe that the Payment completed" animation occurs.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added the Overdue label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

@puneetlath, @shubham1206agra, @etCoderDysto Whoops! This issue is 2 days overdue. Let's get this updated quick!

@puneetlath
Copy link
Contributor

Regression test issue here: https://github.com/Expensify/Expensify/issues/439229

All paid. Thanks everyone!

@melvin-bot melvin-bot bot removed the Overdue label Oct 27, 2024
Copy link

melvin-bot bot commented Oct 27, 2024

@puneetlath Be sure to fill out the Contact List!

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

5 participants