Re: [w3c/editing] undo manager (#209)

> In collaborative editing you will have a shifting number of undoable items. It can be 5 at one time, then 2 then again 5 without the local user having done anything in-between all just because of actions of remote users.

Oh right... I assumed that since a user can undo only his/her changes, the number of undo steps is constant (doesn't change when the other users edit the content).

But you're right that there are scenarios which lead to an undo step becoming "empty". For example if you changed a color of text which was later removed by some other user, you can't undo changing its color.

Interestingly, I think that we can't tell without performing expensive computations whether other user changes nulled one of your undo steps. @scofalik, what do you think about this?


---

> Why would you want/need to keep 2 or 5 or 10 items on the stack?

Yup, that'd be completely fine. That's what we do – we just enable/disable the `undo/redo` commands on our side and that affect the disable/enable state of our undo/redo buttons. We're only interested whether there's at least one undoable/redoable item out there.



> I would agree that this would work - but it's kind of a hack and labeling all edits just "Editing" is probably not what they had in mind when they added the label.

I think that there may be some cases fo the label. For instance, you may have a graphics editor and a close set of operations that the user can perform. That would allow labeling them and that may be somehow useful. 

So, while I wouldn't use it, I can't say that it's definitely completely useless. 

BTW, I think that only Safari names its undo/redo options. Other browsers always display "Undo"/"Redo".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/209#issuecomment-531585446

Received on Sunday, 15 September 2019 17:50:10 UTC