Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

What about Undo feature? #17

Open
jagarsoft opened this issue Feb 28, 2021 · 3 comments
Open

What about Undo feature? #17

jagarsoft opened this issue Feb 28, 2021 · 3 comments

Comments

@jagarsoft
Copy link

jagarsoft commented Feb 28, 2021

Hi folks
What do you think about implementing Undo feature?

Comments will be welcomed!

I have started working on it

@jagarsoft
Copy link
Author

No comments?

@joselfonseca
Copy link
Owner

hey there, I am not currently using this package too much. So if you think is a good addition you can make a PR and we can take a look. Thanks

@jagarsoft
Copy link
Author

jagarsoft commented Mar 26, 2021

Thanks @joselfonseca

I made the following assumtions:

  1. "undo"/"redo" methods return the same than their contrapart, "dispatch", did (Memento Pattern)
  2. the array associated with the middleware when invoking the "dispatch" method will walk through in reversed order when you "undo" a command, whilst "redo" a command will process the same middlewares in normal order again
  3. "undo" invokes to "unHandle" method of command and "executeUndo" of middleware. There will be an Inflector Class for them

What do you think?
Is it well aligned?

jagarsoft pushed a commit to jagarsoft/laravel-tactician that referenced this issue Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants