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

Store "transactions" to enable undo/redo history #145

Open
NullVoxPopuli opened this issue Dec 3, 2021 · 1 comment
Open

Store "transactions" to enable undo/redo history #145

NullVoxPopuli opened this issue Dec 3, 2021 · 1 comment

Comments

@NullVoxPopuli
Copy link
Contributor

Kind of based off of the data structure in #144

It could be good to record "transactions" every time execute is called, effectively storing that current/original object from #144 as a type-of-snapshot each time execute is called. Or maybe it'd look like:

changeset.transactions
// returns =>
[
  {
    executedAt: timestamp,
    snapshot: (existing snapshot)
    changes: {
      key: { original, current }
    }
  },
    {
    executedAt: timestamp,
    snapshot: (existing snapshot)
    changes: {
      key: { original, current }
    }
  }
  // ....
]

This would enable undo/redo history

@snewcomer
Copy link
Collaborator

Also in favor of this as well 👍

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

No branches or pull requests

2 participants