-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add the redo
feature
#206
Comments
I was actually thinking to implement it into the library. |
Yeah, that could be a nice solution. |
I am currently thinking of dropping the library's history helpers since I think it would be quite easy to implement it on your own outside of it (I would even create such an external library in fact). |
@christianalfoni: does some Cerebral helpers or Cerebral itself uses the library's history helpers or does your state abstraction handle it on its own. |
If you are going to rewrite the history feature perhaps it would be worthwhile to consider doing isolated history rather than universal history as it is today. For example, given a unique ID, implement a transaction log. This would be immensely helpful for example when chaining multiple mutations to modify some set of states. It would make it trivial to undo/redo a user action composed of several mutations atomically without contamination from mutations of other user actions that took place concurrently. Example, two user actions invoked one after the other. They both modified some set of states individually. Now they both invoke ajax requests. The ajax request from the second user action returned before the ajax request from the first user action, and went on to modify some more state. Finally the first user action also completed. Now I want to undo the second user action but can't because I not have isolated transaction logs for each action's mutations. Might be a separate library tho :) |
Hello @stacklance. This was indeed my intention if I go the separate lib way. I don't integrate those features in the core lib because I don't want to make it bloated. |
The thing I would like to know however is: does someone uses cursors' history right now? And, do I need to break to v3 to drop it. |
@Yomguithereal My opinion is that if you provide an upgrade guide it shouldn't be much of an issue to introduce a new major version for a cool new feature. |
The thing is the cool new feature would be part of an external lib while the new major version would just be somewhat the precedent version without some old features. Will first build such external lib and then see what I can do to advance. |
Given there's
undo
already, it might make sense to briefly show a smart way to implementredo
.The text was updated successfully, but these errors were encountered: