Subfolders of designated folders like Trash or Archive are not shown as subfolders in the first part of the folder list, but as usual folders in the second part, all having the prefix “[Parent Folder]/”.
I would expect that those “special” folders can also be expanded to show their subfolders.
Does this feature exist in another mail client or tool you use?
Hey! This should work in Mailspring if you create a folder just called “Archives”. The problem is that right now it looks for a parent folder, and your mail provider isn’t returning one.
We should definitely see if we can make the algorithm in the sidebar a little more flexible.
For anyone interested in taking a look at this, there’s a function in the sidebar code that takes a flat array of Folder / Label objects and produces a hierarchical representation. Right now it puts the items in alphabetical order and nests items in a single pass. We probably need to do something more sophisticated, where an (unclickable) parent item can be inferred by the presence of a path prefix on a folder / label.
thanks for replying! Unfortunately, I think you misunderstood my issue. I do have a folder called “Archives”.
In the default configuration, Mailspring shows the subfolders of it as expected:
But if I make the “Archives” folder the folder with the special role “Archive”, like this:
The subfolders of the “Archives” folder are not displayed as subfolders of the special folder, but as a flat list:
I don’t know if what you are saying is also a valid work item (are there mail providers, that allow subfolders without having the parent folder as mail folder?), but for me, this issue is about something else.
Excerpt from the IMAP LIST command to verify there is an “Archives” folder:
a LIST "" *
[…]
* LIST (\HasChildren) "/" Archives
* LIST (\HasNoChildren) "/" "Archives/JUnit KIT"
* LIST (\HasNoChildren) "/" Archives/Kursverwaltung
* LIST (\HasNoChildren) "/" Archives/come2.help
* LIST (\HasNoChildren) "/" Archives/2016
* LIST (\HasNoChildren) "/" Archives/2017
[…]
a OK List completed (0.000 + 0.000 secs).
Are we nesting infinite levels of folders? As far as I can see the sidebar tree now shows up to 2 levels of folders. E.g. If I have a folder Archive/Test1/SubTest1, the tree will become Archive -> Test1/SubTest1 (Instead of Archive -> Test1 -> SubTest1).