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

Option to collapse all matches in a specific folder #6

Open
jpfleury opened this issue May 23, 2011 · 4 comments
Open

Option to collapse all matches in a specific folder #6

jpfleury opened this issue May 23, 2011 · 4 comments

Comments

@jpfleury
Copy link
Contributor

After searching, we can realize that all matches in a specific subfolder are not relevant for us. It would be very useful to have an option in the "right click menu" to collapse all these results. Example:

Say results are:

- folder1/file1
- folder1/file2
- folder2/file1
- folder2/file2
- folder3/file1
- folder4/file1
- folder4/file2
- folder4/file3
- folder4/file4
- folder4/file5
- folder4/file6
- folder4/file7
- folder4/file8
- folder4/file9
- folder4/file10
- folder5/file1

A lot of matches are in "folder4". If they are irrelevant for us, we could click right on any result of this subfolder and have the following choices:

Copy
----
Expand All
Collapse All
Collapse all matches in "folder4"

Written in a more generic form, the new option would be Collapse all matches in "%(folder of the clicked match)s".

@oliver
Copy link
Owner

oliver commented May 24, 2011

What if the result list is like this:

- folderA/folder1/file1
- folderA/folder1/file2
- folderA/folder2/file1
- folderA/folder2/file2
- folderB/folder1/file1
- folderB/folder1/file2
- folderB/folder2/file1
- folderB/folder2/file2

What should the context menu for the first entry show: "Collapse folderA" or "Collapse folder1"?

@jpfleury
Copy link
Contributor Author

I think it would make it very clear if it showed the direct parent, so Collapse "folder1" (or Collapse "folderA/folder1" if relative path is displayed).

@oliver
Copy link
Owner

oliver commented May 25, 2011

Hm... collapsing the direct parent would be good to get consistent and reliable behavior. However, how about a case like this, which is not uncommon:

- file-search/ui.py
- file-search/searcher.py
- file-search/locale/de/LC_MESSAGES/file-search.po
- file-search/locale/fr/LC_MESSAGES/file-search.po
- file-search/locale/ru/LC_MESSAGES/file-search.po
- testbranch/abc
- testbranch/bar
- testbranch/foo

It would be useful to hide all .po files, and to collapse the entire "locale" directory, but that would not be possible if the context menu only offers "Collapse LC_MESSAGES".
It might be possible to automatically detect that "locale" is the common ancestor of all three .po files, and offer "Collapse locale" in context menu; but that would be an unpredictable behavior which might be irritating during use.

A completely different way would be to arrange all results in the list in a tree structure, similar to their location in the file system (I think Kdevelop 4 does that); but that might create lots of useless directory entries even for normal uses.

Yet another solution might be to detect which part of the path the user has clicked on when opening the context menu, and offer to collapse that directory part. I guess that would be difficult to implement, and might not be obvious to the user.

Well I'm really not sure yet what to do :-)

@jpfleury
Copy link
Contributor Author

What about adding all parents in the context menu? Example:

Copy
----
Expand All
Collapse All
----
Collapse "file-search/locale/de/LC_MESSAGES"
Collapse "file-search/locale/de"
Collapse "file-search/locale"
Collapse "file-search"

Or maybe add x parents, for example 3 parents: direct parent, grandparent and great-grand-parent.

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