This is a workaround for the longstanding bug that can cause data loss when multiple users edit a map. We have a longterm fix planned for this: #238 but that would ideally involve a significant change to the architecture. Instead, we've been discussing options for a workaround for a very long time: #510 and this is, finally, an implementation of a workaround that will hopefully not be too disruptive, won't cause too many bugs. It's still not a mature solution, but it should help. This PR should probably address 90-95% of data loss scenarios - in the simplest possible way. We'll decide whether to cover more scenarios and otherwise improve on this later.
Setup
Describe how to prepare for testing
Testing
Open two maps in separate tabs. Edit the map in tab 1. Let the changes save. Edit the map in tab 2. You should now see an alert pop up. If you refresh the page, you should see that your changes haven't been saved.
Issue
Fixes #510
Description
This is a workaround for the longstanding bug that can cause data loss when multiple users edit a map. We have a longterm fix planned for this: #238 but that would ideally involve a significant change to the architecture. Instead, we've been discussing options for a workaround for a very long time: #510 and this is, finally, an implementation of a workaround that will hopefully not be too disruptive, won't cause too many bugs. It's still not a mature solution, but it should help. This PR should probably address 90-95% of data loss scenarios - in the simplest possible way. We'll decide whether to cover more scenarios and otherwise improve on this later.
Setup
Describe how to prepare for testing
Testing
Open two maps in separate tabs. Edit the map in tab 1. Let the changes save. Edit the map in tab 2. You should now see an alert pop up. If you refresh the page, you should see that your changes haven't been saved.