9

I have in some occasions seen treeview interfaces that displays all folders with a little expander icon beside it, but in some occasions this expander when clicked reveals no new files under that folder.

enter image description here

I assume that this is a quirk due to lazy loading -- which only loads children when requested to -- not knowing if it will have anything to load, but is there any other reasons for this behavior? Are there cases where we want to treat expandable independently from currently having children? In other words, when might it be desirable to expand/collapse empty folders?

7

Personally I prefer if an expander is (only) visible, when the folder contains children (or triggers lazy loading), thus preventing unnecessary clicks.
In a folder-only tree with a separate file-pane, the folder icon could be 'open' for the active folder.
In a mixed tree with files and folders, the folder icon could be 'open' for all expanded folders.

On the other hand it seems that anything goes, for example:

Win7 explorer

  • displays a tree with folders on the left, and a file list in a separate pane
  • always shows icons that look like an open folder (no matter if folder is expand or collapsed, empty or full).
  • shows an expander icon for non-empty folders only (only visible when the tree is hovered)

Mac Finder (list view)

  • displays files and folders in one tree
  • always shows icons that look like a closed folder (no matter if folder is expand or collapsed, empty or full).
  • It always shows an expander icon, not matter if children are present or not

I think good usability should try to match user's expectation, so it depends on the user's background and the application's overall style.

4

I think you should allow users to expand empty folders. I'd turn around the question, is there any good reason NOT to allow for that? When I load up folders on my computer, I can still look inside empty folders. Over time users have become most familiar with this behavior. How can users best confirm that the folder is empty without expanding it? If nothing happens, they may wonder if it's empty or if it didn't load correctly. Not expanding does not give as much feedback as expanding and visually CONFIRMING the empty folder.

  • 4
    In a treeview I would argue that having an expander icon beside a folder gives the information that there are files here, and if the folder does not have an expander icon beside it, the user automatically knows that it is empty without having to look inside. – bpromas Jun 11 '15 at 13:34
  • As a side note, that first photo confuses me because the folder icon visually looks like it is already open/expanded. And yet it has the expander icon next to it with the "plus" showing. – Rachel9494 Jun 11 '15 at 13:48
  • @BrunoRomaszkiewicz from windows to mac, users have decades of experience accustoming them to being able to open empty folders and verify with their own eyes that a folder is indeed, empty. I think you should always go with existing standards, and not force your own "logical" preferences onto users. – HC_ Jun 11 '15 at 19:57
  • @HC_ I don't think it's convention though. I am talking about treeviews as isolated entities. Windows explorer's treeview, for instance, doesn't have the little "+" expander icons beside empty folder icons. – bpromas Jun 11 '15 at 20:10
  • 1
    @BrunoRomaszkiewicz Ah I see I misunderstood. Perhaps if you used an icon of a folder with a paper inside it for folders that contain files, and then used an empty folder icon for empty folders, it would help (by adding 1 more signal) users see that a folder is empty? Or you could cause double clicking an empty folder to "open" into an empty folder (icon-wise?) Best of luck. – HC_ Jun 11 '15 at 20:18
1

I think you answered your own question, if there is clear visual cues that the folder is empty then you don't need to expand it. If it's not clear then expand and say 'Empty folder' although the best UI is the one that needs the least amount of explanation and avoid unnecessary clicks.

1

This is a quirk due to a combination of lazy loading and lazy programmers :).

If the node does not have child items then it shouldn't show the expander because there is nothing to expand. A node is only expandable due to the fact that it contains children.

Think of how weird it would be in Windows explorer if you could expand folders that did not have any subfolders - it just feels wrong.

0

IMO, you shouldn't have both files and folders inside of the tree view. The tree view should be just the folders with a separate panel to the right to show files inside of the currently selected folder. In this case, no expander image would be a good indicator that there is nothing inside of the folder. If you want to display folders and files together, then it should be more like Windows Explorer where you show only that right panel with files and folders for the currently selected path and you can navigate around, one location at a time. This should be familiar enough to users to understand.

However, if you want to use a tree for both files and folders. Then I suggest keeping the expander image. It is a good secondary indicator that the item is a folder and not just a file that someone associated a folder looking icon to it.

0

From the user perspective the ability to expand a folder hints that there is content within that folder. Lets say a user were to see the the same folder icon, or plus icon, whatever it may be they would expect content. In a scenario with no differentiation between the parent folders a user could potentially try and expand the first 10 folder to find out there is no content.

Best practice is to differentiate the empty folders to the folders that contain content, files, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.