-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(protocol-designer): show confirm modal before losing form's unsaved changes #6040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌵
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! But shouldn't e2e tests now be passing?
Codecov Report
@@ Coverage Diff @@
## edge #6040 +/- ##
=======================================
Coverage ? 79.22%
=======================================
Files ? 187
Lines ? 18127
Branches ? 0
=======================================
Hits ? 14362
Misses ? 3765
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Overview
Closes #5472
Also closes #6042, a bug the E2E tests accidentally uncovered due to this feature exposing whether a form has any changes (in a test where a Magnet form shouldn't have any changes, there were changes due to this bug, which failed the E2E tests!)
Changelog
Review requests
Cancelling a previously-saved step form should prompt for confirmation, only if there are changes. This should occur for all 4 methods of cancelling a step form:
cancel by clicking Cancel button
cancel by clicking another step item
cancel by clicking a terminal item
cancel by creating a new step
If the form doesn't really have changes (either no interaction happened since opening, or whatever you changed you then changed back), then all 4 methods above should not show the confirm modal
Deleting a step, with changes or without, should show a modal with unique copy
"You have not saved this step form. If you navigate away without saving, this step will be deleted."
bug: unsaved form, if open, remembers deleted magnetic module ID #6042 should be fixed (see ticket)
Risk assessment
Medium, PD-only