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

Show a warning when clicking 'I fixed it' if embedded Rapid editor has unsaved changes #2397

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Show a warning when clicking 'I fixed it' if embedded Rapid editor has unsaved changes #2397

merged 1 commit into from
Aug 12, 2024

Conversation

jake-low
Copy link
Contributor

@jake-low jake-low commented Aug 8, 2024

Fixes #2162

When completing a task (i.e. clicking "I fixed it", "Can't complete", etc, all of which would advance to the next task), a confirmation window will now be shown if there are unsaved changes in the embedded Rapid editor. The confirmation is very basic (I just used window.confirm()) but should help prevent users from accidentally advancing to the next task without uploading their changes. I considered trying to make a more complex/styleable modal but decided not to for now since with my limited experience with the codebase it would have taken longer and might not have matched the existing design language that I'm still getting familiar with.

Screen.Recording.2024-08-08.at.10.11.52.AM.mp4

Tested:

  1. The confirmation window is shown if there are unsaved changes in Rapid and the user clicks any of the buttons in the completion widget.
  2. The confirmation window is not shown if there are no unsaved changes in the Rapid editor. This includes the scenario where the user did not interact with the Rapid editor at all before clicking a button. I was unable to test the scenario where the user saves their changes in Rapid, because my dev environment throws an unspecific error when I try to save. Is this a configuration issue I should look into?
  3. The confirmation window is not shown if the embedded Rapid editor is not running.

@jake-low jake-low merged commit 4fe7a69 into maproulette:main Aug 12, 2024
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.

Unclear that you have to upload changes in integrated Rapid before clicking "I fixed it"
3 participants