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 manager without origin doesn't catch updates with origin #624
Comments
This would be a breaking change. I also don't agree that an empty list should catch everything. There could be an option to catch everything. However, I'd like to understand the use case first and if there are alternative solutions (there probably are) |
Why? The documentation says that "the changes can be optionally scoped to transaction origins". Doesn't it mean that by not specifying a transaction origin, the scope should include all origins? My use case is simple: I want to revert a document to a previous state in time (say t0). So at t0 I create an undo manager for a shared type of this document. Somewhere, changes are made to the document with a specified origin (that I'm not aware of). Then I decide to revert the document to the state at t0. But currently the undo manager says that there is nothing to undo. |
The thing is that there are currently users of Yjs who specify an empty list and add origins dynamically. If I changed the behavior so that "empty" catches everything, then this would be a breaking change. There is still the option to have a special flag to catch everything or to set the list to |
Sure, that would be an option. |
Hi @dmonad, do you think this could be implemented? |
Friendly ping @dmonad 😄 |
Hey David, sorry I can't give an estimate on when I have time to implement this feature. |
Checklist
Describe the bug It seems that an undo manager with no tracked origin doesn't catch updates made with an origin:
Expected behavior Since origins in an undo manager are only supposed to filter specific changes, I think having an undo manager with no specified origin should catch all changes, even those done with an origin set.
Environment Information
Huly®: YJS-797
The text was updated successfully, but these errors were encountered: