-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to delete project contents when removing from Project Manager is too dangerous #74678
Comments
This was reported but not reproduced so should be reopened Duplicate of #71053 |
I think it is fine to keep this one open and leave that one closed |
True, as long as it's linked here the comments there are accessible |
I would remove the option to delete the project contents, and let users do it from their filesystem. Most likely what happened here, and what happened in #71053, is that the users thought they were creating a subfolder for their project, but instead they create a project in the parent folder that ended up being deleted. This happens more often that not and is due to bad UX from our project creation dialog: This is the default state when you create a project. There's a warning that the project path is not empty, but it's easy to miss. If I click "Create & Edit" here, I might expect it to create the "New Game Project" folder, but no, it will create a This bad UX should also be fixed, but until it is, having a destructive option to cleanup such easy mistake is way too dangerous. |
I think it is better to prohibit creating projects in non-empty directories. Then, in theory, we will avoid the situation with creating a project in a folder with important data. This should solve both problems: 1. cluttering up |
I tend to agree. This used to be the behavior but it was changed in #42526 (CC @aaronfranke). |
Wow, I didn't notice that this behavior changed several times. But perhaps the use case described in godotengine/godot-proposals#1811 is too rare to maintain it at this cost:
You can first create an empty project and repository locally and then push it. |
As a UX improvement, we could make the project manager automatically fill out the Project Path field as users type in the Project Name field. We'd have to define conventions for converting characters that might be valid for project names but not for directory names, which might open another can of worms... |
I've been working on this here: #56420 |
I was about to mention #74874 too because I just saw the thread on Reddit. I think a fix for this and @nathanfranke's PR would go well together, as they both help to mitigate this particular problem. Can someone take a look at it and see if it can be merged? We could then implement the changes discussed here on top of that. |
I agree with the above comments - @nathanfranke's solution makes the most sense to me. Instead of a button to create a new folder, creating a new folder should be the default operation, so that you don't accidentally mess up. It should be a toggle button like in #56420. There is no reason that creating a folder should be a manual extra step the user has to do. 99% of the time you want to create a subfolder for the project. Using an existing folder is for edge cases only. |
I want to second this by saying I just now accidentally wiped my documents folder and as the project file deletion does not put it in the bin my files are now unrecoverable. But this is a security and UX risk as it is extremely easy to butter finger into deleting major parts of ones non-Godot related files. |
Someone just ended up creating a project in their Documents folder due to this. So yeah, let's create a folder by default. |
Instead of allowing to create project in empty folders, the project manager could just ignore hidden files. So folders with only hidden files would be considered empty. |
When creating a new project, there is a yellow warning and a confirmation popup. When downloading a project from the asset library, the confirmation popup is not present. Clicking the "Install & Edit" button just instantly opens the project. This is a huge issue, and is probably the cause of this user's problem. The warning dialogue meant to prevent users from making mistakes is just completely missing when downloading projects from the asset library. |
This again would hide information from and makes assumptions for the user. That's never a good idea in UX design. IMO being more verbose and explicit is the way to go here. |
And also, if creating was only allowed in empty folders, the rules would be simple and predictable and easy to follow. No exceptions, no edge cases. Wanna create a project? Only in an empty folder. I think people are capable of adjusting their workflows accordingly. |
I didn't mean completely ignored. We could have a warning that the project has some hidden files, just like we had warning about non-empty folder. Allowing this would cover both issues - you could create projects in folders with .git, but not in your documents etc. |
@KoBeWi What about the |
That makes sense too I guess. |
But is it worth it? Look at the exceptions you're coming up with. Why is a file in the directory okay but a folder is not? What if someone has a bunch of important files but no folders in a directory? They're going to end up here again. I really think this rule needs to be clearer and simpler. This issue is about weighing convenience for experienced users against catastrophe for beginners. Maybe err on the side of those that have more to lose? |
Well in any case, the current solution is #56420, which will make the folder created by default. So you will only risk if you disable a checkbox for creating the folder. |
Hi that was my proposal BTW:) And I love that feature. I think the Create project dialog should create new folder automatically, I always create it. |
So can we reach a consensus in time for 4.1 on how to handle this? I think #56420 is great and should definitely be merged, but what about the rest? Should it ever be allowed to create a project in a folder that is not empty? I don't think it should, as the convenience of doing so doesn't outweigh the possible downside of people accidentally deleting important files. Should the ability to delete files when removing projects be brought back? I don't have too much of an opinion, but from years of using Unreal Engine I can't say I ever missed that feature (Unreal doesn't allow deleting project files from the launcher either. In fact, it doesn't even have an option for removing projects from the launcher at all). |
If you initialize version control metadata manually before creating a project, you need to be able to create a project in a folder with existing files.
I don't think it's that important to have in the editor. File managers exist on every platform the Godot editor supports, and in HTML5, you can remove per-site data using the browser settings. |
That is true. There are also other very valid use cases that require creating a new project in a non-empty directory. The question is are these use cases more important than people losing their stuff because they failed to pay attention just once? And my stance so far is that they are not. You can just as easily initialize the git repo after creating the project. I'm aware that this creates inconvenience to people who are used to a certain workflow. No doubt about it. But as I wrote earlier, I think disaster prevention trumps convenience. |
Godot version
4
System information
Windows 10
Issue description
I created a project to try the new version of Godot but I couldn't run it for more than 15 seconds.
Godot crashed after a short time so I wanted to delete the project in order to create another one and that's when the magic happened,
it deleted not only the Godot project folder but also the folder before it i.e. my user folder ("C:\Users\{user}\document") and of course nothing that was deleted was found in the recycle bin.
Steps to reproduce
Create and delete a project via the launcher
Minimal reproduction project
empty
The text was updated successfully, but these errors were encountered: