-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fixes run button appearing when it shouldn't #36637
Conversation
Thanks! |
@@ -15,6 +15,11 @@ document.addEventListener('DOMContentLoaded', function() { | |||
'use strict'; | |||
|
|||
if (!window.playgroundUrl) { | |||
var run_buttons = document.querySelectorAll(".test-arrow"); |
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.
Very very minor, but it looks like naming conventions in the rest of this file use camel case, not snake case.
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.
It's javascript, who cares.
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.
I think there is some value in caring about keeping consistent with naming conventions. It's not clear to me why we shouldn't care about JavaScript.
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.
I used trollface to make sure people understand it was a troll. I failed :-/
I'll update later on.
214461d
to
7a31d3f
Compare
Updated. |
I tried this locally and this does not fix the issue. playpen.js is not used at all for a crate without playgroundUrl configured. See first and last lines in this range: rust/src/librustdoc/html/layout.rs Lines 143 to 181 in 289f3a4
|
Strange. I'll retest once again. Thanks for your feedback @bluss! |
7a31d3f
to
db9b846
Compare
@bluss: Thanks for pointing me to this! Can you test it again please? |
@GuillaumeGomez The fix looks like it will work to me. I would probably just put it in main.js, that simplifies things. Unfortunately I'd have to rebuild llvm to test the rustdoc build, and I don't have the time to do it. |
I don't want it all the time, I just want it in case playpen.js isn't present. |
db9b846
to
0c3ad61
Compare
Hum... I'll create another js file instead. |
0c3ad61
to
8983d1e
Compare
Ok, seems like it's all good now. |
@bluss what do you think of this PR now? |
It looks like it will work fine. But since both extra.js, and playpen.js have the same snippet to remove the run buttons, that part, it might as well be in main.js instead? |
@bluss: No, the point is to avoid putting too much watchers. One by button is already enough. If you put this part in main.js, it means we'll have it duplicated since playpen.js (in case it'll be there) will still put the watcher on it. I hope I wrote was clear enough. :-/ |
Oh I see, that makes sense. |
@bors r+ Let's go. |
📌 Commit 8983d1e has been approved by |
@bors: rollup |
⌛ Testing commit 8983d1e with merge fcc354f... |
Fixes run button appearing when it shouldn't Fixes #36621. r? @steveklabnik
💔 Test failed - auto-mac-32-opt |
@bors: retry On Sat, Oct 8, 2016 at 12:36 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 8983d1e with merge b98cc35... |
Fixes run button appearing when it shouldn't Fixes #36621. r? @steveklabnik
Fixes #36621.
r? @steveklabnik