Quantcast
Channel: FlexMonkey
Viewing all articles
Browse latest Browse all 257

Ctrl-Z Reinvented: A New Kind of Undo

$
0
0

There are a two major pieces of functionality missing in ReDiLab, my reaction diffusion explorer. One is saving and the other is undo. I've been thinking about undo for a while and decided that a regular linear undo isn't quite up to the job - ReDiLab needs something a little richer.

With a linear undo, if the user steps back through their undo buffer and makes a change, all the history after the change gets lost. For example, if I was typing a chemistry paper and entered "Calcium Hipochlorate" then repeated undo to fix the spelling mistake, once I typed the "y" to get "Calcium Hy" the "pochlorate" would be lost forever.

With a linear undo in ReDiLab, there could be an analogous situation: the user has tweaked some parameters and decided to undo to get one parameter back to where it was. Any other changes destroy the forward history from that point.

My solution is parallel undo - a sort of multiverse for user actions. In this solution for the above example, after undoing and typing the "y" to get "Calcium Hy", a new timeline is created so that upon completion both the "Calcium Hipochlorate" and "Calcium Hypochlorate" undo histories exist. 

The user interface displays the web of histories so that after fixing the "y", the user can jump into the "Hipochlorate" timeline, copy the "pochlorate" and paste it into the correct timeline.

I've created a proof of concept which is available here. If you start typing in the text box at the top the node graph displays each step. Pressing undo and redo step you through the undo buffer and populate the text box with text for that step. Typing when you're not at the last node generates a new timeline.

Undo history nodes are clickable, so there's no need to repeatedly click undo or redo. Despite the title of this blog post, I haven't actually implemented Ctrl-Z, so you'll need to use the buttons.

The proof of concept may not scale too well for ReDiLab were there are many changes, but I'll plug it in when I get some free time and see how well it works. 

Again, the demo lives here and my source code is available here. For this demo, I've used Kap IT's rather excellent Kalileo Visualiser component.



Viewing all articles
Browse latest Browse all 257

Trending Articles