]> git.lizzy.rs Git - rust.git/commit
auto merge of #16169 : Gankro/rust/simple-docs, r=cmr
authorbors <bors@rust-lang.org>
Sat, 2 Aug 2014 20:06:11 +0000 (20:06 +0000)
committerbors <bors@rust-lang.org>
Sat, 2 Aug 2014 20:06:11 +0000 (20:06 +0000)
commit147d117cff53198f17989a34b92513c33e059544
treeb59b110df008569024f8c0cdbea998c9ef7d9d55
parent432042ac149804c8d6b59b8cdf537ce39493796c
parent88fe6dfa31a1bee49090dc72c537c5cd7bd632f4
auto merge of #16169 : Gankro/rust/simple-docs, r=cmr

<strike>Adds a simple/detailed toggle to api doc pages.
Detailed mode is the current behaviour, simple mode hides all doccomment details leaving only signatures for quick browsing.
</strike>
Adds [expand all] and [collapse all] "links" to all api doc pages. All doccomments are collapsed, leaving only signatures for quick browsing.

In addition, clicking on a <strike>function name</strike> function's [toggle details] link now toggles the visibility of the associated doccomment.

--------

# [Live Build Here](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html)

This is something that's been bothering me, and I've seen some people mention in IRC before. The docs are *great* if you want a full in-depth look at an API, but *awful* if you want to scan them. This provides the ability to toggle complexity freely. Interacts perfectly well with noscript, since the static page is effectively unchanged. Collapsing is just hiding divs with css.

I'm not much of a designer, so design input welcome on the actual UX for toggling.

The actual javascript is *a bit* brittle to layout changes, but it always will be without adding lots of extra junk to the actual markup, which didn't seem worth it.
src/librustdoc/html/static/main.css