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: Add tooltips to sidebar (v3) #20221

Merged
merged 5 commits into from Jan 23, 2015

Conversation

liigo
Copy link
Contributor

@liigo liigo commented Dec 25, 2014

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,v2) PRs of this serise, which have been closed for technical reasons. Thank you.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor

Re-assigning to @alexcrichton since he was cited in the text (or @steveklabnik )

@frewsxcv
Copy link
Member

frewsxcv commented Jan 3, 2015

Needs a rebase

@liigo liigo force-pushed the rustdoc-sidebar-tooltips-v3 branch 2 times, most recently from 1ee163c to e788b09 Compare January 9, 2015 07:13
@liigo
Copy link
Contributor Author

liigo commented Jan 9, 2015

rebased

'"' => result.push_str("&quot;"),
'\'' => result.push_str("&#39;"),
_ => result.push(c),
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this use rustdoc::html::escape instead of duplicating logic?

@liigo liigo force-pushed the rustdoc-sidebar-tooltips-v3 branch from e788b09 to d22f03a Compare January 17, 2015 09:47
@liigo liigo force-pushed the rustdoc-sidebar-tooltips-v3 branch from d22f03a to 2b11a80 Compare January 21, 2015 13:32
@liigo
Copy link
Contributor Author

liigo commented Jan 21, 2015

@alexcrichton I've addressed all your review comments in latest commit, and rebased. Sorry for the delay.

@alexcrichton
Copy link
Member

@bors: r+ 2b11a80

Thanks!

@bors
Copy link
Contributor

bors commented Jan 22, 2015

⌛ Testing commit 2b11a80 with merge 9a0042b...

@bors
Copy link
Contributor

bors commented Jan 22, 2015

💔 Test failed - auto-win-32-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 22, 2015

⌛ Testing commit 2b11a80 with merge 65cc262...

@bors
Copy link
Contributor

bors commented Jan 22, 2015

💔 Test failed - auto-win-32-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 22, 2015

⌛ Testing commit 2b11a80 with merge cb5b1f1...

@bors
Copy link
Contributor

bors commented Jan 23, 2015

💔 Test failed - auto-mac-64-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 23, 2015

⌛ Testing commit 2b11a80 with merge d8d5e4d...

bors added a commit that referenced this pull request Jan 23, 2015
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](#13014)) PRs of this serise, which have been closed for technical reasons. Thank you.
@bors bors merged commit 2b11a80 into rust-lang:master Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants