You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc: include item type in search results #93496
There are a fair number of items that have the same name but different types. For instance, std::panic (the macro) and std::panic (the module). Right now we distinguish these with colors. But that's not accessible for colorblind people. Also some of the colors are not often seen in a context where someone is likely to learn what they mean - for instance green for macros.
We should additionally distinguish search results by writing the actually type of the item. This should probably be its own column, between the item name and the description.
For *most* searches, the name is the most important thing and is
sufficiently distinctive. So it should be given the most important place,
at the beginning of the line. For a small number of searches the type is
needed to disambiguate, so it should come later.
Scala 3: https://dotty.epfl.ch/api/scala/math.html
Click on the magnifier in the top right corner and search for string.
It used to be the case that they prepended a circle to every single search result but nowadays the apparently
group by type (maybe they considered it to be too noisy?).
Just FYI, I am not a big fan of Scala 3's docs in general, I think its UX is horrible in a lot of cases.
Activity
GuillaumeGomez commentedon Jan 31, 2022
Why not putting it before the name every time instead of putting it in its own column?
jsha commentedon Jan 31, 2022
GuillaumeGomez commentedon Jan 31, 2022
Then
name (type)?jaskij commentedon Mar 25, 2022
Maybe just the first letter even? Stylized differently, or as an icon, so that it stands out more.
Edit to add: My point is, to have the type stand out visually as not a part of the result name and path. Different color, different font, something.
fmease commentedon Aug 12, 2022
For prior art, take a look at the doc pages of Scala 2 and 3. They use circles containing the initial letter of the item type.
Click on the magnifier in the top right corner and search for
string.It used to be the case that they prepended a circle to every single search result but nowadays the apparently
group by type (maybe they considered it to be too noisy?).
Just FYI, I am not a big fan of Scala 3's docs in general, I think its UX is horrible in a lot of cases.
fmease commentedon Sep 7, 2023
Fixed by #110688.