-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add excerpts into outline panel #13034
Conversation
bba2c85
to
c000970
Compare
CI seems unrelated, as the PR with only README.md changed fails the same way: #13036 |
@SomeoneToIgnore Thanks for adding this outline panel. The main reason I'd use this is to wade through search results in a multi-buffer similar to the screenshots above. If it never changes from here it will still be useful, but I find this display of excerpts and nodes a bit disorienting. Really the only thing I'd want to see after performing a search is a list of lines containing the search term underneath the file. So instead of...
...more like...
...with the word "Test" highlighted in each result in the panel. As it is the excerpt and node hierarchy make it difficult to click/visualize and find the actual line where the search result is. I understand that what I have proposed here maybe conflicts with the name "Outline Panel", but I'm suggesting keeping the folder/file outline but, specifically for search, displaying search results rather than a tree of nodes in the file. |
Sounds very reasonable, but I'd want to keep things this way for now, and explore how "project git diff" works with this feature — keeping the outlines there is odd too, and with 3 different cases of sub-item display, it might be simpler to have a good abstraction on top of them all. |
Follow-up of zed-industries#12637 Adds excerpt items into the outline panel: now all outline items are initially hidden under excerpt items that could be toggled open/closed similar to directories. ![Screenshot 2024-06-14 at 10 45 04](https://github.com/zed-industries/zed/assets/2690773/9c9ef91b-1666-43c3-acc4-96f850098a28) On active editor's selection change, a corresponding outline will be revealed still, expanding the corresponding excerpt ![Screenshot 2024-06-14 at 10 45 13](https://github.com/zed-industries/zed/assets/2690773/7dfd14f7-4aca-48f2-8760-8e1362b9a043) Release Notes: - N/A
@baldwindavid , have you considered how would you want to see these entries in the panel? I am not sure still, considering options — seems like I'd like to preserve the FS entries' representation (down to files and, maybe, excerpts) as a tree structure. |
Hi @SomeoneToIgnore - I'm really speaking to just search results here so this probably won't help from a holistic abstraction perspective... I'm not opposed to the tree-like structure entirely; just not a fan of it down to the excerpt level and, especially, the syntax tree within the excerpts. When I search for a term I really only care about the specific lines that that term matches. The excerpt lines just seem like more of an ephemeral/changeable display concern than something relevant to a search result. Thus, my view on it is pretty much as mentioned above in #13034 (comment) - Directories and file names, but with a bit of text per match with the match highlighted in the text. Not that things need to be just like VSCode but, as an example, this is effectively exactly how it displays search results and it makes it easy to navigate through them. VSCode does also have "sticky headers" which makes this easier to see, but that's a whole other feature (#7243). Lastly, VSCode also has a non-tree view that can be toggled. I tend to use the tree view more, but they're both good. |
Follow-up of #12637
Adds excerpt items into the outline panel: now all outline items are initially hidden under excerpt items that could be toggled open/closed similar to directories.
On active editor's selection change, a corresponding outline will be revealed still, expanding the corresponding excerpt
Release Notes: