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 Request] Toggle all below #41

Open
dhirschfeld opened this issue Feb 12, 2024 · 3 comments
Open

[Feature Request] Toggle all below #41

dhirschfeld opened this issue Feb 12, 2024 · 3 comments

Comments

@dhirschfeld
Copy link

In the filebrowser, clicking on a directory will expand/collapse the immediate children of that directory.

It would be great to have some way to apply that recursively for all folders below the one selected so that, with a single click/key-combo, you could expand (or collapse) everything beneath the selected folder.

@juftin
Copy link
Owner

juftin commented Feb 12, 2024

This is a neat idea, it might be a difficult one to implement though for a couple reasons:

  • The TUI framework browsr uses, textual, doesn't current give a way to recursively open directory nodes.
  • Each time a directory is expanded a worker process is launched to list its contents. This probably isn't a problem when you're working on a local filesystem - but could become problematic when dealing with filesystems like AWS S3 / SFTP / GitHub. I wouldn't be surprised to see this crash for the remote filesystems.

Recursive closing is actually coming soon with a new Refresh shortcut that refreshes the current directory tree to sync new/deleted files. Recursive closing is a side effect of this feature.

I will think on this one and follow up.

@dhirschfeld
Copy link
Author

The TUI framework browsr uses, textual, doesn't current give a way to recursively open directory nodes.

It sounds like this might be a feature request for upstream 🤔

@juftin
Copy link
Owner

juftin commented Feb 12, 2024

I might be wrong on that one - it looks the the parent of the DirectoryTree, Tree, might actually have some of this functionality. I'll keep digging

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

No branches or pull requests

2 participants