Skip to content
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 trait implementations should be collapsible #24483

Closed
mdinger opened this issue Apr 15, 2015 · 8 comments
Closed

rustdoc trait implementations should be collapsible #24483

mdinger opened this issue Apr 15, 2015 · 8 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@mdinger
Copy link
Contributor

mdinger commented Apr 15, 2015

Pages like vec are very repetitive, especially when arrays are involved.It'd be nice if collapse all collapsed the methods inside the Trait Implementations impl's

@alexcrichton alexcrichton added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 15, 2015
@Gankra
Copy link
Contributor

Gankra commented Apr 16, 2015

Hmm this is a bit tricky. If you want to collapse to search for a fn, this will hide some of the fns. If it's on a trait that you don't know about you might never find it. I suppose you could toss a bulk-collapse on top of the "traits". Or perhaps double-clicking collapse "super collapses" everything.

@mdinger
Copy link
Contributor Author

mdinger commented Apr 16, 2015

Why not just search for the trait? Each trait lists all the functions it supports anyway.

@Gankra
Copy link
Contributor

Gankra commented Apr 16, 2015

That requires you to know that it's a trait being invoked. This is perhaps unrealistic; they'll probably search for the fn in the global search.

@mdinger
Copy link
Contributor Author

mdinger commented Apr 18, 2015

I see how this could be problematic.

@mdinger mdinger closed this as completed Apr 18, 2015
@Gankra
Copy link
Contributor

Gankra commented Apr 18, 2015

I still think this has potential. I'd suggest basically making the "super collapse" buttons step-wise:

lvl 0: show everything
lvl 1: hide examples
lvl 2: hide all descriptions
lvl 3: hide trait methods

- goes up a level; + does down one.

@mdinger mdinger reopened this Apr 18, 2015
@mdinger
Copy link
Contributor Author

mdinger commented Apr 18, 2015

I wonder about clicking the +/- button multiple times to keep hiding more things. Maybe a dropdown which changes what the +/- does by switching between those levels you suggested.

[EDIT]
Make it default to lvl 1 or something like it.

@steveklabnik
Copy link
Member

Triage: no change

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 22, 2017
vi added a commit to vi/rust that referenced this issue Jan 31, 2018
Addresses rust-lang#40363, rust-lang#45720, rust-lang#24483, rust-lang#23986 and so on

* Expands and refactors collapseDocs and toggleAllDocs
* Adds [-] toggle to all impls (including inherent impl)
* Makes it hiding though main css file, not though element style

May need to be addressed:

* "[-]" and anchor link copier are overlaid a bit
* Inherent methods are also hidden by the global [-] toggle.
* Auto-collapsing "Iterator" and so on by default is not implemented yet
* Tested only shallowly and only in Chromiuim
* No tests. Are there tests for css/js part here?
* The new implementation may be a bit slower.
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 25, 2018
…umeGomez,QuietMisdreavus

rustdoc: Foldable impl blocks

Addresses rust-lang#40363, rust-lang#45720, rust-lang#24483, rust-lang#23986 and so on

* Expands and refactors collapseDocs and toggleAllDocs
* Adds [-] toggle to all impls (including inherent impl)
* Makes it hiding though main css file, not though element inline style

May need to be addressed:

* "[-]" and anchor link copier are overlaid a bit
* Inherent methods are also hidden by the global [-] toggle.
* Auto-collapsing "Iterator" and so on by default is not implemented yet
* Tested only shallowly and only in Chromiuim
* No tests. Are there tests for css/js part here?
* The new implementation may be a bit slower.

What next steps are need to be done before the integration?
bors added a commit that referenced this issue Feb 28, 2018
…ietMisdreavus

rustdoc: Foldable impl blocks

Addresses #40363, #45720, #24483, #23986 and so on

* Expands and refactors collapseDocs and toggleAllDocs
* Adds [-] toggle to all impls (including inherent impl)
* Makes it hiding though main css file, not though element inline style

May need to be addressed:

* "[-]" and anchor link copier are overlaid a bit
* Inherent methods are also hidden by the global [-] toggle.
* Auto-collapsing "Iterator" and so on by default is not implemented yet
* Tested only shallowly and only in Chromiuim
* No tests. Are there tests for css/js part here?
* The new implementation may be a bit slower.

What next steps are need to be done before the integration?
@mbrubeck
Copy link
Contributor

mbrubeck commented Sep 4, 2018

Fixed by #47894.

@mbrubeck mbrubeck closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants