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

improve search field hint text #149710

Closed
wants to merge 1 commit into from
Closed

improve search field hint text #149710

wants to merge 1 commit into from

Conversation

belm0
Copy link

@belm0 belm0 commented May 17, 2022

previous: Search files by name (append : to go to line or @ to go to symbol)
proposed: Search files by name (or :line_number, @file_symbol, #workspace_symbol)

"append" of the original text was misleading, and the prefix for workspace symbol was omitted

previous:  `Search files by name (append : to go to line or @ to go to symbol)`
proposed: `Search files by name (or :line_number, @file_symbol, #workspace_symbol)`

"append" of the original text was misleading, and the prefix for workspace symbol was omitted
@roblourens
Copy link
Member

Misleading how? I think it's accurate. I don't want to take this change because we are actually working to make these features more discoverable already. See #149445 and you can enable window.experimental.titleMenu to try it

@roblourens roblourens closed this May 17, 2022
@belm0
Copy link
Author

belm0 commented May 17, 2022

Misleading how? I think it's accurate.

The current text is misleading because "append" means "add to the end". So taking it literally, "go to line" would be 123:, etc.

I don't want to take this change because we are actually working to make these features more discoverable already. See #149445 and you can enable window.experimental.titleMenu to try it.

Making search more discoverable is great, and I'll try the option. But this PR is a tangible usability improvement that can be deployed now, and I'm disappointed that it was summarily closed (before I could even answer your question). @roblourens

@roblourens
Copy link
Member

We are saying append something like :123 to go to that line in the selected file. I think advertising this feature is helpful and I want to use this space to advertise this two-step search. I think it's actually not described anywhere else in the UI, even in the ? help menu

@belm0
Copy link
Author

belm0 commented May 18, 2022

I see. It's a little confusing, because you can use :123 and @foo even without specifying a filename, and it will search the currently viewed file. (In fact, that's what "Go To Line" and "Go To Symbol in Editor" are mapped to.)

So this search box can do a lot, and there's little real estate for the hint text. But to summarize the issues:

  • the main text is "Search for files by name", but the box isn't necessarily for file scope (e.g. #foo for workspace symbol search)
  • the text says "append", but searches can also assume the current file, in which case the token ends up being a prefix
  • there's no mention of # for workspace symbol search

How about this?
try file, [file]:line_number, [file]@symbol, or #workspace_symbol

@roblourens
Copy link
Member

  1. Yes, it also does a bunch of other non-file things, type ? to see the full list
  2. "append" as in "append to your query", to me
  3. There are almost a dozen things not mentioned, we can't be exhaustive

That is a little more precise but honestly I think this extremely visible UI element should be more "friendly" than exhaustively precise.

But cc @jrieken - in case you want to think about this placeholder text while you are in the area.

@belm0
Copy link
Author

belm0 commented May 18, 2022

I had no idea about ?. At a minimum, shouldn't the hint text say "? for help"?

@roblourens
Copy link
Member

The new UI has a dedicated button for ?. Yes, discoverability of that has been an issue for a long time

@belm0
Copy link
Author

belm0 commented May 19, 2022

I understand that a form like foo.c:123 is used by error links and such, but it seems very unlikely someone will use this search box manually to go to a specific line or symbol of a remote file. Yet the current hint is focused on these cases. More likely are: go to a line of the current file, search for symbol in the local file, search for symbol globally.

A hint like this may actually help many more users:

Search files by name (or go to :line_number, search @symbol, ? for more)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants