Automatically jump to the first result when entering directly in the search form#84286
Automatically jump to the first result when entering directly in the search form#842860xPoe wants to merge 2 commits intorust-lang:masterfrom
Conversation
|
Some changes occurred in HTML/CSS/JS. |
|
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
|
A simple demo: Screen.Recording.2021-04-18.at.12.20.06.PM.mov |
|
I don't find this behaviour very intuitive... What do you think @rust-lang/rustdoc ? |
|
I like it; I think it makes it easier to navigate the docs. Normally enter would start a new search, but because rustdoc searches while you're typing, I don't think that's super useful. |
|
I think this is acceptable, we already use use the enter to jump pages (instead of searching), then I think it is acceptable to jump to the first result by default. |
Where do we do that? |
When we move up and down with the keyboard, we can jump with a return. |
|
Yes, but it's after the user hovers an element (either with the mouse or with up/down arrows). The action is then obvious. Oh also, since you know well about UX, what do you think @jsha ? |
|
I'm fine with this if off by default; it does seem like an improvement over the original feature. Note that it'll probably directly match Very reluctant to make the search page do stuff like this by default; because a state change like that is usually kinda jarring |
|
If it's done with a setting like @Manishearth suggested (disabled by default), I'm fine with it. |
|
Thanks for the tag, @GuillaumeGomez. I posted some thoughts on the issue thread at #84214 (comment) |
|
☔ The latest upstream changes (presumably #84490) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@GuillaumeGomez @jyn514 @jsha What do you think about changing the feature to default highlighting the first result? |
|
There is #84462 coming up, so in this context, I don't know how this PR could work... |
Got it. So let's wait for that PR to merge and then we'll see how to solve this problem. |
See: #84214 (comment)