-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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: improve sidebar, add to crate root page, add tooltips #13014
Conversation
- Add sidebar to crate root index.html, to preview the structure of the crate quickly. If there are too many documents in the crate root, such as log\ index.html, you can't find any informations of its mods and types, unless and untill you scroll down to the bottom of the page. - Add tooltips to links of sidebar, showing shortened doc-comments.
This deviates from the current design that the current module's items are at the bottom while the containing module's items are on the left. This puts everything on the left for exactly one thing, the crate, while everything else still "suffers" by having things at the bottom. I would prefer that we stay consistent rather than special casing one level of the hierarchy. |
If no sidebar in crate root page, users always "suffers" by have to scroll In non-root pages, uses can always navigate from sidebar. But in root
|
Yes, they can navigate the parent's contents, not their contents. The root page navigates the directory of crates, which it currently does. |
This makes difficulty in use. People open std/index.html, must scroll down and search items from long text. 2014年3月20日 上午7:24于 "Alex Crichton" [email protected]写道:
|
It sounds like you're describing what you think is a general problem with rustdoc. You have fixed it in one case here, not in all cases. It will be expected that all pages have their contents on the left, not just the root page. |
I got it. I'll try to update this PR. Thank you! |
Closing due to inactivity, but feel free to reopen with a rebase! |
This pull request add tooltips to most links of sidebar. The tooltips display "summary line" of items' document. Some lengthy/annoying raw markdown code are eliminated, such as links and headers. - `[Rust](http://rust-lang.org)` displays as `Rust` (no URLs) - `# header` displays as `header` (no `#`s) Some inline spans, e.g. ``` `code` ``` and ```*emphasis*```, are kept as they are, for better readable. I've make sure `&` `'` `"` `<` and `>` are properly displayed in tooltips, for example, `&'a Option<T>`. Online preview: http://liigo.com/tmp/tooltips/std/index.html @alexcrichton @steveklabnik since you have reviewed my previous ([v1](https://github.com/rust-lang/rust/pull/13014),[v2](https://github.com/rust-lang/rust/pull/16448)) PRs of this serise, which have been closed for technical reasons. Thank you.
minor: Simplify `GlobalState::handle_event`
Add sidebar to crate root index.html, to preview the structure of
the crate quickly.
If there are too many documents in the crate root, such as log
index.html, you can't find any informations of its mods and types,
unless and untill you scroll down to the bottom of the page.
Add tooltips to links of sidebar, showing shortened doc-comments.
Preview:
http://liigo.com/tmp/rust/doc/std/index.html
http://liigo.com/tmp/rust/doc/log/index.html