-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: include item type in search results #93496
Comments
Why not putting it before the name every time instead of putting it in its own column? |
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.
|
Then |
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. |
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.
|
Fixed by #110688. |
There are a fair number of items that have the same name but different types. For instance,
std::panic
(the macro) andstd::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.
The text was updated successfully, but these errors were encountered: