-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rustdoc: search: color item type and reduce size to avoid clashing #112720
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rustdoc: search: color item type and reduce size to avoid clashing #112720
Conversation
poliorcetics
commented
Jun 16, 2023
- rustdoc: search: color item type same as item
- rustdoc: search: reduce item type size to 0.875rem to avoid clashing with path and item
r? @jsha (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
My proposition after #110688, which I find nice but a little too charged and uniform to be truly agreable to use |
Having the color put on the type kind isn't great indeed. ^^' Also, having the text smaller actually attracts the readers attention to the type kind rather than the item name. Not sure if it's the goal? |
fc6c82e
to
3afbfc5
Compare
I think grey is a lot nicer than color in this case. |
Agreed. |
I think it is still a bit visually noisy while looking clearly better. Edit: Or use word that are the same length? |
If someone manages to find nice wording that have almost the same size for all items, I'm interested, but I have no idea for some, like I suppose we could use Rust syntax, like |
|
Calling a trait method a function is accurate. It’s just not maximally specific. |
But in the docs we make the difference, hence why I commented it this way. |
Would it be possible to add padding to vertically align the item names? I think the fact that the different types have different widths makes the list look more cluttered to me. |
It was tried in the original PR and didn't look good, it makes it much harder to find the looked-for item I personally like it as-is but I'll change it if more people want columns |
I think the current display is good too. Can you add a screenshot with "mobile view" too please? |
Please add a GUI test for the color of the type name (in |
Some changes occurred in GUI tests. |
Added a test. I'm unsure if I'm correct with it, hopefully I am |
cf10b9c
to
612c3a1
Compare
612c3a1
to
c3cdf85
Compare
Thanks! @bors r=notriddle,GuillaumeGomez rollup |
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#112464 (Fix windows `Socket::connect_timeout` overflow) - rust-lang#112720 (Rustdoc: search: color item type and reduce size to avoid clashing) - rust-lang#112762 (Sort the errors from arguments checking so that suggestions are handled properly) - rust-lang#112786 (change binders from tuple structs to named fields) - rust-lang#112794 (Fix linker failures when #[global_allocator] is used in a dependency) - rust-lang#112819 (Disable feature(unboxed_closures, fn_traits) in weird-exprs) r? `@ghost` `@rustbot` modify labels: rollup