godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 88 forks source link

Add a confirmation dialog for moving folders in the FileSystem dock #7862

Open ettiSurreal opened 1 year ago

ettiSurreal commented 1 year ago

Describe the project you are working on

A simple platformer game, using a git repository to work across multiple devices.

Describe the problem or limitation you are having in your project

Currently it's very easy to accidentally move a file or a folder across the file system, which will often lead to having to search for what and where was moved, and at worst an engine crash. And there is no undo for moving files! I already had two situations where i had to discard an entire commit because i accidentally moved a large folder, which completely messed up references.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a confirmation dialog for moving folders that aren't empty. Individual files are much less likely to be accidentally moved due to a misclick since dragging them on top of eachother does nothing, for that an undo function would work better.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

When trying to move a folder that isn't empty into another folder, you get a confirmation dialog, in which you can either cancel the move or confirm it. I think there should not be a "don't show again" checkbox, as i feel like most users would think of it as a first-time warning, while this is supposed to prevent accidental moves due to misinput. Instead a way to disable it should be in editor settings if desired.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think it can.

Is there a reason why this should be core and not an add-on in the asset library?

Help users not cause accidental mess-ups.

Calinou commented 1 year ago

Given moving a folder can take a long time to update references in a complex project, it makes sense to display a confirmation before this.

I wouldn't bother adding a setting to disable the confirmation unless there's a lot of demand for it though. (We need to keep the editor settings lean, and only add settings that people will really toggle on a regular basis.)

produno commented 1 year ago

To add to this, it may be a good idea to show in the confirmation box where the folder is being moved to. I have had at least a couple occasions where i thought i was moving a file to one location and it ended up somewhere else.

74boar commented 4 months ago

This is my number 1 pain point with the engine. Mistakenly moving the wrong folder can break hundreds of dependencies at once. It should not be possible to suddenly corrupt an entire project by interacting with one of the most ubiquitous parts of the engine (e.g. navigating the project directory). And even if there was no danger of broken dependencies, I still think a confirmation dialog would be a good QOL feature to prevent moving a folder accidentally.

Alternatively, a setting to simply disable drag-click on folders would achieve the same goal. Knowing the danger, I never move files with drag-click, I always use right-click -> Move/Duplicate To...