Skip to content

rustdoc: Show tag / badge / icon / emoji in the sidebar for unsafe, deprecated and unstable items #132108

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

Open
tyilo opened this issue Oct 24, 2024 · 7 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@tyilo
Copy link
Contributor

tyilo commented Oct 24, 2024

Currently unsafe, deprecated and unstable items are shown with different labels in a module's list of items:

Image

I think it would be nice to also add these to the sidebar for types and traits.
Maybe this requires icons for "Deprecated" and "Experimental" as well to not make the sidebar to wide.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 24, 2024
@lolbinarycat lolbinarycat added T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Oct 24, 2024
@BD103
Copy link
Contributor

BD103 commented Oct 24, 2024

By sidebar, do you mean the bar on the left of this screenshot?

Image

I created the following with dev tools. I especially like the test tubes for experimental APIs, unsure about the other emojis.

Image

@tyilo
Copy link
Contributor Author

tyilo commented Oct 24, 2024

By sidebar, do you mean the bar on the left of this screenshot?

Yes, exactly what I meant.

Nice symbols too :)

@lolbinarycat
Copy link
Contributor

Personally it seems odd to prefix the symbols in the sidebar, when in the module view they are suffixed.

@Scripter17
Copy link
Contributor

I don't suppose there's any demand for a "this got stabilized recently!!!" icon?

If so then I nominate 🎉 because apparently there isn't a diploma emoji to go with the beaker/test tube theme for experimental stuff

I assume there won't be one but I want to make sure it's considered

@lolbinarycat
Copy link
Contributor

I don't suppose there's any demand for a "this got stabilized recently!!!" icon?

IMO rustdoc already has enough machinery that is only used for std/core/alloc and nothing else.

@jieyouxu jieyouxu added A-rustdoc-ui Area: Rustdoc UI (generated HTML) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 25, 2024
@daniel-pfeiffer
Copy link

This is so welcome! How many times have I hopefully clicked on a promising sounding name, only to find it’s not for normal use…

@lolbinarycat
Copy link
Contributor

possible duplicate of #67869, although this issue is more descriptive in exactly what changes are desired.

@fmease fmease changed the title Show "⚠", "Deprecated" and "Experimental" in docs sidebar for unsafe, deprecated and unstable items rustdoc: Show tag / icon / badge in the sidebar for unsafe, deprecated and unstable items Dec 21, 2024
@fmease fmease changed the title rustdoc: Show tag / icon / badge in the sidebar for unsafe, deprecated and unstable items rustdoc: Show tag / badge / icon / emoji in the sidebar for unsafe, deprecated and unstable items Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

No branches or pull requests

7 participants