DigitalCommons / land-explorer-front-end

React app for the Land Explorer front end
http://landexplorer.cc
GNU Affero General Public License v3.0
1 stars 0 forks source link

[LX Collab Mapping] Enable multiple users to write to the same map #306

Closed lin-d-hop closed 3 months ago

lin-d-hop commented 5 months ago

Please track under the clockify project [LX Collab Mapping]

Description

Following on from #304 Currently when a map is shared with another LX user the additional user has permission to View the map in read only mode. Lots of users want to be able to share a map and have the map be editable. As part of the Oxon work on Collab Mapping I want to enable a shared map to edited by the person with whom it is shared. Currently the user just had read-only permission.

Once two users can edit a map at once we have additional complication. Can they edit the map at the same time? Much of the edit functionality currently implemented in LX rewrites the entire map to save an update. This means that if two users are editing the map at the same time they will overwrite each others changes. The full solution for collaborative mapping with be to create API endpoints for processing each update independently. But that is out of scope here.

The scope of this piece is to create a mechanism to lock a map when it is being used by another user. When the user hasn't updated the map for 5 minutes the map is unlocked. If another user tried to access the locked map they see an error message 'This map is currently being edited by another person. Please try again later. If you continue to see this message please contact us.' Contact us is a mailto link to 'landexplorer@digitalcommons.coop'

I know @rogup has good ideas of how this should be implemented. The plan is for @ms0ur1s and @rogup to discuss as and when :)

Acceptance Criteria