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

Add the library search box on the 404 page #54609

Merged
merged 3 commits into from
Oct 8, 2018
Merged

Conversation

kzys
Copy link
Contributor

@kzys kzys commented Sep 27, 2018

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.

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
Copy link
Collaborator

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 27, 2018
@kzys
Copy link
Contributor Author

kzys commented Sep 27, 2018

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Thanks! Can you provide a screenshot as well please? :)

@kzys
Copy link
Contributor Author

kzys commented Sep 28, 2018

Sure!

404

@GuillaumeGomez
Copy link
Member

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?

@kzys
Copy link
Contributor Author

kzys commented Sep 28, 2018

How about having 2 buttons instead of the dropdown?

[not_found    ][Search Standard Library][Search the Internet]

or

[not_found    ]
[Search Standard Library][Search the Internet]

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)

@GuillaumeGomez
Copy link
Member

But then by default, if the user press "enter", which button should be used?

@kzys
Copy link
Contributor Author

kzys commented Sep 28, 2018 via email

@kzys
Copy link
Contributor Author

kzys commented Sep 29, 2018

How about this one? The default is clear. All the options are shown. You still need multiple clicks to search doc.rust-lang.org though.

untitled

Oh, the label has to be "From the Standard Library".

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Sep 29, 2018

No more duckduckgo? (But I really like the idea of the radio buttons!)

@kzys
Copy link
Contributor Author

kzys commented Sep 29, 2018

"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

@GuillaumeGomez
Copy link
Member

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.
@kzys
Copy link
Contributor Author

kzys commented Oct 5, 2018

Sure. The last commit changed that to "From DuckDuckGo"

-->
<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>
Copy link
Member

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. :)

Copy link
Contributor Author

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.
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Oct 7, 2018

📌 Commit 23af6bb has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 7, 2018
@bors
Copy link
Contributor

bors commented Oct 8, 2018

⌛ Testing commit 23af6bb with merge aefe9b0...

bors added a commit that referenced this pull request Oct 8, 2018
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.
@bors
Copy link
Contributor

bors commented Oct 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing aefe9b0 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants