rustdoc: use a button instead of a bar for search #133279
Draft
+224
−120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @GuillaumeGomez
CC @lolbinarycat @liigo
This is an attempt to address three complaints:
The header area takes up a lot of vertical space, and is generally quite "heavy" feeling.
Fixes [rustdoc] issues of the three-big-buttons #132386
Back and forward are kind of wacky, because there's no "single source of truth" for whether the search mode is open or not. Can't find an issue, but here's a screen recording where I reproduce it.
screen-record-history-bug.mp4
You can't see the crate picker list, or anything else that we might want to show you, until after you've already typed your search term. [rustdoc search] allow setting crates to search in before showing results #129537 (also notice the example searches, which exist in Hoogle and this tweak adds)
Preview page: https://notriddle.com/rustdoc-html-demo-15/search-button/std/index.html
Video:
screen-record.mp4
Screenshot: