Bug 426354 - Indicate wether folder is empty or have hidden files
Summary: Indicate wether folder is empty or have hidden files
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-09-09 21:27 UTC by Maksym Hazevych
Modified: 2020-12-06 16:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.04


Attachments
empty folder (or with only hidden files?) (64.37 KB, image/png)
2020-09-09 21:27 UTC, Maksym Hazevych
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maksym Hazevych 2020-09-09 21:27:35 UTC
Created attachment 131523 [details]
empty folder (or with only hidden files?)

SUMMARY
There should be some indication that folder is empty, maybe literally text "Folder is empty". I always think that folders are loading, and only after ~5 seconds get that I'm staring at empty folder.

There should be some indication whether folder is empty or have hidden items. Currently, with "show hidden files" option disabled, you can accidentally delete "empty" folder with hidden files, without noticing.

STEPS TO REPRODUCE
1. Delete any empty folder.
2. Delete any folder with only hidden files, while "show hidden files" is off.

OBSERVED RESULT
No indication whether you are deleting just empty folder, or folder with only hidden files.

EXPECTED RESULT
Indication that folder is empty or have hidden files.

ADDITIONAL INFORMATION
Also, every time I open empty folder - I'm staring at it for like 5 seconds, just to realize it's not loading, but just empty. So some obvious indication, apart from empty view, like literally "Folder is empty" text would be good.
Comment 1 Nate Graham 2020-09-10 02:53:45 UTC
Good idea! We do this in most empty QML views now, and Nautilus does this too. Seems to make sense for Dolphin.
Comment 2 Bug Janitor Service 2020-11-17 23:19:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/118
Comment 3 Elvis Angelaccio 2020-11-28 19:06:42 UTC
Git commit 78c7429a35c9bdbcdb76fd6304210237e5dbc2f5 by Elvis Angelaccio, on behalf of Nate Graham.
Committed on 28/11/2020 at 19:06.
Pushed by elvisangelaccio into branch 'master'.

Add placeholder text for empty views

Throughout our QML-based software, we now display placeholder text for
empty views so that the user knows that the view is actually empty, and
it's not that the software is just broken.

This commit introduces the same thing for Dolphin's main view.
Related: bug 429248
FIXED-IN: 21.04

M  +71   -1    src/views/dolphinview.cpp
M  +4    -0    src/views/dolphinview.h

https://invent.kde.org/system/dolphin/commit/78c7429a35c9bdbcdb76fd6304210237e5dbc2f5
Comment 4 Christoph Feck 2020-12-02 23:20:19 UTC
It said "Folder is empty" on an SFTP folder, then a second later showed the contents. Is this expected behaviour?

The message nearly got me a heart attack, because that remote folder was my remote backup cluster...
Comment 5 Nate Graham 2020-12-03 04:16:59 UTC
No, there is a bug that causes the message to show up while the folder is still loading. Fixing it is on my to-do list. I took a first look but arrived at the somewhat depressing conclusion that it would require a partial rewrite of the feature, to move the code from dolphinview to dolphinviewcontainer, because dolphinviewcontainer is the only class that has the requisite information about the loading progress and status.

I'll get it done before this feature ships to users in 21.04.
Comment 6 Claudius Ellsel 2020-12-05 21:45:44 UTC
I like the introduced solution. It is one further step towards making Dolphin appear more reliable to users imho.

This bug also talks about treating folders with hidden files. How does that currently work with the new system? There doesn't seem to be a message for that case currently and showing "empty folder" would be pretty misleading imho.

Thus for now I will reopen this, but am also open to further track this special case in a different bug.
Comment 7 Nate Graham 2020-12-05 22:34:19 UTC
I deliberately decided not to implement that now as it opened a bit of a can of worms in terms of both design and code when I considered it. I also didn't think it was genuinely that important to indicate. Hidden files are not normally things that users need to interact with, so advertising their presence--but only for otherwise empty folders--didn't seem like a very good idea to me.

If you feel that it's a genuinely good and useful thing to do, let's track that with a separate bug report.
Comment 8 Claudius Ellsel 2020-12-05 23:13:25 UTC
Alright. I also saw the discussion in the MR about this after commenting here.

Personally I feel this should be treated differently (but not sure how other file managers like Nautilus or Windows Explorer treat this). The reasoning is that I tend to look whether folders contain stuff before deleting them. With this I'd potentially delete hidden stuff without realizing.

I'll create a new bug for that soon and reference here.
Comment 9 Claudius Ellsel 2020-12-06 16:10:27 UTC
Alright, follow up bug is https://bugs.kde.org/show_bug.cgi?id=430082.
Comment 10 Claudius Ellsel 2020-12-06 16:14:40 UTC
I also created https://bugs.kde.org/show_bug.cgi?id=430085 now to keep track of the fix for the problem while folders are still loading.