godot icon indicating copy to clipboard operation
godot copied to clipboard

Prevent project manager from deleting files when removing projects

Open and-rad opened this issue 1 year ago • 7 comments

Fixes #74678

This is a quick fix for the immediate problem. The project manager doesn't provide the option to move the directory contents to the trash anymore. I also added some words making it clear that nothing will be deleted. The larger issue of the projet manager UX probably requires a separate proposal.

As an aside: I think the sentence "The project folders' contents won't be modified." could be replaced with something more to the point, like "This will not delete any files." May be worth discussing.

and-rad avatar Mar 10 '23 07:03 and-rad

I think it should be kept as "not modified" and "not deleted" are very different

Also the commit message sounds more like it is fixing that it doesn't delete the files, could be confusing for future maintenance, maybe "Prevent project manager from deleting files..."

AThousandShips avatar Mar 10 '23 08:03 AThousandShips

I think it should be kept as "not modified" and "not deleted" are very different

True, although I'd argue deletion is a subset of modification. My point was more that people in that situation probably care about the "deletion" part more than about the "modifcation" part, so a different wording might give them more peace of mind.

Also the commit message sounds more like it is fixing that it doesn't delete the files, could be confusing for future maintenance, maybe "Prevent project manager from deleting files..."

Fair enough, I see how this makes it less ambiguous.

and-rad avatar Mar 10 '23 08:03 and-rad

Agreed, perhaps "not deleted or modified"

AThousandShips avatar Mar 10 '23 08:03 AThousandShips

I think this is a useful option that should not be removed. Instead, we can prevent the Project Manager from treating an unrelated directory as a project. I think if we forbid creating projects in non-empty folders, then this should solve both problems.

dalexeev avatar Mar 10 '23 09:03 dalexeev

If we keep this option, we should still improve its UX to make sure that what is going to be deleted is extremely clear to the user.

It should show very clearly the path to the folder which is going to be deleted.

akien-mga avatar Mar 10 '23 10:03 akien-mga

I don't have strong feelings either way, as I've never been bitten by this, so I'm fine with either. It sounds to me that the solution with the most support behind it would be to

  • Disallow project creation in non-empty folders
  • Allow deleting files when removing projects from project manager
  • Highlight the directory that is about to be deleted

and-rad avatar Mar 10 '23 10:03 and-rad

Let's keep this discussion to one place, it gets harder and harder to follow when each of you double-posts your thoughts in both the issue and this PR :) As far as I understand, this PR was only meant as an implementation of the proposed solution, so let's keep the discussion to the issue where that proposal was made.

YuriSizov avatar Mar 10 '23 10:03 YuriSizov

Closing this, as the preferred solution likely involves a different approach.

and-rad avatar Mar 11 '23 08:03 and-rad