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: Hide trait impl fn:s on pressing + for types #45720

Closed
Centril opened this issue Nov 2, 2017 · 3 comments
Closed

Rustdoc: Hide trait impl fn:s on pressing + for types #45720

Centril opened this issue Nov 2, 2017 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Centril
Copy link
Contributor

Centril commented Nov 2, 2017

When pressing the + hotkey on type's documentation such as on the documentation of Option, the methods of the impl are still shown. This is however mostly useless information that gets in the way of scrolling to see what traits a type implements.

It would be more ergonomic if + would hide every method of every trait impl but still show all associated items (types and consts) for each impl (since they carry useful information).

In addition, a [+]/[-] link should be added on all the impls (including non-trait impls) either besides [src] or to the left of the impl (as done with fns this expands and collapses the impls but keeps associated items shown.

@Centril
Copy link
Contributor Author

Centril commented Nov 2, 2017

I can rewrite this as an RFC if required, but I was unsure about the protocol wrt. rustdoc.

@estebank estebank added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Nov 2, 2017
@kornelski
Copy link
Contributor

Similar request: #40363

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?
@Centril
Copy link
Contributor Author

Centril commented Mar 18, 2018

Closing as resolved.

@Centril Centril closed this as completed Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

3 participants