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: put unqualified item name first in titles #84371

Closed
jsha opened this issue Apr 20, 2021 · 1 comment · Fixed by #84380
Closed

rustdoc: put unqualified item name first in titles #84371

jsha opened this issue Apr 20, 2021 · 1 comment · Fixed by #84380
Assignees
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

@jsha
Copy link
Contributor

jsha commented Apr 20, 2021

When you have a lot of tabs open, the Rust stdlib documentation starts to look like this:

image

I think we should put the unqualified item name first. So for instance:

Vec in std::vec - Rust

String in std::string - Rust

Read in std::io - Rust

This would make finding the right tab in a busy browser easier.

@jsha jsha added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: rustdoc UI (generated HTML) labels Apr 20, 2021
@syvb
Copy link
Contributor

syvb commented Apr 20, 2021

@rustbot claim

m-ou-se added a commit to m-ou-se/rust that referenced this issue Apr 21, 2021
Write Rustdoc titles like "x in crate::mod - Rust"

This makes Rustdoc titles for items be like "Widget in cratename::blah::foo - Rust". Titles for modules and other non-items are unchanged, and still read like "cratename::blah::foo - Rust". This makes managing several open Rustdoc tabs easier.

![A screenshot of several open Rustdoc tabs](https://user-images.githubusercontent.com/10530973/115457675-d608f180-a1f2-11eb-87a8-838a32b4e3f7.png)

This also adds some tests for the new title behavior.

Closes rust-lang#84371.
m-ou-se added a commit to m-ou-se/rust that referenced this issue Apr 21, 2021
Write Rustdoc titles like "x in crate::mod - Rust"

This makes Rustdoc titles for items be like "Widget in cratename::blah::foo - Rust". Titles for modules and other non-items are unchanged, and still read like "cratename::blah::foo - Rust". This makes managing several open Rustdoc tabs easier.

![A screenshot of several open Rustdoc tabs](https://user-images.githubusercontent.com/10530973/115457675-d608f180-a1f2-11eb-87a8-838a32b4e3f7.png)

This also adds some tests for the new title behavior.

Closes rust-lang#84371.
@bors bors closed this as completed in 0c193f8 Apr 22, 2021
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

Successfully merging a pull request may close this issue.

2 participants