-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't auto-hide inherent impls even if rustdoc-collapse == true
.
#51527
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
Some changes occurred in HTML/CSS. |
r? @frewsxcv (rust_highfive has picked a reviewer for you, use r? to override) |
src/librustdoc/html/static/main.js
Outdated
onEach(document.getElementsByClassName("collapse-toggle"), function(e) { | ||
collapseDocs(e, "show"); | ||
}); | ||
if (!fromAutoCollapse) { |
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.
!== true
src/librustdoc/html/static/main.js
Outdated
onEach(document.getElementsByClassName("collapse-toggle"), function(e) { | ||
collapseDocs(e, "hide", pageId); | ||
}); | ||
if (!fromAutoCollapse) { |
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.
!== true
Working fine for me so please fix my two comments and then it's good to go. Thanks! |
8c54081
to
ca65a5e
Compare
@bors r=GuillaumeGomez |
📌 Commit ca65a5e has been approved by |
…laumeGomez Don't auto-hide inherent impls even if `rustdoc-collapse == true`. This PR changes the auto-collapse behavior when a page is first loaded: * Inherent impls will never be collapsed by default (new behavior). * Trait impls will always be collapsed by default, same as before. * Other items are collapsed according to localStorage, same as before. This should be much more useful since there is no hint what the content of a collapsed inherent impl would be (try to collapse everything in https://doc.rust-lang.org/std/vec/struct.Vec.html and guess where a method like `try_reserve` or `splice` would be). Manually clicking the global [-]/[+] will still collapse/expand everything.
@bors rollup |
☀️ Test successful - status-appveyor, status-travis |
This PR changes the auto-collapse behavior when a page is first loaded:
This should be much more useful since there is no hint what the content of a collapsed inherent impl would be (try to collapse everything in https://doc.rust-lang.org/std/vec/struct.Vec.html and guess where a method like
try_reserve
orsplice
would be).Manually clicking the global [-]/[+] will still collapse/expand everything.