adopted-ember-addons / adopted-ember-addons/validated-changeset

Store "transactions" to enable undo/redo history

Open
#145 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Kind of based off of the data structure in https://github.com/validated-changeset/validated-changeset/issues/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:

```js
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.