You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2025-01-17] [$250] Add confirmation dialog on unsaved changes #53679
When users fill in details in the app (e.g. description on an expense) and tap back or the scrim/overlay by mistake, the user loses everything they filled it. This can be particularly annoying if you submit an expense and fill in multiple details only to misclick and have to start over. We saw this multiple times during our usability study.
Solution
To remedy this, let's add a confirmation dialog on these sort of interactions by throwing up a confirmation dialog for unsaved changes. Here's a video to demonstrate:
CleanShot.2024-12-06.at.15.13.09.mp4
Notes:
If the value isn't changed, we should show the warning.
Clicking Discard continues the action of the user (if back, go back. If scrim/overlay, closer the right-hand-pane) without saving the value.
Any movement away from the screen should trigger the confirmation dialog (given the value has changed)
Questions:
Can this be applied systematically or do we have to go through all flows? If not, we should probably start with Submit expense to try it out and continue from there.
Edited by proposal-police: This proposal was edited at 2024-12-06 05:23:17 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Add confirmation dialog on unsaved changes
What is the root cause of that problem?
New feature
What changes do you think we should make in order to solve the problem?
Create a new component DiscardChangeModal based on ConfirmModal
Create a new state like isShowDiscardChangeModal
Will set isShowDiscardChangeModal as true when moving away from the screen without saving the value.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.82-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@ahmedGaber93] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
[@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@ahmedGaber93] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
Regression Test Proposal
Open submit expense flow page
Enter amount and proceed to the confirmation page
Open the Description form and keep the input empty
Go back
Verify the page closes
Open the page again
Type anything
Go back
Verify there is a discard confirmation modal
Press Cancel
Verify the modal closes, but the page doesn't close
Repeat step 8-9
Press Discard changes
Verify the modal and page closes
Repeat step 6-7
Save the changes
Verify the page closes and the change is saved
Repeat the same test (step 3-17) for Merchant field and Verify it has the same behavior in steps 5, 9, 11, 14, 17.
@ahmedGaber93 irt to the regression step proposal. I feel like there should be a Step 19 which verifies the expected outcome Verify..., if you're repeating steps wouldn't there be another outcome that should be verified? is that correct?
@abekkala steps from 3-17 already contain Verify steps 5, 9, 11, 14, 17. But I agree it need to be more clear.
- Repeat step 3-17 but for Merchant field+ Repeat the same test (step 3-17) for Merchant field and Verify it has the same behavior in steps 5, 9, 11, 14, 17.
Activity
nkdengineer commentedon Dec 6, 2024
Edited by proposal-police: This proposal was edited at 2024-12-06 05:23:17 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Add confirmation dialog on unsaved changes
What is the root cause of that problem?
New feature
What changes do you think we should make in order to solve the problem?
DiscardChangeModalbased onConfirmModalisShowDiscardChangeModalisShowDiscardChangeModalas true when moving away from the screen without saving the value.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
melvin-bot commentedon Dec 6, 2024
Triggered auto assignment to @abekkala (
NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.melvin-bot commentedon Dec 6, 2024
trjExpensify commentedon Dec 6, 2024
@dubielzyk-expensify make sure you add
BugorNew featurelabels to issues like this, to get it assigned out to a BZ member to manage and progress.melvin-bot commentedon Dec 6, 2024
Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify (
NewFeature)[-]Add confirmation dialog on unsaved changes[/-][+][$250] Add confirmation dialog on unsaved changes[/+]39 remaining items
melvin-bot commentedon Jan 10, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.82-12 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 2025-01-17. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 10, 2025
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
ahmedGaber93 commentedon Jan 15, 2025
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Proposal
abekkala commentedon Jan 15, 2025
PAYMENT SUMMARY FOR JAN 17
abekkala commentedon Jan 15, 2025
@ahmedGaber93 irt to the regression step proposal. I feel like there should be a Step 19 which verifies the expected outcome
Verify..., if you're repeating steps wouldn't there be another outcome that should be verified? is that correct?bernhardoj commentedon Jan 16, 2025
Requested in ND.
ahmedGaber93 commentedon Jan 16, 2025
@abekkala steps from 3-17 already contain
Verifysteps 5, 9, 11, 14, 17. But I agree it need to be more clear.Updated!
abekkala commentedon Jan 17, 2025
this got a little buried so I'll paste again for better visibility:
PAYMENT SUMMARY FOR JAN 17
JmillsExpensify commentedon Jan 22, 2025
$250 approved for @bernhardoj
JmillsExpensify commentedon Feb 10, 2025
$250 approved for @ahmedGaber93