Add support of auto folded directories
Added support of auto collapsed directories, for example when directory has only one directory inside we should display it as dir1/dir2 (#6935 ). Please feel free to propose better solutions, as I am new in Rust
Demo: https://streamable.com/seo3n9
Release Notes:
- Added support for auto-collapsing directories.
A few notes related to the UX, based on a real Java project (https://github.com/vaadin/flow/)
Here, flow-test-generic has the action, but it does nothing — I would expect it either to be absent, or actually folding/unfolding the directories below it, even though there's no direct children that can be folded.
Here .github directory has nothing foldable in the entire tree, but it has the menu item for some reason.
- when I unfold the hierarchy of files with the dir collapsed
it does close the new unfolded directories, and I have to make an extra click to open the back:
that does not seem right to me, as the original, folded view did show those directories as "open".
How does this interact with paths that only have an empty directory at the end? Particularly if you have say, foo/bar and foo/baz and both bar and baz are empty.
How does this interact with paths that only have an empty directory at the end? Particularly if you have say,
foo/barandfoo/bazand both bar and baz are empty.
it would not fold them as foo has 2 children, and bar and baz has no children. Checked in vscode, the behaviour is the same:
And what is the expected behaviour?
I don't really have experience with such functionality so no good references. Not folding seems reasonable there.
And I assume foo/bar/baz/xyz/zy where zy is empty would get folded?
I don't really have experience with such functionality so no good references. Not folding seems reasonable there.
And I assume
foo/bar/baz/xyz/zywherezyis empty would get folded?
Yep, it does not matter if the last dir has children or not
I don't really have experience with such functionality so no good references. Not folding seems reasonable there. And I assume
foo/bar/baz/xyz/zywherezyis empty would get folded?Yep, it does not matter if the last dir has children or not
do you consider a empty-directory icon or hide the open-directory chevron?