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

Undo causes the editor to undo remote changes #10

Open
KB1RD opened this issue Oct 30, 2019 · 1 comment
Open

Undo causes the editor to undo remote changes #10

KB1RD opened this issue Oct 30, 2019 · 1 comment
Assignees
Labels

Comments

@KB1RD
Copy link
Owner

KB1RD commented Oct 30, 2019

When Ctrl + Z is pressed, behavior must be well-defined. In the current case, text from the initial sync is removed with undo, which may come in with a different order, so very old changes are most likely the first to be undone. For the average user, this makes no sense. Since timestamps cannot be trusted, establishing order of undo operations would be difficult. I'm considering the following approaches:

  • Establishing order in the DAG based on event depth (complicated)
    • Also leaves the ambiguous case of multiple events with the same depth. What then?
  • Only allow undoing of changes that happen while the user has the editor open
  • Only allow undoing of local changes made by the current user (may make more sense for UI/UX)
@KB1RD KB1RD added the bug Something isn't working label Oct 30, 2019
@KB1RD KB1RD self-assigned this Oct 30, 2019
@KB1RD
Copy link
Owner Author

KB1RD commented Nov 4, 2019

I think that it would be best to base undo history off of whatever edits the user has made. I do not think that it would be a good idea to allow undoing of other user's operations.

@KB1RD KB1RD closed this as completed Nov 4, 2019
@KB1RD KB1RD reopened this Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant