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

Search while you type... #878

Open
jukzi opened this issue Aug 24, 2022 · 7 comments
Open

Search while you type... #878

jukzi opened this issue Aug 24, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@jukzi
Copy link
Contributor

jukzi commented Aug 24, 2022

I dislike to need to open search dialog again and again. I dislike to press OK.
Idea: add a search input field to the search result view (like the filter in the error log). the value entered is shared with the fine grained search dialog.

I made a short proof of concept and would like to get feedback:
image

@laeubi
Copy link
Contributor

laeubi commented Aug 24, 2022

Some ideas where collected already here:

jukzi referenced this issue in jukzi/eclipse.platform.text Aug 25, 2022
Adds a search filter to search result View after first search.
Press ENTER to get into the fine grained search Dialog.

Providers have to implement IResearchQuery

+ some multithreading hardening of the search which pop up under that
heavy load.
@mickaelistria
Copy link
Contributor

The use-case demonstrated in the report is not realistic, it would be nice to get a concrete existing user-story that would really emphasize on what the proposal would resolve much better.
I think the various issues should be taken separately: "I dislike to need to open search dialog again and again" and "I dislike to press OK" are IMO distinct enough to be considered separately. I'm convinced that considering those separately will lead to better implementations.

For example, the 1st one, there is already have a "Re-run the current search" button that can cover this.

Also the suggested approach seems to mostly work for Text Search, while there are other Search types one would also want to make more efficient.

@jukzi
Copy link
Contributor Author

jukzi commented Aug 26, 2022

For example, the 1st one, there is already have a "Re-run the current search" button that can cover this.

I want to search for "a" and then for "b"-- rerun does not help without changing the text i am trying to search. the implementation actually uses the research button - but changes the search text before doing so. Its's a pitty you rate a proposal without even trying it out. Filtering input is a very common concept from other views so to me it feels very natural and intuitive.

Also the suggested approach seems to mostly work for Text Search, while there are other Search types one would also want to make more efficient.

All other providers just need to implement this too - that's very simple:

String getSearchString();
void setSearchString(String s);

@mickaelistria
Copy link
Contributor

I want to search for "a" and then for "b"

OK, and do you usually use Ctrl+F or Ctrl+H or Ctrl+Alt+Shift+L or ... to do so? Ie do you need integration with search view or is it more about incremental search? Because those are different beasts so far (although there is now "Select All" on the Ctrl+F dialog which has gotten them closer functionally for single files).
Would the search via the proposed filter restrict to a single scope, or would it work with other search types?
I'm afraid if we make the Search field too prominent, then we may get people failing at discovering the Search dialog which allows more powerful search. You may not like clicking OK, but sometimes, a well defined search and clicking OK would lead people to get their results more efficiently than by going for something incremental just because it's more accessible.
Hence why I'd like to get more details about the particular user-stories this is aimed to serve.

@jukzi
Copy link
Contributor Author

jukzi commented Aug 26, 2022

OK, and do you usually use Ctrl+F or Ctrl+H or Ctrl+Alt+Shift+L or ... to do so?

I am a mouse user. I am used to click through the menus. Typically i copy a text, open search and paste it (or it is already selected) crtl+v +OK. With the proposed solution i could just paste it in the search field.
The other search providers do not have key short cuts anyway:
image

Would the search via the proposed filter restrict to a single scope, or would it work with other search types?

Try it out! It works with all the fancy options, just not showing them.

people failing at discovering the Search dialog

No way: They will try to press ENTER key at some time for sure.
Maybe it's not perfect or you find a better solution, but please try it before complaining?

The user story is simply that i am used to search while type due to firefox/chrome - and there i find the feature very useful.

@mickaelistria
Copy link
Contributor

The other search providers do not have key short cuts anyway:

Ctrl+H does open the latest search provider used. File search is not different from Git search or Java search. It's just usually the 1st one in the CTabFolder so the one that's 1st visible.

I'll try the proposal, but I still think that several not-so-technically-related problems are attempted to be solved at once: improve search workflow without a mouse (eg a button to open the search dialog and/or adding a search field to start a test search on current file from the view), and making some search incremental. I would rather see those issues covered in separate patches, to facilitate reviews and make faster progress, so if you can reorganize eclipse-platform/eclipse.platform.text#81 in 2 separate PRs, it would be helpful.
Ultimately, if we can reach a state of quality that would allow to get rid of Ctrl+F in most cases, that would be a huge win. I want to make clear I support the overall idea, it's just that I prefer bringing all the questions I have right now to ensure we can make this proposal fit also in the bigger picture of basically simplifying UI and code.

@jukzi
Copy link
Contributor Author

jukzi commented Aug 26, 2022

The other search providers do not have key short cuts anyway:

Ctrl+H does open the latest search provider used.

may be in theory. in practice for java it is:
image

making some search incremental.

hah, that would be cool. technically it's just a complete restart by now. only lot of bloat code to solve MT issues that have not been found yet, since it was not usual to start multiple searches in quick succession. that could be separated but i will avoid any further work until we have a common goal.

Ctrl+F

in-document-search is not part of this change either! would be cool too. but yet totally unrelated to search providers / search result view
There are so many features that could be added ... later.

@laeubi laeubi transferred this issue from eclipse-platform/eclipse.platform.text Jun 28, 2023
@jukzi jukzi added the enhancement New feature or request label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants