-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
featureNew feature or requestNew feature or request
Description
Add Undo and Redo functionality.
Requirements:
- Review 2-3 undo/redo libraries for Redux and provide reasoning for or against.
- Add undo and redo buttons to toolbar with appropriate svg icons.
- Undo history should persist in state, local, and remote stores (See: Data Storage).
- Work with iterative loading (Thought Cache & Iterative Loading #703).
- Undo groups of actions at once.
Groups
Each undo should be associated with one or more actions.
Consider the following sequence of actions:
- newThought
- existingThoughtChange1
- existingThoughtChange2
- existingThoughtChange3
These should be undoable in a single undo.
Another example, based on the following state:
- a
- b [cursor]
- c
- b [cursor]
- existingThoughtChange1
- existingThoughtChange2
- existingThoughtChange3
- cursorDown
- existingThoughtChange4
- existingThoughtChange5
- existingThoughtChange6
- cursorUp
Activating undo should undo 5-8, i.e. navigation and contiguous edits.
Actions
Undoable
The following action types should be undoable:
archiveThought
bumpThoughtDown
cursorBack (navigation)
cursorBeforeSearch (navigation)
cursorDown (navigation)
cursorForward (navigation)
cursorHistory (navigation)
cursorUp (navigation)
deleteAttribute
deleteData
deleteEmptyThought
deleteThought
existingThoughtChange
existingThoughtDelete
existingThoughtMove
expandContextThought
indent
moveThoughtDown
moveThoughtUp
newThought
newThoughtSubmit
outdent
searchLimit
setAttribute
setCursor (navigation)
setFirstSubthought
settings
splitThought
subCategorizeAll
subCategorizeOne
toggleAttribute
toggleCodeView
toggleContextView
toggleHiddenThoughts
toggleSplitView
toolbarOverlay
tutorial
tutorialChoice
tutorialNext
tutorialPrev
tutorialStep
Non-undoable
Patches should not be generated for the following actions and they should be ignored completely by the undo/redo history:
alert
authenticate
clear
clearQueue
dragHold
dragInProgress
editing
editingValue
error
invalidState
loadLocalState
loadLocalThoughts
modalComplete
modalRemindMeLater
prependRevision
render
search
selectionChange
setResourceCache
showModal
status
toggleSidebar
undoArchive (will be replaced with new undo/redo logic)
updateSplitPosition
unknownAction
updateThoughts (complicated)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request