-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 new panel to rustdoc search that shows up when the search bar is focused #129769
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
this list should be prerendered instead of being created dynamically |
This comment has been minimized.
This comment has been minimized.
Please add screenshot/video to show the feature in action. |
This comment has been minimized.
This comment has been minimized.
here's the current look, it's still unfinished, thus this being marked as draft. I'm hoping to get feedback on the css to see if there's a better way to do this (mainly, removing the margin between the popup and the search bar, and also making the popup wider, as i plan on adding more there in the future.) |
2d0ef3a
to
6f9fde6
Compare
cc @notriddle for suggesting this presentation of the dropdown |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8a7ccbb
to
f455b55
Compare
This comment has been minimized.
This comment has been minimized.
f455b55
to
bee39d2
Compare
bee39d2
to
68f61eb
Compare
I'm just throwing out suggestions, but could we avoid having nested popups? When you pick the "search box" in GitHub, you get the list of searchable areas immediately. Screencast.from.2024-08-30.11-48-07.mp4 |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@notriddle wdym "nested popups"? do you mean the search results should show up in the same contextual panel? it's also worth noting that on github, if you press enter on the search bar, you'll get taken to a page more like our current search results, replacing the body of the previous page |
I think nested popovers are bad and should be avoided. There's strange ambiguities around closing the popovers (will pressing Escape close both, or just one? how about clicking outside the popovers?) and it requires multiple steps of clicking. |
@notriddle i understand now, but i'm confused, because this system is based off of your comment, was there something else you had in mind? also, i'm not entirely convinced nested popovers are that bad, since they seem to be the basis for the classic toolbar pattern. |
if you think you can come up with a design that solves the clutter issue better than this, let me know. i did open this PR to get feedback, after all. |
☔ The latest upstream changes (presumably #129809) made this pull request unmergeable. Please resolve the merge conflicts. |
@notriddle that certainly looks nicer for the case where there are few crates, but does it scale? notably, the html I wonder if we should perhaps add a syntax for filtering by crates? like |
The |
@notriddle another alternative would be switching to checkboxes to allow searching multiple (but not all) crates. it's unclear how useful this would be, though. |
alternative to rust-lang#129769 limitations: currently, the crate filter has to be followed by a comma, so it's `crate:std, vec`.
fixes #129537