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

Prevent edit conflicts #5

Closed
dirkroorda opened this issue Dec 2, 2022 · 3 comments
Closed

Prevent edit conflicts #5

dirkroorda opened this issue Dec 2, 2022 · 3 comments

Comments

@dirkroorda
Copy link
Collaborator

dirkroorda commented Dec 2, 2022

When users modify material, they may destroy each other's data inadvertently, and that should be prevented.

We deal with that in several ways:

  • by favouring micro-editing: users edit one field at a time, and when they leave a field, the field gets saved.
  • by preventing users to open a field that is being edited by an other user.

When a user presses an edit button but an other user is already editing that field, instead of presenting the field in edit mode, the nickname of the user who is editing the field is being shown.

There might be cases where the other user's system did not detect the end of the edit session.
In that case we need something to overcome that.

For example: edit sessions always terminate within 10 minutes after the last keypress.

We could show that users are typing (like you see in Whatsapp and Slack).
Editors and sub-editors could send a message to the one that is typing with a request to save.

If we need this kind of communication we could use Flsak-SocketIO.

@dirkroorda dirkroorda converted this from a draft issue Dec 2, 2022
@dirkroorda
Copy link
Collaborator Author

It is important to have a quick, albeit coarse solution.

Only one person can have a voyager story session for an edition open at the same time.
During that time, no edition related modification can be made, not even in logo's and metadata.
Also, role assignments to people cannot happen then.

For projects the same holds: only one person can modify project details at the same time, including the manager role.

@dirkroorda
Copy link
Collaborator Author

In more technical terms:

In order to modify something in a project, you need to obtain a project session.

In order to modify something in an edition, you need to obtain an edition session.

Only if you obtain the appropriate session, you can modify things.

In order to modify edition-level things, you do not need a project lock.

In order to change assignments of user roles for projects / editions, you also need to obtain a project / edition session.

No two users can have a session for the same project /edition at the same time.

A user may obtain the same session at the same time in different browser windows and then run the risk of overwriting himself. (Or should we guard the user against this?)

@dirkroorda
Copy link
Collaborator Author

Too complicated . We do not make mechanisms to prevent conflicts .
In practice, very few people can edit the same edition. And edits are saved field by field, which minimizes data loss in case of conflicts.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in pure3dx Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant