Adds feature to discard all the changes on the map #10045
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.
Description
This PR addresses the issue #10033 which concerns the need for a discard button to discard all the changes on the map. Previously this was done by reloading the map and then discarding all the changes but this PR will create a discard button to dump all the changes without having to reload the page, also unlike the reload method this discard action can be undone.
Changes made
Presently this PR has 3 commits
Commit1: creates the discard feature.
Commit2: merges changes made into the original repo.
Commit3: fixes lint issues in the code.
Here's the rundown of changes made in Commit 1:
Proof of concept
Screencast.from.12-12-23.10.52.08.PM.IST.webm
Final thoughts
I understand that this PR makes some major changes to iD therefore I would request the admins to take a look and this and if there are any changes to be made feel free to let me know as I am more than willing to work further on this issue.