-
Notifications
You must be signed in to change notification settings - Fork 7
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
UndoManager #40
UndoManager #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking forward to seeing how you use the YUndoManager from the Swift side - what sequence calls need to be ordered, and how you wrap changes. All looks good here - mentioned Origin as a hard (opaque) type might be easier, but it totally works as an existential type as you've set it here too.
Great stuff. I think the API makes sense to me. My only question as far as usage goes: Probably obvious, but would be great to also have a test like Let us know how we can help @Horusiath! |
@embirico Yes, it will be possible through use of transactions with origins, which can be used to describe the source of change. UndoManager can be narrowed to only track changes coming from specific origins, so that undo/redo don't operate on other people updates. I'll add test cases that can serve as examples on how to use them. |
@heckj current branch passes build and tests on my machine using |
I'd suspect so - the complaints are about the code being compatible with an earlier version of swift. I'll take a look and see if I can get it updated. That's got it 👍 Two commits when one would have done - walked it forward until it was using the latest version of Swift, which resolved the compilation complaints. |
This PR is determined to provide a minimal implementation of
UndoManager
and expose it to the user API.It's still work in progress.
/cc @embirico