Fix undo/redo

I noticed that netsblox has a much much better undo/redo function, which works waaaay better than snap's. I was wondering if it would be possible to make undo/redo for snap much better. It would definitely encourage me to use it more often (I don't use it because there are many many problems with it).

What problems?

sometimes when you undo or redo, the block goes into the wrong slot, inputs may become lost (until you reload the project)

Yeah, we know. We would have just taken their code altogether except that their fork of Snap! predates some major changes in the internal organization of Snap!'s code, so instead Jens had to reimplement portions of it. Probably improvement will be gradual, one bug at a time, but I'm not sure.


NetsBlox uses "shadow" concept for modification.
Most changes are implemented as an add-on file (*-ext.js) overriding default implementation. So modifications are quite readable.

Readability isn't the issue. Undo code dives deep into the data structures of Snap!/Netsblox, and those have changed in Snap! recently, so their code (Brian Broll's code, to be specific) can't just be imported into Snap!.

By the way, Snap!Con2021 features a keynote, another talk, and three workshops about NetsBlox. Not too late to register... (This paragraph isn't for dardoro but for the rest of y'all.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.