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

Support Multi-User Undo/Redo #49

Closed
hackerwins opened this issue Apr 20, 2020 · 1 comment
Closed

Support Multi-User Undo/Redo #49

hackerwins opened this issue Apr 20, 2020 · 1 comment
Assignees
Labels
enhancement 🌟 New feature or request hard 🧑‍🔬 Difficult to deal with or require research sdk ⚒️

Comments

@hackerwins
Copy link
Member

hackerwins commented Apr 20, 2020

Description:

Written by @hyemmie

About multi-user undo/redo

When specifying Undo/Redo functionality, the following criteria could be considered.

  1. How to select an action to cancel? ⇒ linear vs selective
  • linear: Users can't choose which actions to undo, and by default, they can undo and redo in reverse order, starting with the most recent action. If user want to cancel a specific action that is not the most recent, user need to cancel all of them, starting with the most recent and ending with that action.
  • selective: Users can randomly select an action to cancel among all actions and undo and redo only that action.
  1. Does a single user have permission to undo/redo all actions in collaborative editing environment? ⇒ local vs global
  • local: Users can only undo and redo their own actions.
  • global: Users can undo and redo the actions of all participants in a collaborative edit.
  Local Global
Linear Undo one’s own action in reverse chronological order from newest to oldest. (ex. Automerge, Google Docs, Figma) Undo all users' actions in reverse chronological order from newest to oldest . (ex. CodePair)
Selective Select and undo any of one’s own actions. (ex. Azurite) Select and undo any of all users’ actions.

For Yorkie, we don't need selective functionality at this point, but rather the ability for users to undo/redo only their own work.

Discussion

To provide multi-user (”local-linear”) undo/redo, we can start with the following tasks.

  1. Implement data structure for multi-user (”local-linear”) undo/redo.
    This task could be done in two ways.
  • Implement Individual data structure for PoC and integrate it with Yorkie’s RGATreeSplit.
  • Implement additional undo/redo feature to current RGATreeSplit.
  1. Design the overall architecture.
    We'll need to combine ideas on how to manage and store tasks separately for each user, how to integrate with your current database, and more into a single architecture.

Here are some reference implementations you might want to check out.
Reference:

Why:

To eliminate the user experience of canceling another user's operation, Yorkie needs to support user-specific undo/redo.

@hackerwins
Copy link
Member Author

hackerwins commented Sep 25, 2023

Tasks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request hard 🧑‍🔬 Difficult to deal with or require research sdk ⚒️
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants