Uh oh!
There was an error while loading. Please reload this page.
Codeblock color - #44397
Conversation
QuietMisdreavus
commented
Sep 7, 2017
I'm generally +1 on this, though I'd also like to see what the rest of the docs team thinks. Technically this is gated on #43949, since it makes the same change to the |
There was a problem hiding this comment.
🚲🏚️: I'm wondering if there's a nicer way to phrase this than "so be extra careful" (since it doesn't compile anyway), but: I don't have a better suggestion than just leaving that part off so I think it's fine as-is, too.
There was a problem hiding this comment.
Something like "Warning: This code will not compile!", maybe?
estebank
commented
Sep 7, 2017
@GuillaumeGomez could you check how it looks if only the
|
QuietMisdreavus
commented
Sep 7, 2017
travis failures: |
GuillaumeGomez
commented
Sep 8, 2017
@QuietMisdreavus: Oh, forgot to remove the 100 columns limit on the test. |
5e70325 to
30912c4CompareGuillaumeGomez
commented
Sep 8, 2017
frewsxcv
commented
Sep 8, 2017
I'm +0 on this right now. I think the visual indicators aren't subtle enough and draw too much attention to the code block. I think a symbol like this could probably be sufficient to warn the user instead of incorporating such vibrant colors, but I'm not really sure what the best approach is here. |
QuietMisdreavus
commented
Sep 8, 2017
That's a good point. Without another kind of indicator on "good" code blocks, it does make the "bad" ones stick out a bit much. I like the idea of using an indicator character like the one you linked; would it be possible to sketch that one out? |
est31
commented
Sep 8, 2017
What about a red ⓕ for should fail and a yellow ⓘ for ignored? I think though that snippets you want to ignore shouldn't get be singled out in the rendered documentation as who tells me in the first place that the other snippets test successfully? |
GuillaumeGomez
commented
Sep 8, 2017
I proposed to add a gren border for the "ok" code blocks and to reduce the outstanding of the other blocks. I don't like the character proposition because it's just another one in the middle of a lot. |
steveklabnik
commented
Sep 8, 2017
This would fix #20524, those comments should be read as well. Note that the proposed screenshot uses just the left border, like @estebank suggested above. I also like the idea of symbols. Basically, this is a huge 👍 from me generally, but I do think working out the details here would be important. And it'd be nice if we could only gate part of it on |
estebank
commented
Sep 8, 2017
QuietMisdreavus
commented
Sep 8, 2017
On IRC, i proposed making the border appear on hover, rather than at all times. That way, the border doesn't distract unless someone has their cursor over the block, like if they're trying to copy the code out. We could even add in the "help" cursor so people are more likely to wait for the tooltip to appear. The linked issue also mentions making sure that we provide sufficient accessibility hints to make sure that users with screen readers or other methods also get the notes. |
e73a380 to
b22043aCompareGuillaumeGomez
commented
Sep 9, 2017
822775b to
3a256cfCompareGuillaumeGomez
commented
Sep 10, 2017
Updated. |
QuietMisdreavus
commented
Sep 11, 2017
We talked about it on IRC, and a couple comments came out:
|
steveklabnik
commented
Sep 11, 2017
Seems good to me!
👍 |
3a256cf to
797286dCompareGuillaumeGomez
commented
Sep 11, 2017
There was a problem hiding this comment.
Would be nice to say something like (checking-rendering-of-ignore-blocks) instead of (tidy) here. That way it explicitly says why it's there, rather than just putting something there to make tidy happy. >_>
There was a problem hiding this comment.
Haha. I'll think about it. :p
There was a problem hiding this comment.
This is the glyph i was talking about. Changing that circle-f with the warning symbol is what i was suggesting earlier.
797286d to
79f888dCompareQuietMisdreavus
commented
Sep 11, 2017
r=me once #43949 lands |
GuillaumeGomez
commented
Sep 15, 2017
@bors: r=QuietMisdreavus |
bors
commented
Sep 15, 2017
📌 Commit 79f888d has been approved by |
GuillaumeGomez
commented
Sep 15, 2017
@bors: rollup |
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
…uietMisdreavus Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs





This screenshot has been generated from:
r? @QuietMisdreavus
cc @rust-lang/docs