-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rustdoc: collapse everything except impl Struct blocks #57582
Comments
It's also a decision to be taken by the @rust-lang/docs team. Personally I think it's a good idea. |
FWIW I also think it shouldn't collapse the item declaration by default (especially for traits and enums) since it's a decent and easy to parse overview |
Yeah, if we're talking about defaults here, then I agree, we wouldn't want everything collapsed. The guiding principle there---at least IMO---is something like, "is it possible to get a high level overview of the API at a glance without having to scroll through reams of documentation?" Of course, my solution here (collapsing method docs) isn't the only answer to that, although it might be the simplest. I will note that, at least intuitively, I would expect enabling the settings, "auto hide item attributes", "auto hide traits impl docs" and "auto hide item methods' docs" to be roughly what I want here. But I've never been able to get those settings to work reliably in a way that results in the screenshot I shared on twitter. So in that sense, this could also be considered a bug report. But I don't have a ton of context here, and honestly, my interpretation of the settings could be wrong! Nonetheless, if I could have achieved what I wanted through these settings, I wouldn't have written a script to do it for me. But I couldn't figure out how. |
…hing, r=QuietMisdreavus Prevent automatic collapse of methods impl blocks Fixes rust-lang#57582. r? @QuietMisdreavus
Most of the time when browsing docs I'd like to first have everything collapsed except the
impl Struct
blocks, skim over the available methods, and then dig in deeper if necessary.Currently, we have the
[+]
button that either expands everything or collapses everything. It'd be nice to have something in between.Twitter thread: https://twitter.com/stjepang/status/1084525502545698816
Seems like a lot of people would like to have the "all collapsed except
impl Struct
" view presented by default.cc @GuillaumeGomez
The text was updated successfully, but these errors were encountered: