Skip to content

Feat: prompt on unsaved unload#1002

Merged
w1kman merged 10 commits into
mainfrom
feat/892-prompt-on-unsaved-unload
Dec 12, 2024
Merged

Feat: prompt on unsaved unload#1002
w1kman merged 10 commits into
mainfrom
feat/892-prompt-on-unsaved-unload

Conversation

@w1kman

@w1kman w1kman commented Nov 26, 2024

Copy link
Copy Markdown
Contributor

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)
image

Native navigation
image

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.
livereload and beforeunload doesn't play nice. Get used to hitting Enter followed by Escape.

@w1kman w1kman self-assigned this Nov 26, 2024
@w1kman w1kman marked this pull request as ready for review November 26, 2024 09:59
@w1kman w1kman requested a review from a team as a code owner November 26, 2024 09:59
@w1kman w1kman requested review from VikaCep and ckbedwell November 26, 2024 09:59

@ckbedwell ckbedwell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🪨🏅

Comment thread src/components/ConfirmLeavingPage/ConfirmUnsavedModal.tsx Outdated
Comment thread src/page/NewCheck/__tests__/ApiEndPointChecks/CommonFields.payload.test.tsx Outdated
Comment thread src/components/ConfirmLeavingPage/ConfirmUnsavedModal.test.tsx Outdated
Comment thread src/components/ConfirmLeavingPage/ConfirmLeavingPage.test.tsx Outdated
@w1kman w1kman requested a review from ckbedwell November 26, 2024 18:32

@ckbedwell ckbedwell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

# Conflicts:
#	src/page/NewCheck/NewCheck.tsx
@w1kman w1kman requested a review from a team as a code owner November 29, 2024 07:27
@w1kman w1kman requested a review from ckbedwell November 29, 2024 07:28

@ckbedwell ckbedwell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⭐

@VikaCep VikaCep left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@w1kman w1kman merged commit 9747b27 into main Dec 12, 2024
@w1kman w1kman deleted the feat/892-prompt-on-unsaved-unload branch December 12, 2024 09:49
VikaCep added a commit that referenced this pull request Dec 19, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn you are leaving check edit page when unsaved data is present

3 participants