Code Monkey home page Code Monkey logo

Comments (7)

shundhammer avatar shundhammer commented on May 28, 2024

This is wrong on so many levels...

  • The forced deletion already tells you "Delete (no way to undelete!)" in its title. This is the first of many reminders that you should be cautious when using that function.

  • It prompts you for confirmation.

  • That confirmation pop-up contains the first few files or directories to delete with their full paths, and an additional total number that will be deleted.

    del-files

  • If that set of items to delete contains directories, it also says in bold font "Directory" to make that clear.

    del-dirs

Yet you manage to blame the program on your own bad decisions. Sorry, no. That function needs to remain usable. We are not doing the American approach here of dumbing down everything to the level of making it completely useless. I flatly refuse.

If you think you can't handle this powerful cleanup action, simply disable it and use "move to trash" instead which lets you restore everything if you think you did it wrong.

Why the hell do you keep Ctrl-clicking until you forgot what all that stuff is that you selected? If you are unsure, select only one (or very few) items and invoke the cleanup action with those few items, then select and delete again. Don't make an elaborate selection that takes you several minutes, during which time you lose track of what is selected.

That's when the "tear-off" function of the "Cleanup" menu comes in handy: Use the dotted line above the first item in the "Cleanup" menu from the menu bar (not the context menu!), and you have all the cleanup actions instantly available:

cleanup-tearoff

Now you can select one directory at a time and nuke it without having to opening that menu again. That's the reason why I added this feature. I do that in conjunction with the "Bookmarks" menu (which also has that "tear-off" feature) to rapidly review all the junk directories that my Internet browsers keep filling all the time.

The "Delete (no way to undelete!)" cleanup is the big gun for big boys. It needs to be used with great deliberation; it's definitely not something for casual use.

from qdirstat.

shundhammer avatar shundhammer commented on May 28, 2024

I can see no legitimate use for selecting anything for deletion when an ancestor folder is already there to be deleted.

I can. I do that all the time. When I spot a big blob in the treemap that I want to get rid of, I select it. And sometimes I also select its parent or grandparent or higher up. I don't want or need yet another babysitter flooding me with more warnings.

Therefore, one could make QDirStat show a big flashy warning, whenever a user wants an item and any of its ancestors deleted in the same operation.

You received such a warning. You ignored it. Lesson learned: Too many admonitions only lead to a "Yes, mom" reaction with rolling eyes - and get ignored.

Another option would be to automatically deselect a directory when any descendant item is added to the selection, and block any ancestor directories of already selected items from being added to the selection.

What happens internally is that the set of selected items gets normalized, meaning that child (or grandchild etc.) items are removed from the set when the parent / grandparent etc. is already selected. This is needed because depending on the order of deletion, when the parent / grandparent is deleted first, the child / grandchild ceases to exist before it's its turn to also get deleted, resulting in invalid pointers.

from qdirstat.

shundhammer avatar shundhammer commented on May 28, 2024

In summary: When you use the Big Nuke, be careful. Nuke one country (or better yet, one city) at a time, not a whole continent. Nuke deliberately, not indiscriminately.

Alternatively, don't use the nuke; put individuals into jail (the trash can) and then revisit the jail population before you nuke the jail (empty the trash).

from qdirstat.

escitalopram avatar escitalopram commented on May 28, 2024

I'm sorry that you interpret my suggestion as whining after my lost data. It was not meant as such. I'm not blaming anyone. The data wasn't even that important to begin with. I've also been a regular and happy user of qdirstat and kdirstat for a long time. I was sharing an experience with using qdirstat with the hope to contribute in some way to spare other users the experience I had. Think of it like a RCA after a plane crash.

Letting the user select an item and one of its parent folders to delete is obviously something that was not thought about prior, because if it were, there wouldn't be any of the process failed to start errors. I think we won't disagree about that? But I can see that some other users perceive this as a feature. And if that's important, I don't disagree about leaving the selection process the way it is.

However, I cannot follow your arguments about »You have been warned«. By not using a full list of selected items to delete in the warning dialog, you are actively preventing the user from checking their decision once more. The warning message is incomplete if enough items are selected , and because it is a modal dialog, people are discouraged from checking their selection in the tree view. Also, appending a line or two to the warning dialog about having selected an item and one of its ancestors wouldn't hurt anyone.

I think good software should make it hard for users to err, while at the same time not constraining them too much (think of e.g. autocomplete).

Once more: I'm not here to blame anyone, and I recognize, that deleting stuff is the user's responsibility after all.

from qdirstat.

shundhammer avatar shundhammer commented on May 28, 2024

Adding a scrollable list with all items that are selected would only make the problem recursive, and nobody would read it if it's more than a handful of items. Even the 7 or so that are currently being displayed are borderline useful.

Imagine you selected 5 directories and 5 files outside of those directories. What would it display? The 5 files; and 5 directories? Or 5 directories with their complete content? Or yet another tree view where you'd want to expand or collapse that content?

Right now, you see something like this:

del-selected-dirs

That pop-up does not live in isolation! You also have the main window with the details panel on the right that gives a summary of what you selected, and you can still see the treemap with the selected items outlined in red (for the current one) and yellow (for all other selected ones). If you are unsure, you can cancel the cleanup action at any time without losing the selection and revisit it.

But again, it's much more useful not to spend a long time for an elaborate selection, but to repeatedly select a few items and then start the cleanup action for those few ones; in particular if it's a very destructive one that cannot be undone, such as "Delete (no undelete!)" or "Clear directory contents".

What you suggest comes close to this:

full-list

or this:

only-dirs

And now what? What does that tell me other than "gee, that's a lot of stuff"? This is completely over the top for a confirmation pop-up! It's so large (by necessity) that it covers a good part of the main window, obscuring a lot of other stuff that I might be interested in.

You expect users to scroll in that list and go through it item by item, and for each one to think hard if they really want to delete this particular one; for each one? Without being able to see more details about it in the details panel on the right? The same kind of users who just spent many minutes clicking together a selection of that size?

That's not realistic. Nobody does that.

And it gets worse: If I then decide that I probably selected too much, then what? Then I close that list and go hunting for the things that were too much? How would I go about that? Frantically go through the tree view in the main window and search where those items were?

Or add another level of selection in that list where I could remove items from it? With one click - and oops, it's gone, that was the wrong one; how do I get it back into the list? Or with yet another confirmation, i.e. a confirmation pop-up in the big confirmation list?

Don't you see where this is going? It only makes the whole experience worse. A lot worse.

And, as explained before, that concept already exists: It's the desktop trash can. If this is the approach you like, simply don't delete directly; move to trash, then check the trash, and if you find anything that shouldn't be there, restore it with two clicks.

from qdirstat.

escitalopram avatar escitalopram commented on May 28, 2024

I'm sorry for not being sufficiently clear about whether I suggested a list of all items to be deleted or just the selected ones. I meant just the selected ones. I corrected that in my last post. I'm a little short with time atm, but I will consider the rest of your last statement later today.

from qdirstat.

shundhammer avatar shundhammer commented on May 28, 2024

Only the selected items - that's already what you see. The only difference is that the list is cut off after a reasonable number of items; because the human brain has a hard time grasping more than about 7 items (of anything) at a time.

Again, the problem is the approach of selecting so many items at the same time. That's not a good idea; at least not for this particular cleanup action. I wouldn't do that. But I also don't want to treat users like little children; if they insist, they are free to work that way. But there might be bad consequences in some scenarios, as you found out.

from qdirstat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.