News for hackers. Stuff that matters.
Re:How to build undo/redo in a multiplayer environment by Li... by hamtr on Thursday June 09, 2022 @11:59AM (#31682853)
In design tools, like Figma, undo sometimes just walks backwards through your selection (even if you didn't change anything). It'll even switch between pages. I'm interesting in seeing if there are other ones people can bring up
Re:How to build undo/redo in a multiplayer environment by Li... by guillaumesalles on Thursday June 09, 2022 @12:13PM (#31683045)
For rich text editing, undo should probably reset the scroll position and the cursor close the edit you're undoing.

I think reseting the time position would also make sense for video editing.

So basically, it's a way to get back as much as possible in the context you were at the time of the operation that is undone.

Re:How to build undo/redo in a multiplayer environment by Li... by aranchelk on Thursday June 09, 2022 @12:48PM (#31683549)
Thank you, this is both a good and nuanced example.

It would likely be a better UX if that scrolling (etc) brought the user back to the exact context they made that edit, but in the interest of laziness and impatience I'm just using a generic focus function.

It might be nice to have more exact context data available for the life of a session as a progressive enhancement, though I think it would have to be a clever encoding, else that data would be invalid in cases such as window resizes and edits made by collaborators that change position of the object being edited.

Re:How to build undo/redo in a multiplayer environment by Li... by aranchelk on Thursday June 09, 2022 @12:35PM (#31683360)
Interesting, that's a really good one, thank you.

Now that I'm thinking about it, when I used to use Autodesk Fusion 360 I think it did this a bit, but until now I thought it was just another bug: they had accidentally added some UI state changes to the undo stack.