Skip to content
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

time travelling #9

Open
robinfehr opened this issue Nov 6, 2017 · 1 comment
Open

time travelling #9

robinfehr opened this issue Nov 6, 2017 · 1 comment

Comments

@robinfehr
Copy link
Collaborator

since there now is a undoManger - patchRecorder grouped by actions - we could add a proper time traveling to wiretap.
mobxjs/mobx-state-tree#504

though for wiretap we'd not only want to time travel the actions - reverse apply all patches of the action - but also be able to apply/ reverse-apply a single patch.

to do so we'd need to know if a patch within an action is applied or not, so in case he decides to undo a whole action when he already reverse-applied several patches of the same action, we'd know which patches are missing undo the whole action.

as discussed we could then also implement the UI like: (collapsible)

  • Action
    • Patch
    • Patch
    • Patch
  • Action
    • Patch
    • Patch
  • Action
    ...

and therefore disable the entires for the reverse applied patches/ undone actions.

snapshots should be separate since when applied we lose the actions and can only time travel for the following actions.

@Raathigesh
Copy link
Owner

This sounds like a plan 👍 Let's do this. Maybe refactoring the UI to the collapsible format would be a good place to start. I'll try my best to work on it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants