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

Add Search Field #47

Open
JPluess opened this issue Sep 18, 2023 · 13 comments
Open

Add Search Field #47

JPluess opened this issue Sep 18, 2023 · 13 comments

Comments

@JPluess
Copy link

JPluess commented Sep 18, 2023

Hey, I would really appreciate having a search bar. Additionally, it would be great to have a button that toggles between searching for variable definitions, functions, and classes. This feature would significantly speed up my workflow

Gerrnperl added a commit that referenced this issue Oct 10, 2023
@Gerrnperl
Copy link
Owner

Thank you for your very inspiring idea. I have already implemented this.

Preview

I will release this version after some minor modifications.

@JPluess
Copy link
Author

JPluess commented Oct 13, 2023

Excellent, thanks for improving the tool!

  1. Is it possible to extend the search field to fit the width of the panel?
  2. If possible, I'd like to have the search field always visible.
    grafik

@Gerrnperl
Copy link
Owner

I have fixed the style of search field.


For the second, it should not automatically hide after triggering visible(alt+l).
Do you want it to be visible when the view is launched?

@JPluess
Copy link
Author

JPluess commented Oct 15, 2023

I think there is enough space to have it always visible, no need for pinning.

@Gerrnperl
Copy link
Owner

Considering some users just place the outline in a sub view, I think the ability to hide the search bar should be retained. Now I modified it to stay in the state when the editor is closed and not hide when using the shortcut key to focus the search. The effect should be the same for users who don't want it to be hidden.

@JPluess
Copy link
Author

JPluess commented Oct 17, 2023

You're absolutely right; preserving the settings is a more convenient approach that can cater to everyone's needs. Thank you for bringing this important aspect to my attention.

I usually navigate from the Explorer view. Would it be possible to integrate the full map feature with search functionality into this section? There is a horizontal tab called "Gliederung" exploring files and filecontent seems an appropriate place, the standalone section as is could still be there for those who like it that way. Here is an image to display my idea

grafik

@Gerrnperl
Copy link
Owner

VSCode supports moving any view to any panel. Thus, you can just drag this tab to the place you want.
Here is an example.
example

@JPluess
Copy link
Author

JPluess commented Oct 17, 2023

Thank you so much; I learned something new. Regarding the search functionality:

  1. Is it possible to search across all open files?
  2. Can we also search any file in the current project?

Thanks a lot.

@Gerrnperl
Copy link
Owner

Gerrnperl commented Oct 17, 2023

vscode provides a method to search for symbols in the workspace. You can use Ctrl-T to search for symbols in the workspace (you can also use Ctrl-Shift-O to search for symbols in the current file).

vscode handles symbols in the workspace and in a single file differently. I cannot directly obtain all the symbols in the workspace. I can only "search" for the workspace symbols. I think it is not necessary to implement this built-in function of vscode again.

@JPluess
Copy link
Author

JPluess commented Oct 18, 2023

Search is a bit buggy,

  • sometimes it won't accept entries not even / or # for the first char.
  • sometimes the "minimap-map" does not load.
  • or it does not link accurate when a an element is klicked.

i understand that gloabal search can be done with ctrl-T.

@Gerrnperl
Copy link
Owner

You'd better open a new issue and provide some information for reproducing...

  1. It may occur after an interrupted search, and the search runs into a unnormal mode.
  2. The map may not load if vscode doesn't return any symbol information. I have no idea how to resolve it.
  3. I have not encountered this situation, please provide the information needed to reproduce it

@JPluess
Copy link
Author

JPluess commented Oct 24, 2023

Here's how I can repeat the issue: I run any script 'some_py_script.py', and then the left panel goes to 'Execute and Debug'. Next, I click on 'Explorer View,' where I have the 'Outline View.' However, it won't show the content unless I activate a new file. So, it gets stuck there. In contrast, the built-in feature has no problem showing the content."

@JPluess
Copy link
Author

JPluess commented Oct 24, 2023

An extended idea for the search functionality could involve adding preset filters such as

  1. "Expand/Contract"
  2. "Show/Hide" for variables, functions, classes, and other elements.

This would help declutter the panel and improve usability. You could implement small toggle buttons for filtering

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