-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
print enum variant fields in docs #33867
Conversation
I remember that someone talked about it (or maybe even open a PR?). Could you also provide a screenshot for your change please? I like to see wonderful changes rendered. 😃 |
These are the screenshots after my changes. |
Oh, my bad. Could you align description text with the variant name please? (and screenshot with the change as well please 😛 ) |
updated PR for comments in irc: https://botbot.me/mozilla/rust-docs/2016-05-25/?msg=66694101&page=1 live version here: http://oli-obk.github.io/doc_publish/rustc/session/struct.Session.html |
@oli-obk: For the overlap issue once collapsed: .enum > .collapsed, .struct > .collapsed {
margin-bottom: 25px;
} |
updated (live version updated, too) |
travis failure is an http-failure during apt-get |
do you want me to remove the (now useless) enum/struct definition at the top? |
If it's not used anymore, then yes please. |
One last thing. You need to change: .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
margin-left: 10px;
margin-bottom: 20px;
margin-top: 5px;
} to: .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
margin-left: 30px;
margin-bottom: 20px;
margin-top: 5px;
} |
00cd95e
to
0dc0d1f
Compare
added changes and squashed commits |
@@ -591,13 +610,11 @@ a.test-arrow { | |||
.collapse-toggle { | |||
font-weight: 300; | |||
position: absolute; | |||
left: -23px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so this rule shouldn't be removed.
You need to move the css changes after this block: span.since {
position: initial;
font-size: 20px;
margin-right: 5px;
} |
0dc0d1f
to
94c3679
Compare
updated and live version now looks good |
📌 Commit 94c3679 has been approved by |
⌛ Testing commit 94c3679 with merge 56ae85b... |
💔 Test failed - auto-linux-64-opt-rustbuild |
A lot of doc tests are broken. @bors: rollup- |
I don't grok those error messages. How do I go about debugging them?
|
It means the generated docs don't correspond to what tests expected. A small explanation of how it works is provided in "/home/ws/ca8159/Projects/rust/rust/src/etc/htmldocck.py". |
Found the culprit. The python script treated |
Great, let's see what travis says and it'll be good to get merged. |
travis likes it |
Then here we go! @bors: r+ rollup |
📌 Commit 39a5f3c has been approved by |
@bors: r- Sorry, forgot to ask: can you squash your commits please? |
39a5f3c
to
b0c7033
Compare
done |
Ok, now it's all good. Sorry about that. @bors: r+ rollup |
📌 Commit b0c7033 has been approved by |
…illaumeGomez print enum variant fields in docs Right now we are repeating enum variants at the top, because the fields aren't shown with the actual docs. It's very annoying to have to scroll up and down to have both docs and field info. For struct variants we already list the fields. enum docs look like this after this PR:  There are degenerate cases for enum tuple variants with lots of fields:  I was thinking that we could move the docs below the variant (slightly indented) or list the variant fields vertically instead of horizontally r? @steveklabnik
Right now we are repeating enum variants at the top, because the fields aren't shown with the actual docs. It's very annoying to have to scroll up and down to have both docs and field info. For struct variants we already list the fields.
enum docs look like this after this PR:
There are degenerate cases for enum tuple variants with lots of fields:
I was thinking that we could move the docs below the variant (slightly indented) or list the variant fields vertically instead of horizontally
r? @steveklabnik