-
-
Notifications
You must be signed in to change notification settings - Fork 713
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
Fix behavior with large undo lists #149
Conversation
Fix works for me |
And also, the possibility to inject middleware to every handler without encapsulating register-handler will be a great feature. (I need possibility to inject my undo middleware to every handler in dev mode) |
Hi @SerCeMan, thanks for this! re-frame isn't big on tests in general, but this strikes me as a case where some tests could be helpful. Could you add some that fail on the old behaviour and pass on the new? As far as injecting handlers into lots of middleware goes, you could make a |
@SerCeMan We started off thinking we needed We have this sort of a case: the user clicks on a button, generating a Your millage may vary, of course. Perhaps your app has no intermediate states (generally caused by event handlers doing further BUT, if you do decide you want
Then, in your app, use Thinks for the bug fix!! |
Don't worry about the tests @SerCeMan, I'm working on them now. |
Inspired by #149, this adds tests to cover the change that was made. It also tests the redo logic.
Inspired by #149, this adds tests to cover the change that was made. It also tests the redo logic.
Thanks for this! I've merged your changes in bb78981. |
Thanks! About undoable, I use it not only for undo/redo behaviour but also for showing the difference between versions in dev mode, it very convenient for me. |
You might also find https://github.com/Day8/re-frame/wiki/Debugging convenient for that, it lets you trace individual function calls |
Hello!
It seems like undo doesn't work with large undo lists, because you always grab first 50 elements of a vector. I have tried "undo" in my application and have got wrong results.
Please, fix me if I didn't understand the idea correctly.