Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

History Manager #157

Merged
merged 36 commits into from
Feb 28, 2018
Merged

History Manager #157

merged 36 commits into from
Feb 28, 2018

Conversation

matt-gadd
Copy link
Contributor

@matt-gadd matt-gadd commented Jan 31, 2018

Type: feature

The following has been addressed in the PR:

Description:
Refactors the undo manager to be a more a generic history manager. This mvp currently allows serialization and deserialization of an entire history, as well as undo'ing and redo'ing.

I made a few breaking changes:

  • the undo manager no longer exists, as the history manager is a superset of it's functionality.
  • we have to take an id when creating a process. this is so we can trace the middleware/callbacks used for each process and re-apply them when we deserialize. Having to provide an id is a little annoying, but in the long run it will also help us for tracing other things (like in the dev tools).
  • i removed ProcessOptions, in favour of just providing the callback. In a subsequent PR we should rename callback to middleware. If we ever do need options on a Process, they would be separate from the middleware anyway.
  • an undoer function is no longer provided in the ProcessResult, this is because it's difficult to sync changes with the history manager (the undo manager used to overwrite the undoer function, which we could do again but it is ugly). we do provide undoOperations and the store on the ProcessResult now though, so if you do not care about the history manager you can manually apply the undoOperations to get the same effect.

I need to fix up some of the loose typings, some missing tests and update the README.

Resolves #???

@dylans dylans added this to the rc.1 milestone Feb 2, 2018
@matt-gadd matt-gadd changed the title History Collector History Manager Feb 7, 2018
@agubler
Copy link
Member

agubler commented Feb 25, 2018

This looks really good, just needs some updates for the REAME and I think it's good to go.

@matt-gadd matt-gadd merged commit 53e3ccb into dojo:master Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants