Skip to content

Add undo/redo functionality #70

@ecarriou

Description

@ecarriou

User need a way to go back/forward to the history of the system lifecycle. To do so, we need to create a history component with undo and redo APIs to navigate into the history of component state.

Proposed APIs

// get the history component
const history = runtime.require('history')

// start historization
history.start()

// go back in the history
history.from(-1) // set the cursor at the index we want, -1 means to start from the end of the history stack
history.back()

// go forward the in history
history.forward()

// dump the current history
const dump = history.dump()

// load an history and inject the modifications to the current system
history.load(dump)

// stop historization
history.stop()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions