-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 UI to help with advanced search requests #99469
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
@sdroege gave me an interesting take about this:
With this in mind, instead of having a very generic form, we'd have smaller specialized ones:
|
I wonder if this should be in a modal dialog instead. The styling of the form could probably be improved as well But I think this is a good start! |
This is really a starting point. I really hope the final UI won't look like this because it's a mess. Way too complicated to use and not obvious and the users from the feedback I got. So a lot of work remains to be done in any case. :) A modal dialog could be an interesting approach too. Do you have some idea why it would better btw? |
I find that they can be made more dynamic and it's more annoying when the location of the search results is pushed to the bottom |
All good points! A modal would also simplify a bit the DOM since it wouldn't have to take of the "surroundings". |
The really big thing that needs dealt with is that The UI makes it look like it affects the whole query, which is wrong. |
☔ The latest upstream changes (presumably #99058) made this pull request unmergeable. Please resolve the merge conflicts. |
<input placeholder="function/method arguments" class="arg"> | ||
<div class="generics"> | ||
<label>Generics for this argument</label> | ||
<input placeholder="gen1, gen2, gen3..." class="generic"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using T
and U
since they're more common names for generics?
<input placeholder="gen1, gen2, gen3..." class="generic"> | |
<input placeholder="T, U, ..." class="generic"> |
<div class="search-arguments"> | ||
<label>Arguments</label> | ||
<div class="argument"> | ||
<input placeholder="function/method arguments" class="arg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "function" covers both.
<input placeholder="function/method arguments" class="arg"> | |
<input placeholder="function arguments" class="arg"> |
<input placeholder="function/method returned types" class="arg"> | ||
<div class="generics"> | ||
<label>Generics for this returned type</label> | ||
<input placeholder="gen1, gen2, gen3..." class="generic"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
<input placeholder="gen1, gen2, gen3..." class="generic"> | |
<input placeholder="T, U, ..." class="generic"> |
Part of #99321.
This is for now a very early POC. The idea would be to provide help writing search requests for more advanced ones because the syntax might not be obvious for everyone.
Here what it currently looks like:
You can test it here.
To be noted: the "advanced search helper" appears when
search.js
is loaded, so when you focused on the search input or when you directly arrive on a search results page.r? @rust-lang/rustdoc