Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add TreeView #1928

Open
rc1 opened this issue Sep 15, 2020 · 109 comments
Open

Feature: Add TreeView #1928

rc1 opened this issue Sep 15, 2020 · 109 comments

Comments

@rc1
Copy link

rc1 commented Sep 15, 2020

Important

Current status: #1928 (comment)

Is your feature request related to a problem? Please describe.

Typically, I work in a project folder. That folder might have multiple sub folders like: images, src, prints, presentations. With Windows Explorer and Files, I must keep navigating in and out of folders. I want a view of all my files and folders in one view. Much like how VS Code's 'Explorer' handles files display and navigation, or how Mac's Finder handles.

Describe the solution you'd like

In list view, I'd like a tree navigation component for files allowing me to expand a folder to list is child files and folders (which can be expanded too)

Describe alternatives you've considered
None. I've tried for years now without this feature on Windows. Still miss it sorely from Mac.

Additional context
There is discussion on Reddit where someone looks for this feature on Windows.

Here is a found image of Finder on Mac.
image

@ghost ghost added the needs-triage label Sep 15, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@mdtauk
Copy link
Contributor

mdtauk commented Jul 3, 2021

In case this is looked at again, here is a mock-up for how it could be implemented

image

The drop down would allow the picking of a drive

@ghost
Copy link

ghost commented Jul 13, 2021

-treeview in sidebar helps to quickly move files b/w folders.
-helps with quick navigation like if i am in X folder and want to open Z folder without the need to open a new tab or dual pane (as dual-pane will take screen space)
-also if needed can perform actions like open in new window or open in new tab or in 2nd pane or open terminal in a certain folder from the sidebar
-if we only have sidebar support then we will have to pin a folder for quick action and it will clutter the sidebar

@mdtauk
Copy link
Contributor

mdtauk commented Jul 13, 2021

Despite my previous mockup showing a TreeView alongside the Sidebar, toggling between the two would work better, with only the favourites being shared between both options.
image
image
image

@yaira2 yaira2 mentioned this issue Jul 16, 2021
@firefinchdev
Copy link

firefinchdev commented Jul 24, 2021

UI mockups are fine, but I am more concerned about the UX.
In macos, once you open Finder (in tree view), you can basically navigate only using keyboard. In the UI mockups above, if I need to change my current drive (C:, D:), that needs to be done using mouse (or maybe some non-so-easy-to-run keyboard shortcut combination).

In case of macos, open Finder, press "Down" key, and now file selector(Highlighted in blue) appears. You can select any drive.
Once you are on some drive(highlighted blue), you can press "Right" key to expand the contents. This entire UX makes it very easy and fast to navigate.

We can have similar experience in Community Files.

In screenshots below, grey icons represents different drives (C:, D: in case of Windows)

Screenshot 2021-07-24 at 1 23 02 PM

Screenshot 2021-07-24 at 1 23 33 PM

@Space-Cadet0
Copy link

This is the top missing feature for me as I navigate using the keyboard a lot

@mileyvirus
Copy link

I think it should be clarified wether this issue is asking for:

  1. macOS Finder style list view with expand/collapse disclosure triangles
  2. Windows Explorer style sidebar tree

Personally I'd much rather have the macOS Finder style view but I still think it would be better to split the issue to clarify which one has more interest.

@firefinchdev
Copy link

I would prefer macos finder style

@Space-Cadet0
Copy link

Agreed, Marcos finder tree view is better.
(The UX of windows explorer of tree view in the side bar is not good.)

@rc1
Copy link
Author

rc1 commented Oct 14, 2021

The spirit of this issue was to have a tree view of files and directories as macOS does. Not a tree view of directories. I agree that it's two separate issues.

Am I alone in thinking this is a killer feature. I'd never not use it on macOS. Strange it's missing from the windows eco-system. I wonder why that is.

@yaira2
Copy link
Member

yaira2 commented Oct 14, 2021

I think it should be clarified wether this issue is asking for:

  1. macOS Finder style list view with expand/collapse disclosure triangles
  2. Windows Explorer style sidebar tree

Personally I'd much rather have the macOS Finder style view but I still think it would be better to split the issue to clarify which one has more interest.

@mileyvirus the plan for Files is to add a tree view layout similar to the one in Finder.

@guategeek
Copy link

I have been wanting this on Windows ever since I had to leave Mac OS. So I add my vote for a Mac OS style tree view.

@charlau
Copy link

charlau commented Nov 6, 2021

That's the only thing preventing me from being in love with Files. For me, it's really a deal breaker. Any timeline for an implementation?

@mileyvirus
Copy link

That's the only thing preventing me from being in love with Files. For me, it's really a deal breaker. Any timeline for an implementation?

@charlau I'm not a contributor but 8 days ago @yaichenbaum - the lead dev - moved this issue from the To do list to the Backlog list so I don't think they plan to work on it for some time, correct me if I'm wrong.

Maybe there's a way to sponsor this issue in particular to push its priority up? Is there, @yaichenbaum?

@yaira2
Copy link
Member

yaira2 commented Nov 8, 2021

@mileyvirus I only put it in the todo column to remind myself to give an update on the issue but by all means, if someone wants to work on this or help sponsor the project, we can try working on the feature quicker.

@Draise14
Copy link

explorer_b6p2VKZBqw

Really looking forward to this feature! I will be using this to replace the default W11 explorer, but this feature will definitely make a faithful user of your work here.

@yaira2
Copy link
Member

yaira2 commented Mar 27, 2024

Unfortunately, performance remains the primary obstacle.

The core challenge lies in the tree view structure, where each tab can have a distinct state with its own set of expanded or collapsed folders. This requires individual tree view instances for each tab, which substantially raises the system’s resource consumption—this increase is proportional to the number of active tabs. In contrast, the current sidebar’s static nature permits the use of a single shared instance across all tabs.

I hope this comment provides a bit of a window into what's taking so long.

@Draise14
Copy link

Could a tree refresh/poll load on one tab once at a time? Instead of feature instance? Basically a redraw of the breadcrumb draw?

I'll trust you on it! I am sure the wait will be perfect.

@yaira2
Copy link
Member

yaira2 commented Mar 27, 2024

Could a tree refresh/poll load on one tab once at a time? Instead of feature instance? Basically a redraw of the breadcrumb draw?

I'll trust you on it! I am sure the wait will be perfect.

That's definitely an approach, the concern is that it won't happen fast enough but it could still be worth it to investigate this idea.

@schoenid
Copy link

schoenid commented May 8, 2024

Yes, I'm missing a treeview too. I'm using folder trees since over 40 years now and I'm lost without any optical orientation, where I am in a directory structure.

For the moment I'm using the Dolphin file manager for Windows (yes, this exists ...), but for some reason, only a part of it's famous posibilities were ported from Linux. Thats one reason why I'm working mostly on Linux. Unfortunately the stability of Linux is no more as good as of Windows.

I'm sure, Files would be a great tool without to let many wishes open, if this tree view for folders could be added.

@schoenid
Copy link

schoenid commented May 8, 2024

In Dolphin, there is only one tree view instance. The files views in tabs will then expand the treeview to the open location and pointing there to the actual position. If a tab is changed, simply the position in the tree view is updated, no need to handle a separate tree for every tab. This improves the performance with a little lack in navigation, but it might be a possibility for easier integration in Files too. (just only as possibility...)

@Tartarusome
Copy link

maybe there's a perfect plan,the disk's file system is NTFS or REFS on most of windows pc ,so you can use USN journal to build a database,instead of Iterating through all files on disks.
the usn journal allow you to index the names and paths of all the files and folders on a disk storing hundreds GB of files in a few seconds.
and this journal is sorted in reverse chronological order of when the files were modified, so it can update the database very quickly.
So all you need to do is write an algorithm to filter out repetitive paths and split paths into treenodes.
Or you can use everything sdk which is a ready-made method.

Translated with DeepL.com (free version)

@jh20001
Copy link

jh20001 commented Sep 3, 2024

I have been patiently waiting for a treeview like Windows Explorer has to offer. All they need to do is added it to the options on the left where they have Pinned, Drives, Cloud Drives, etc. Just convert those from being shortcuts ot being actual tree views like Windows does. That alone would win so many people over and is one of the only things holding me back from using it. I download it from time to time to see if things feel natural yet during use and that is always the thing that chases me away. Without the tree view, everything just feels so one-dimensional.

@yaira2
Copy link
Member

yaira2 commented Sep 3, 2024

I have been patiently waiting for a treeview like Windows Explorer has to offer. All they need to do is added it to the options on the left where they have Pinned, Drives, Cloud Drives, etc. Just convert those from being shortcuts ot being actual tree views like Windows does. That alone would win so many people over and is one of the only things holding me back from using it. I download it from time to time to see if things feel natural yet during use and that is always the thing that chases me away. Without the tree view, everything just feels so one-dimensional.

@jh20001 thank you for your feedback. Unfortunately it's not as simple as you make it out to be, if it were, we would have implemented this a long time ago. Please see my earlier comments for a better understanding on the challenges and what we're doing to overcome them.

@jh20001
Copy link

jh20001 commented Sep 4, 2024

That's too bad, but it does make sense. I wish I could afford to sponsor something on such a level. Patience is everything I guess. One of these days, I will completely free myself from File Explorer :)

@SgtSweetieBelle
Copy link

btw, i found a Windows file browser app called Dolphin (ported from Linux i guess?) that can do expanding file trees in the file browser. i have no idea how they got it working, but it seems to be extremely performative

image

@ketonik
Copy link

ketonik commented Oct 7, 2024

btw, i found a Windows file browser app called Dolphin (ported from Linux i guess?) that can do expanding file trees in the file browser. i have no idea how they got it working, but it seems to be extremely performative

wow SgtSweetieBelle

thx so much for sharing this find.
Details View is what I expect, disclosure triangles on each directory so I can work in the job folder in the same window, no more back and forward up/down in/out of all the sub folders in the job folder, what a headache that is.

You're right, this is indeed extremely performant.
Goes to show even cross platform API's/Frameworks perform way better than Native Windows APIs/Frameworks.

Dolphin's UI and performance is way way better than Files.
Tabs under the Path Bar is way smarter than Tabs in the Titlebar, who ever come up with that dumb idea, cos run out of space with only a few tabs and can't move the window.

Dolphin has a 'Duplicate' file/folder function, again useful direct function, The 'one dimensional' Windows developers can't think of these things, lets copy then paste the file in the same location...lol silly and over complicated.
Dolphin, lets user select font type and size and folder icon sizes too.

Dolphin just needs to calculate folder sizes and implement a macOS Quicklook...i'll be using it full time.

thx again

@ketonik
Copy link

ketonik commented Oct 7, 2024

I have been patiently waiting for a treeview like Windows Explorer has to offer. All they need to do is added it to the options on the left where they have Pinned, Drives, Cloud Drives, etc. Just convert those from being shortcuts ot being actual tree views like Windows does. That alone would win so many people over and is one of the only things holding me back from using it. I download it from time to time to see if things feel natural yet during use and that is always the thing that chases me away. Without the tree view, everything just feels so one-dimensional.

@jh20001 thank you for your feedback. Unfortunately it's not as simple as you make it out to be, if it were, we would have implemented this a long time ago. Please see my earlier comments for a better understanding on the challenges and what we're doing to overcome them.

Maybe it's a Windows thing that makes it hard. In comparison though, Apple did it on MacOS since early 1990's.
Apple also had a mouse cursor that wouldn't freeze up like Windows and Bill Gates and Microsoft developer could not figure out how they did it, and even to this day the cursor freezes or vanishes in AutoCAD when under load. Windows is and always has been a lousy OS.

@ketonik
Copy link

ketonik commented Oct 7, 2024

Mac OS System 7 Finder in 1991

Image

And here even calculated folder sizes way back then lol

Image

@yaira2
Copy link
Member

yaira2 commented Oct 8, 2024

The challenge we face is also what makes Files unique. Creating a modern file manager without compromising performance is tough. Modern frameworks struggle with large collections and memory leaks, and this is multiplied across multiple tabs. If users were satisfied with the existing solutions, they wouldn't be looking for alternatives such as Files.

In any event, we're committed to building a tree view when the time is right. Our next step in this direction is enabling Native AOT, and we hope to share more regarding this improvement in the coming months.

@yaira2
Copy link
Member

yaira2 commented Oct 8, 2024

And here even calculated folder sizes way back then lol

To be fair, file sizes were much smaller back then 🙂

@ketonik
Copy link

ketonik commented Oct 8, 2024

And here even calculated folder sizes way back then lol

To be fair, file sizes were much smaller back then 🙂

oh yes much smaller,
Far fewer files too!!
but the meta data to track BTree on the FS is tiny.

But Microsoft's excuse has always been disk i/o is too slow, which never washed back then and now we have NVMe Gen4 does 7,000MB/sec peak.
In 1991 SCSI disks could barely do 5MB/sec peak and the seek time was 10+ ms.
Sorry M$, lame excuses are just a cover up for ineptitude and laziness. ehehe

@ketonik
Copy link

ketonik commented Oct 8, 2024

The challenge we face is also what makes Files unique. Creating a modern file manager without compromising performance is tough. Modern frameworks struggle with large collections and memory leaks, and this is multiplied across multiple tabs. If users were satisfied with the existing solutions, they wouldn't be looking for alternatives such as Files.

In any event, we're committed to building a tree view when the time is right. Our next step in this direction is enabling Native AOT, and we hope to share more regarding this improvement in the coming months.

Which again comes back to M$'s API's etc, check out Spacedrive, they use Tauri app with Rust:

https://github.com/spacedriveapp/spacedrive

While it's early days, and still alpha it's super fluid.

if users were satisfied with the existing solutions, they wouldn't be looking for alternatives such as Files.
Historically Windows users are mostly satisfied else they wouldn't be developing file managers (essentially) the same as explorer, and Windows users are a stubborn bunch who rarely listen and acknowledge users with experiences with other OS's.

The requests like this one are the main reasons users looking for alternatives to Explorer are mostly other platform users who for work don't have an OS choice so must use Windows. We're the ones suffering on this backward platform with poor file managers in comparison to what we're used to, Finder, Path Finder, Forklift etc.
It's us who will ultimately help guide Windows developers by encouraging other platform solutions to long standing Windows_ism_ problems, which ultimately helps every other user, and particularly Windows users who'd have never thought of or be exposed to such features that have been on other platforms for multi decades.

In any event, we're committed to building a tree view when the time is right. Our next step in this direction is enabling Native AOT, and we hope to share more regarding this improvement in the coming months.

Thanks for making it known the state of the project, It helps us understand what is going on with this project.
I appreciate it aint easy being a Windows developer, considering M$ themselves appear to not really know what they are doing with their own Frameworks. I read recently WinUI3 has been dropped in of favour MAUI.
IDK, M$ have bigger problems they seem unable to figure out. As for Developers maybe 3rd party solutions like Tauri are a safer haven until M$ finishes experimenting.

@yaira2
Copy link
Member

yaira2 commented Oct 8, 2024

We're not Microsoft here so let's try and keep a positive vibe. We love the excitement and we're looking forward to implementing it when the time comes (hopefully in the not so distant future).

@0x5bfa
Copy link
Member

0x5bfa commented Oct 8, 2024

Here's the pains we have in our codebase.

As this application was an UWP, which limits us to fully access your storages and run in a virtualized sandbox, the application still has a lot of leftovers that were to cope with that limitation that can't be got rid of easily even though we now build on win32 desktop app. Plus, the development has been "just adding new things on what we have now" instead of thinking about what codebase architecture we want to build the app on because it's hard thing to foresee what we will have and this is one of the very features we haven't foreseen.
We have the good idea to improve code quality around folder browsing pages but it involves the entire and the important codebase.

How do you sort or group in a tree view, how do we keep compatibility with CollectionViewSource? How do you expand a folder and enumerate items in it (ShellViewModel does? Nah it makes it more complicated, abstracted storable should do)? How do we keep the expand/collapse state? Where are we gonna implement, the sidebar or the folder view?
We have a bunch of unresolved questions. This isn't just only about deciding or cleaning up the codebase but also coding with a carefully sorted out architecture design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Planning stage
Development

No branches or pull requests