Feature Creep #2: Undo/Redo PRIME

Last night I decided to bite the bullet and make a start on undo/redo functionality for Davenport.

Straight away I started thinking about how frustrating it is to undo a bunch of work, press a key - and then change your mind. Whoops; too bad: that single keypress has, like an errant Marty McFly, eradicated an entire future timeline, and no amount of gigawatts are going to bring it back.

That got me thinking: there are novels that deal with time travel in all sorts of different ways - so why stick with the destructive one? What if Undo and Redo were not a stack of actions, but a tree?

Suppose undoing takes you back along the current branch, but editing the document anew from that point spawns a new branch. That way the work you did (and undid) is still there; all you have to do to restore it is switch branches.

This turns simple undo/redo into something profoundly different: a mind-map - an archive - of all your thought-processes and activities that you can explore and expand on at will. You can still use it for undo and redo, but you can also go back to any point in the document's history and try out new ideas from there non-destructively. I can add a bookmarking system to make it easy to switch between 'live' branches, so you can pursue multiple ideas as far as you like, and revisit them whenever you feel like it.

Hot on the heels of that realisation came another: it just so happens that every note and every view of a note have a unique, never-reused identifier. That enables some interesting possibilities:

* A note's identifier can be tracked across multiple branches. So it would be possible to select a note, browse every version of its contents there has ever been, and see all those edits highlighted in your activity timeline (I may even make that the bookmarking system).

* You can merge and splice branches in all sorts of funky ways. Maybe you want to incorporate the way you laid some notes out in one branch, but keep the content from another. Maybe you want to pull across just the changes you made to a specific selection of notes rather than all of them, or just the changes from a particular RANGE of time. The app can easily filter out changes that make no sense or can't be applied.

Obviously the challenge here is to present this functionality to the user without mimicking the effects of the Total Perspective Vortex - still, it's a lot more fun than undo/redo :)

Comments

Popular Posts