Default undo/redo for project explorer may not be intuitive for everyone

Currently the editor allows for undoing operations done in the project explorer.

For me realizing this came by surprise. I wanted to undo some changes in a game object and i must have selected the project explorer by accident.

So i ended up undoing quite some of files i’ve created and modified earlier. Of cause i realized this mistake after i created a new file which kills the ability for redoing.

In my opinion allowing undo/redo for file operations is not necessary for most users. In the rare cases where i create a file by accident, i can simply use the delete command.

So i suggest to have this disabled by default to prevent potential data loss for new users. Let the power users who really need undoing in the project explorer enable it by themselves through the preferences.

Hmm, I’ve never really thought of this as a problem, but maybe it is confusing? @Ragnar_Dahlen and @Ragnar_Svensson, what are your thoughts regarding this in the old and new editor?

For your interest: I’ve just tested this at my daily job with other editors containing a project explorer like Unity and Visual Studio.

None of them allow me to undo file operations in their explorer view. So far Defold is the only editor i know of which does this. :wink:

The reason it’s really convenient in Defold to have them undoable is that we patch file references in the file content as part of e.g. renaming a file, to make sure the project doesn’t break. That means that a file operation (performed in the project explorer) might also result in lots of file content changes across the project. This is all part of the Eclipse framework. I guess Unity solves the same problem by their GUID stuff, but I don’t know too much about that.
Anyway, in Editor2 we never managed to design undo for the file system part in a way that fitted the architecture/style of that application, and therefore put that on hold. We also reasoned that since git provides something similar in terms of rolling back changes (but no redo obviously), this would be enough for the time being.

3 Likes