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

[rustdoc search] allow setting crates to search in before showing results #129537

Open
lolbinarycat opened this issue Aug 25, 2024 · 4 comments · May be fixed by #129914 or #129769
Open

[rustdoc search] allow setting crates to search in before showing results #129537

lolbinarycat opened this issue Aug 25, 2024 · 4 comments · May be fixed by #129914 or #129769
Labels
A-rustdoc-search Area: Rustdoc's search feature T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@lolbinarycat
Copy link

specifically, this would mean moving the #crate-search dropdown so it is available outside of the results screen.

on desktops, it could be moved into the <rustdoc-search> search form, and displayed in a single line. on mobile, it could be displayed directly underneath the search bar line.

this would significantly speed up searching through the nightly-rustc docs when you already know what crate you want to search, although it would require some small refactorings of rustdoc's search.js.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 25, 2024
@notriddle
Copy link
Contributor

It used to work that way. There are two reasons why it doesn't any more:

  1. less clutter Controls and search in Rustdoc header are visually distracting #59840
  2. less stuff that needs to load Improve loading of crates.js and sidebar-items.js #98124

@lolbinarycat
Copy link
Author

hmm... it might be possible to offset both of those...

what if it was prerendered, and we hid it behind a setting?

@notriddle
Copy link
Contributor

A better possibility might be to show it when you focus the search box, without requiring you to type anything into it first.

@lolbinarycat
Copy link
Author

yeah, that's actually what i was originally going to suggest for mobile.

i think that should be doable with just css, actually.

@onur-ozkan onur-ozkan added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-search Area: Rustdoc's search feature and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
4 participants