-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Expense - Payment sound triggered prematurely when submitting a held expense. #50572
Comments
Triggered auto assignment to @RachCHopkins ( |
Edited by proposal-police: This proposal was edited at 2023-10-10T10:00:00. ProposalPlease re-state the problem that we are trying to solve in this issue.The payment sound is triggered when the green pay button is clicked, even though the payment is not yet finalized What is the root cause of that problem?We're play sound when after selecting payment type in App/src/components/SettlementButton/index.tsx Line 210 in 420e780
What changes do you think we should make in order to solve the problem?We should not play sound in
App/src/components/MoneyReportHeader.tsx Line 146 in 5b38516
App/src/components/ReportActionItem/ReportPreview.tsx Lines 204 to 205 in 5b38516
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Payment sound triggered prematurely when submitting a held expense. What is the root cause of that problem?When user clicks pay button while request is on hold we call App/src/components/SettlementButton/index.tsx Lines 210 to 211 in 517ffaa
Here since request is onhold, instead of calling App/src/components/ReportActionItem/ReportPreview.tsx Lines 199 to 217 in 517ffaa
Hence the sound is played but not followed by settling the request What changes do you think we should make in order to solve the problem?
if (!ReportUtils.hasHeldExpenses(iouReport?.reportID)) {
playSound(SOUNDS.SUCCESS);
} App/src/components/SettlementButton/index.tsx Lines 210 to 211 in 517ffaa
2. Play the sound in HoldMenu when user clicks pay button playSound(SOUNDS.SUCCESS);
IOU.payMoneyRequest(paymentType, chatReport, moneyRequestReport, full);
What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-10-10 14:11:07 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing the pay button plays the sound even though a confirm modal shows. What is the root cause of that problem?We always play the sound without checking whether there is a held expenses or not. App/src/components/SettlementButton/index.tsx Lines 210 to 211 in 517ffaa
What changes do you think we should make in order to solve the problem?Instead of playing the sound when pressing the SettlementButton, we can play it inside the pay function, such as payMoneyRequest, payInvoice, sendMoneyElsewhere, and sendMoneyWithWallet. We will follow the same pattern as completing a task. Lines 408 to 409 in 517ffaa
|
Easy to repro. It sounds when you hit the green button, not when you confirm. |
Job added to Upwork: https://www.upwork.com/jobs/~021846013804908725875 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
@RachCHopkins, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@abdulrahuman5196 we have a number of early proposals here - do any look good to you? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@RachCHopkins, @abdulrahuman5196 Still overdue 6 days?! Let's take care of this! |
checking now |
Checking again |
@mkzie2 's proposal here #50572 (comment) looks good and works well. One suggestion for the PR would be to try and see if we can avoid introducing a new param in the settlement button which is already bloated, instead we can check if the expense is on hold inside the settlement button itself. I can see we already have chatReport there which we can re-use. 🎀 👀 🎀 |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @mkzie2 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@abdulrahuman5196 I don't think my proposal is almost the same as the others. My proposal suggesting to follow the same pattern as creating task, which doesn't require any conditional logic. cc: @carlosmiceli |
@abdulrahuman5196 After looking at @bernhardoj's proposal, I agree that it's not the same. What's the case for the one you selected? @mkzie2 please let's hold a bit on the PR 🙏 |
@bernhardoj Could you kindly elaborate more on your expected changes? Still not sure if different, Maybe I could have misunderstood the proposal. |
@carlosmiceli @RachCHopkins @abdulrahuman5196 @mkzie2 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
With my solution, first we will remove the App/src/components/SettlementButton/index.tsx Lines 211 to 212 in 66112d1
Then, play the sound inside Lines 7658 to 7675 in 66112d1
So, we don't play the sound when the button is pressed, but when the pay request is made. |
I agree its not the same as the accepted proposal. I think I had initially misunderstood the proposal. |
I have checked @bernhardoj proposal. And IMO, the concern I have is, removing So I still think the accepted proposal is better. @carlosmiceli. But anyways do let us know your thoughts as well. |
Understood, @abdulrahuman5196, I like your logic here, I just wanted to confirm that proposals were distinct and a clear reasoning behind the selected one. @mkzie2 feel free to proceed and thanks for understanding with the delay. |
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.46-5
Reproducible in staging?: Y
Reproducible in production?: Y
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): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
For this case the sound indicating a payment should be triggered after the payment is successfully completed. If the expense is on hold, the sound should be delayed until the confirmation is made and finalized
Actual Result:
The payment sound is triggered when the green pay button is clicked, even though the payment is not yet finalized
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6630541_1728553595243.soundd.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @abdulrahuman5196The text was updated successfully, but these errors were encountered: