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 function should go to first result by pressing enter #1915

Closed
3 tasks done
matefriedl opened this issue Sep 10, 2020 · 5 comments
Closed
3 tasks done

Search function should go to first result by pressing enter #1915

matefriedl opened this issue Sep 10, 2020 · 5 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@matefriedl
Copy link

I checked that...

  • ... the documentation does not mention anything about my idea
  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... there are no open or closed issues that are related to my idea

Description

Currently the search features requires users to select a result with either the arrow key or the mouse. Then press enter to accept that result. I propose that when using search, the first result will be selected/highlighted by default. Pressing enter would take you this result right away. So to sum it up:

  1. Bring up search
  2. Type in your search terms
  3. Use the arrow keys to select the first result Have it selected automatically
  4. Hit enter to go to first result

Use Cases

Having to operate the arrow keys less often will reduce strain on the users right wrist.

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Sep 10, 2020
@Stephen-Gates
Copy link
Sponsor

I like this idea but am not sure about the look of highlighting the first result. It does make the selection explicit but would be happy with something more subtle.

@squidfunk
Copy link
Owner

I guess we could just omit the highlighting and follow the result, as it's more or less like the "feeling lucky" behavior of Google. Enter is currently not assigned in the input field and the only thing I could think of would be to chose a keyword suggestion (which might be another feature coming up in Insiders), but I'd rather assign that to Arrow Right.

@squidfunk
Copy link
Owner

This feature was just added to Insiders today. Try it here!

Ohne Titel

Pressing Enter when in the search input field will always follow the result with the highest score.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open insiders labels Oct 11, 2020
@matefriedl
Copy link
Author

That is really cool. Functionally, it's just the way I imagined it.

Just a suggestion/remark: we should consider telegraphing this feature to the user more clearly. I think the result you will jump to by pressing Enter could use a selection highlight:

image

@squidfunk
Copy link
Owner

Thanks for the feedback. I don't know whether that would confuse users more than it would help, because it's not always the page title which has the highest score. For example, searching for "suggestions" will show "Setting up site search" at the top, but this page only has a score of ~3, while the section "Search suggestions" has a score of 3000. Thus, the section must be highlighted, which would lead to confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants