-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove theme.js file #82732
Remove theme.js file #82732
Conversation
Some changes occurred in HTML/CSS/JS. |
r? @Nemo157 |
This comment has been minimized.
This comment has been minimized.
5a3078c
to
ca084ca
Compare
This looks good to me. One note: The first commit's summary is "Remove storage.js file creation and move its code inside main.js" but I think you meant to say |
ca084ca
to
2bcc08f
Compare
@jsha: Great catch, thanks! 😆 |
It looks like |
This only changes the theme menu, not the picked theme itself (I made the same error haha). So it doesn't change anything from the rendering point of view. |
src/librustdoc/html/static/main.js
Outdated
@@ -83,12 +84,20 @@ function getSearchElement() { | |||
return document.getElementById("search"); | |||
} | |||
|
|||
function getThemesElementId() { |
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.
Is there a reason this and getThemePickerElementId
are functions instead of variableconstants?
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.
That's beause we can't use constant that I turned it into a function. But I can use a variable. Which do you prefer?
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.
Script local variables seem better, to avoid thinking they need computing at all.
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.
Fine by me!
r=me with that last change |
2bcc08f
to
f7764e7
Compare
f7764e7
to
524fdf0
Compare
Do you mind waiting for rust-lang/docs.rs#1302 to merge this? I hope to have it working by the end of the week, and it means less work for docs.rs. |
Sure, please r+ it once it's not blocked anymore then. ;) |
@bors r=Nemo157 |
📌 Commit 524fdf0 has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#80705 (Update Source Code Pro and include italics) - rust-lang#81917 (Update RELEASES.md for 1.51.0) - rust-lang#82732 (Remove theme.js file) - rust-lang#83356 (rustdoc: Replace pair of `Option`s with an enum) - rust-lang#83384 (rename :pat2018 -> :pat2015) - rust-lang#83385 (:arrow_up: rust-analyzer) - rust-lang#83389 (add rust-analyzer rustc_private option in librustdoc Cargo.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #82616.
The first commit moves the
theme.js
file intomain.js
, which requires to also run a small.replace
on themain.js
content.The second commit is just a small cleanup to centralize DOM ids.
Since it removes a file from rustdoc output: cc @rust-lang/docs-rs
cc @jsha
r? @jyn514