[WebODF] Undo & Operation groups

Friedrich W. H. Kossebau friedrich at kogmbh.com
Tue Jan 21 12:28:00 CET 2014


Am Dienstag, 21. Januar 2014, 16:56:36 schrieb Philip Peitsch:
> On 21 January 2014 01:39, Friedrich W. H. Kossebau <friedrich at kogmbh.com> 
wrote:
> > Am Freitag, 17. Januar 2014, 22:39:37 schrieb Philip Peitsch:
> > > I have two ideas for how to do this cleanly.
> > > ...
> > Related thought:
> > Grouped actions possibly need some kind of local lock, to make sure all
> > operations belonging to the same UI action end up being applied/routed
> > without other ops sneaking in. E.g. some UI action could be done in an
> > interactive way, with intermediate steps already applied. That could also
> > be useful for grouping related operations into one, like the consecutive
> > inserting. Because in the timespan where one is quickly typing a word
> > updates from other users might be not wanted as well, so such a lock
> > could be synced with the timeout for when inserts will no longer be
> > auto-grouped?
> 
> This makes sense for other times as well. E.g., updates arriving while
> selecting with a mouse will likely break the selection or move the view
> around. Updates arriving while the view is scrolling might have similar
> issues. I agree that we will (eventually) need some predictable critical
> regions during which remote updates cannot be received or processed.

Yes, good examples as well. 

> For now, if I stick with option 1, we can avoid answering these questions.

Possibly the lock mechanism is on my plate to do meanwhile :) The examples 
actually show that this is a real problem already, at least for good user 
experience.

> > Open problem:
> > Given that at least with the OT approach different clients have different
> > (groups of) operations applied, and usually not only in a different order.
> > So they would also have different Undo stacks.
> > So should the history be normalized somehow?
> > What to do about groups whose operations are transformed completely into
> > noops so would be currently just be forgotten?
> 
> The likely implementation of collaborative undo is going to be
> inverse-ops. In this
> case, all the normal OT behaviours remain, and all the undo stack is
> decide which
> inverse-ops to send to other clients. (Of course, I reserve my rights
> to change my
> mind on this fictional implementation at any time in the future...)
> 
> The undo history being different per user is only an issue if the
> users are sitting
> side-by-side and expect undo to perform the same action on both machines.

Ideally in collab situations users should feel like they are sitting side-by-
side ;) (/me dreams of voicechat/chat enhanced solutions)

I imagine one day there should be some action-timeline (as in: UI action, not 
operations), some kind of official document history, so people can also see by 
time who did what. So if they talk about the history they need to see the same 
on all shared instances. So IMHO the OT we do is only for good user 
experience. There still should be also some official single history, and that 
should ideally reflect as much as possible what all users did (no idea yet how 
to properly represent actions that overlap or shadow each other, to be 
solved). This history then also would be the shared list to pick things to 
undo from.

IMO at least the default undo should just undo the actions done by the local 
user, with the same UI patterns as used to from single-user-editing, so that 
noone has to relearn their editing habits or switch them for WebODF or if 
suddenly someone else joins the editing. Undoing selected actions from other 
users should still be doable, but with a special UI perhaps.

> > So somehow I prefer option 1) for now, until there is a grand plan
> > compiled. Unless we are quick enough with compiling one now.
> 
> I am in agreement with you for this. Option 1 is the least code impact at
> the moment, and allows me to avoid the inherent monsters lurking within the
> "collaborative undo" feature for a few weeks longer :-).

Okay with me. In the meantime we should develop the "grand plan" for 
collaborative Undo in a dedicated place, will see to come up with something 
soonish.

Cheers
Friedrich
-- 
Friedrich W. H. Kossebau // KO GmbH
http://kogmbh.com/legal/


More information about the WebODF mailing list