-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use more jQuery to avoid displaying Expand Description more often. #17035
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
Conversation
e.g. http://www.rust-ci.org/huonw/slow_primes/doc/slow_primes/ has the Expand description text lying on top of the main description. I can't actually reproduce the issue locally, as it only seems to crop up on Rust CI, but manually inserting this new JS into the page fixes the issue (and manually inserting the old JS in the same manner fails the same as it used to). |
This isn't a jQuery issue. The issue is the Content-Security-Policy being returned by rust-ci.org:
Specifically, it doesn't include |
Oh I see. In any case, this patch does fix it, so I'll edit the commit message. |
Which is to say, we should probably tell rust-ci that they should add |
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
I just emailed Hans Jørgen Hoel about the CSP issue. |
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
|
||
$(".method").each(function() { | ||
if ($(this).next().is(".docblock")) { | ||
$(this).children().first().after(toggle); | ||
$(this).children().first().after(toggle[0]); |
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.
@huonw I think this broke adding the toggles at all :(
See: http://doc.rust-lang.org/std/vec/struct.Vec.html#
CC #17125
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.
Whoops, nice catch.
Run Windows tests on PRs too Previously PRs would only do a build on Windows, which confusingly meant that PRs got a green tick for Windows despite not testing them. See discussion in rust-lang#17019.
Run Windows tests on PRs too Previously PRs would only do a build on Windows, which confusingly meant that PRs got a green tick for Windows despite not testing them. See discussion in rust-lang#17019.
Sometimes (e.g. on Rust CI) the "expand description" text of the
collapse toggle was displayed by default, when a page is first
loaded (even though the description is expanded), because some
Content-Security-Policy settings disable inline CSS.
Setting it the style with the
.css
method allows the output to be usedin more places.