Feat: prompt on unsaved unload#1002
Merged
Merged
Conversation
- change submit button text to "save" - disable submit button if there are no changes
# Conflicts: # src/test/dataTestIds.ts
ckbedwell
requested changes
Nov 26, 2024
ckbedwell
left a comment
Contributor
There was a problem hiding this comment.
Minor change requests but this is pretty much good to go. 🙌
I tried to break it in Chrome, Firefox and Safari but it endured. Solid as a rock 🪨🏅
# Conflicts: # src/page/NewCheck/NewCheck.tsx
VikaCep
added a commit
that referenced
this pull request
Dec 19, 2024
* Revert "refactor: move ChooseCheckGroup to page folder (#1021)" This reverts commit cf67891. * Revert "Feat: Add RBAC to Synthetic Monitoring (#982)" This reverts commit a41e15f. * Revert "chore(main): release 1.16.10 (#1015)" This reverts commit 92350bd. * Revert "Chore: update checks UI styling (#1020)" This reverts commit 2b69b02. * Revert "chore(deps): bump nanoid from 3.3.7 to 3.3.8 (#1018)" This reverts commit 77032d0. * Revert "Feat: prompt on unsaved unload (#1002)" This reverts commit 9747b27. * Revert "fix: add synthetic-monitoring-dev as owners of release files (#1010)" This reverts commit d703e42. * Revert "Chore/autumn clean (#1005)" This reverts commit 279272d. * fix: update package version * fix: bring back changelog entries from 1.16.10 * fix: change release-please-manifest version to 1.16.10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
To avoid users losing modified and tested changes, this PR adds "confirm on leave" for checks.
It also changes the behavior of the
SubmitSave-button."Submit" is now called "Save" and is only enabled if there are unsaved changes to the check.
Navigation handled by

react-router-dom(-v5-compat)Native navigation

Which issue(s) this PR fixes:
Resolves #892
Special notes for your reviewer:
Important: Please try to break it. It would be very unsatisfying for users to get blocked from navigating because of a bug.
livereloadandbeforeunloaddoesn't play nice. Get used to hittingEnterfollowed byEscape.