-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 the library search box on the 404 page #54609
Conversation
It actually has a link to search already, but it would be better to have the search "box" as like index.md to be consistent. <style> can be shared with index.md, but these pages currently use https://doc.rust-lang.org/rust.css directly. Fixes rust-lang#14572.
(rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! Can you provide a screenshot as well please? :) |
The UI is a bit weird... Having two fields following each other isn't really nice. What about a dropdown menu on the left of the input field where you can pick either you want to search on duckduckgo or in the std docs? |
How about having 2 buttons instead of the dropdown?
or
Having a dropdown menu makes sense when there are a lot of options, but we only have two here. Normal buttons allow users to see all of them at once and click one of them, while dropdowns require multiple clicks to perform search. (DuckDuckGo -> "the Internet" is intentional. I think we shouldn't assume all Rust users know DuckDuckGo) |
But then by default, if the user press "enter", which button should be used? |
Standard Library? It would be great if we have some data from
doc.rust-lang.org, but I think we don't have that.
Google is using this "left button as default" on normal search vs. I'm
feeling lucky. People would see the left button as default, I assume.
On Sep 28, 2018 5:28 AM, "Guillaume Gomez" <notifications@github.com> wrote:
But then by default, if the user press "enter", which button should be used?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#54609 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABKp2S-6-3aITVmnzCvaeSSb2-UXCZIks5ufhXUgaJpZM4W77Z7>
.
|
No more duckduckgo? (But I really like the idea of the radio buttons!) |
"From doc.rust-lang.org" uses DuckDuckGo. I've uploaded the files on my S3 bucket. Can you take a look? http://rust-pull-request.s3-website-us-east-1.amazonaws.com/54609/not_found.html |
Then please replace "From doc.rust-lang.org" with "From duckduckgo". |
Instead of having the standard library search and DuckDuckGo search. This change merges two of them, with radio buttons.
Sure. The last commit changed that to "From DuckDuckGo" |
src/doc/not_found.md
Outdated
--> | ||
<fieldset id="search-from" style="display:none"> | ||
<label><input name="from" value="library" type="radio"> From the Standard Library</label> | ||
<label><input name="from" value="dro" type="radio" checked> From DuckDuckGo</label> |
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.
"dro"? Can you replace it with a more understandable value please (like "duckduckgo")? And don't forget to update the corresponding js code. :)
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.
Sure. Changed at 23af6bb.
dro means "doc.rust-lang.org", but it is too cryptic.
Thanks! @bors: r+ rollup |
📌 Commit 23af6bb has been approved by |
Add the library search box on the 404 page It actually has a link to search already, but it would be better to have the search "box" as like index.md to be consistent. <style> can be shared with index.md, but these pages currently use https://doc.rust-lang.org/rust.css directly. Fixes #14572.
☀️ Test successful - status-appveyor, status-travis |
It actually has a link to search already, but it would be better to
<style> can be shared with index.md, but these pages currently use https://doc.rust-lang.org/rust.css directly. Fixes #14572.have the search "box" as like index.md to be consistent.