Skip to content
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 renders deprecated label in ambiguous location #98231

Closed
rossmacarthur opened this issue Jun 18, 2022 · 3 comments
Closed

rustdoc renders deprecated label in ambiguous location #98231

rossmacarthur opened this issue Jun 18, 2022 · 3 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@rossmacarthur
Copy link
Contributor

rossmacarthur commented Jun 18, 2022

rustdoc renders labels like "Deprecated" next to items like functions which is very useful. However, it sometimes places it ambiguously below an item where you're not sure if it refers to the above item or the below item.

See here

For example in the following screenshot it is not sure whether std::env::home_dir is deprecated or std::env::join_paths.

image

I get the same behaviour in both Firefox 101.0.1 and Chrome 102.0.5005.115. I'm on macOS.

Interestingly the column overflow behaviour for small screens and mobile is much better. For example

image

@rustbot label +A-rustdoc-ui +T-rustdoc

@rustbot rustbot added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 18, 2022
@jsha
Copy link
Contributor

jsha commented Jun 19, 2022

Thanks for filing! This was done in #86578 and #86594 but I agree it's not great. I think the "Deprecated" / "Unix" / "Experimental" badge should be moved back to be on the right-hand side (in desktop layout). But if we choose not to do that or it turns out to be challenging, we can also make things better by setting a min-width for the left-hand column. What's happening here is that the column size is being set too narrow, which causes the "Deprecated" label to wrap.

@jsha
Copy link
Contributor

jsha commented Jun 19, 2022

Also related: #85651. And /cc @dns2utf8

@rossmacarthur
Copy link
Contributor Author

This looks fixed :)

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) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants