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 2023-08-21] Web - Inconsistency: Delete confirmation is not shown when deleting Money Request #23858

Closed
1 of 6 tasks
kbecciv opened this issue Jul 29, 2023 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item.

Comments

@kbecciv
Copy link

kbecciv commented Jul 29, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Request money from another user
  2. Tap the report preview to navigate to the IOU report
  3. Tap on the request preview to go to the details page
  4. Tap the three-dot icon and click on delete
    Notice that Delete confirmation is not shown

Expected Result:

Delete confirmation is shown

Actual Result:

Delete confirmation is not shown when deleting Money Request

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.47.2
Reproducible in staging?: y
Reproducible in production?: "Delete" button is not functional. in production
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
Notes/Photos/Videos: Any additional supporting documentation

Test94.Deletrequest-1.mp4
Recording.3988.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690624169287459

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011c0a2bbb8d3512ee
  • Upwork Job ID: 1686096957915062272
  • Last Price Increase: 2023-07-31
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Jul 29, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Jul 29, 2023

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@c3024
Copy link
Contributor

c3024 commented Jul 29, 2023

Proposal

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

There is no confirmation modal when deleting a money request action.

What is the root cause of that problem?

There is no confirmation modal in the when deleting a money request action in MoneyRequestHeader page

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

We should add ConfirmModal similar to the modal


in WorkSpaceInitialPage here
https://github.com/Expensify/App/blob/eb020063789091eb2e3086b5b54af3ead8436645/src/components/MoneyRequestHeader.js#L90C9-L90C9
in MoneyRequestHeader as well

<ConfirmModal
                        title={props.translate('moneyrequest.common.delete')}
                        isVisible={isDeleteModalOpen}
                        onConfirm={confirmDeleteAndHideModal}
                        onCancel={() => setIsDeleteModalOpen(false)}
                        prompt={props.translate('moneyrequest.common.deleteConfirmation')}
                        confirmText={props.translate('common.delete')}
                        cancelText={props.translate('common.cancel')}
                        danger
                    />

Add the relevant phrases in en.js and es.js
Add a new state variable

const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);

Change this here
https://github.com/Expensify/App/blob/eb020063789091eb2e3086b5b54af3ead8436645/src/components/MoneyRequestHeader.js#L65-L67C30
to

const confirmDeleteAndHideModal = useCallback(() => {
        IOU.deleteMoneyRequest(parentReportAction.originalMessage.IOUTransactionID, parentReportAction, true);
        setIsDeleteModalOpen(false);
    }, [parentReportAction]);

and change this here

onSelected: deleteTransaction,

to

onSelected: () => setIsDeleteModalOpen(true),

We can do the same in Task page as well when canceling a task to show confirmation and at other places as applicable this way.

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Jul 29, 2023
@hungvu193
Copy link
Contributor

hungvu193 commented Jul 30, 2023

Proposal

I think this shouldn't be a deploy blocker because it's new feature and didn't block user from using the app 🤔

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

Web - Inconsistency: Delete confirmation is not shown when deleting Money Request

What is the root cause of that problem?

We don't show the confirm modal before deleting a money request in here:

const deleteTransaction = useCallback(() => {
IOU.deleteMoneyRequest(parentReportAction.originalMessage.IOUTransactionID, parentReportAction, true);
}, [parentReportAction]);

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

We can reuse the ReportActionContextMenu that we already have to show the confirm modal in hereso we don't need to add a ConfirmModal inside our MoneyRequestHeader component:

    const deleteTransaction = useCallback(() => {
        // IOU.deleteMoneyRequest(parentReportAction.originalMessage.IOUTransactionID, parentReportAction, true);
        ReportActionContextMenu.showDeleteModal(parentReportAction.originalMessage.IOUTransactionID, parentReportAction, true);
    }, [parentReportAction]);

What alternative solutions did you explore? (Optional)

N/A

Result
Screen.Recording.2023-07-30.at.08.50.31.mov

@pecanoro
Copy link
Contributor

This is not even a bug, right? This functionality has never existed 😄

@pecanoro pecanoro added NewFeature Something to build that is a new item. and removed DeployBlockerCash This issue or pull request should block deployment labels Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

@pecanoro
Copy link
Contributor

@mountiny @luacmartins Should we have a delete confirmation modal for money requests?

@hungvu193
Copy link
Contributor

I believe we had:

Screen.Recording.2023-07-31.at.17.18.27.mov

We just forget to add it to this new feature

@mountiny
Copy link
Contributor

@luacmartins I am not sure how this was planned in the design doc now but it makes send to keep it consistent

@shawnborton
Copy link
Contributor

Agree, if we had this before then let's keep the confirm modal.

@luacmartins
Copy link
Contributor

Sounds good! Let's add the confirmation modal back! I can take this on if you'd like @pecanoro

@pecanoro
Copy link
Contributor

@luacmartins As do you want to fix it? I can stay as the CME if we are having a contributor fix it.

@luacmartins
Copy link
Contributor

Sure that works too! Just thought I'd offer to fix it myself since this is related to the functionality I worked on.

@pecanoro
Copy link
Contributor

Sure! I will assign you so you can fix it, I can always review the PR 😄

@pecanoro pecanoro added the Internal Requires API changes or must be handled by Expensify staff label Jul 31, 2023
@alexpensify
Copy link
Contributor

@pecanoro at this point, we are waiting for proposals - right?

@luacmartins
Copy link
Contributor

@alexpensify I'm gonna work on the fix myself.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Aug 2, 2023
@luacmartins
Copy link
Contributor

PR here

@alexpensify
Copy link
Contributor

Thank you @luacmartins for the update here!

@alexpensify
Copy link
Contributor

@luacmartins - it looks like the PR merged, can you share what actions are remaining here? Thanks!

@luacmartins
Copy link
Contributor

@alexpensify we're just missing payment:

@daveSeife - reporting bonus
@robertKozik - PR review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 14, 2023
@melvin-bot melvin-bot bot changed the title Web - Inconsistency: Delete confirmation is not shown when deleting Money Request [HOLD for payment 2023-08-21] Web - Inconsistency: Delete confirmation is not shown when deleting Money Request Aug 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.53-2 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 2023-08-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@robertKozik
Copy link
Contributor

@luacmartins I'm an contributor from an expert agency (Software Mansion) so I'm actually not eligible to payment

@luacmartins
Copy link
Contributor

Ah thanks for the reminder! So I think we only have the reporting bonus payment to @daveSeife

@alexpensify
Copy link
Contributor

Sounds like a plan! I'll prepare accordingly for the August 21 payment day.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Aug 21, 2023
@alexpensify
Copy link
Contributor

Here is the payment summary:

  • External issue reporter - @daveSeife $250
  • Contributor that fixed the issue - Internal
  • Contributor+ that helped on the issue and/or PR - @robertKozik payment handled by Software Mansion

Upwork Job: https://www.upwork.com/jobs/~011c0a2bbb8d3512ee

*If applicable, the bonuses will be applied on the final payment

Extra Notes regarding payment: N/A

@alexpensify
Copy link
Contributor

@daveSeife - I've prepared the payment in Upwork. Please accept and I can complete the required process.

@daveSeife
Copy link

Accepted. Thank you!

@alexpensify
Copy link
Contributor

Thanks! I've closed the job in Upwork and am going to close this GH too

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 Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests