Skip to content

Rollup of 4 pull requests #84241

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

Merged
merged 26 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3ae5fed
Fix a couple resolve bugs from binder refactor
jackh726 Apr 6, 2021
c96f86d
rustdoc: Stop hiding entire item declarations
Manishearth Mar 21, 2021
71c52ac
rustdoc: hide variants of enums > 5
Manishearth Mar 21, 2021
f146b97
rustdoc: hide fields of structs/unions > 5
Manishearth Mar 21, 2021
173cbec
rustdoc: smartly hide associated items of traits if there are too man…
Manishearth Mar 21, 2021
256e594
rustdoc: Add setting for hiding large items
Manishearth Mar 21, 2021
e2f59f4
Update src/librustdoc/html/render/print_item.rs
Manishearth Mar 22, 2021
846a4e9
Update src/librustdoc/html/render/print_item.rs
Manishearth Mar 22, 2021
def144c
Improve CSS for "hide contents, not items"
jsha Mar 27, 2021
8e9882d
Add css classes
Manishearth Mar 28, 2021
01afa07
should_hide_fields > 12
Manishearth Apr 12, 2021
b40bd5a
Add test for item hiding
Manishearth Apr 12, 2021
97cd30d
Wrap toggle_open()
Manishearth Apr 12, 2021
05d1e72
& -> &&
Manishearth Apr 12, 2021
942ed31
Move color to themes
Manishearth Apr 12, 2021
5c2820b
+ignore-tidy-filelength
Manishearth Apr 12, 2021
0174dd6
Compiler error messages: reduce assertiveness of message E0384
jayaddison Apr 12, 2021
55b2944
Update attribute tests
Manishearth Apr 13, 2021
ff47e97
Merge branch 'master' into compiler/E0384-reduce-assertiveness
jayaddison Apr 14, 2021
bccbf9d
VecDeque: binary_search_by(): return right away if hit found at back.…
vojtechkral Apr 12, 2021
e68680d
VecDeque: Add partition_point() #78021
vojtechkral Apr 4, 2021
44be1c2
VecDeque: Improve doc comments in binary search fns
vojtechkral Apr 15, 2021
a5c68d7
Rollup merge of #83337 - Manishearth:item-hide, r=GuillaumeGomez
Dylan-DPC Apr 16, 2021
8853aae
Rollup merge of #83944 - jackh726:binder-refactor-fix2, r=lcnr
Dylan-DPC Apr 16, 2021
a5ec5cf
Rollup merge of #84145 - vojtechkral:vecdeque-binary-search, r=m-ou-se
Dylan-DPC Apr 16, 2021
c7c59d7
Rollup merge of #84172 - jayaddison:compiler/E0384-reduce-assertivene…
Dylan-DPC Apr 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rustdoc: Add setting for hiding large items
  • Loading branch information
Manishearth committed Apr 12, 2021
commit 256e594b0a75ddc792adb35e3810d29133ee0f79
1 change: 1 addition & 0 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result<Strin
],
)
.into(),
("auto-hide-large-items", "Auto-hide item contents for large items.", true).into(),
("auto-hide-attributes", "Auto-hide item attributes.", true).into(),
("auto-hide-method-docs", "Auto-hide item methods' documentation", false).into(),
("auto-hide-trait-implementations", "Auto-hide trait implementation documentation", true)
Expand Down
6 changes: 5 additions & 1 deletion src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2705,8 +2705,12 @@ function hideThemeButtonState() {
}
} else if (hasClass(e, "type-contents-toggle")) {
let text = e.getAttribute("data-toggle-text");
let tog = createToggle(toggle, `Show ${text}`, null, "", true);
let hideItemContents = getSettingValue("auto-hide-large-items") !== "false";
let tog = createToggle(toggle, `Show ${text}`, null, "", !hideItemContents);
e.parentNode.insertBefore(tog, e);
if (hideItemContents) {
collapseDocs(e.previousSibling.childNodes[0], "toggle");
}
}
if (e.parentNode.id === "main") {
var otherMessage = "";
Expand Down