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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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.

@kornelski

This comment has been minimized.

Copy link
Contributor

kornelski commented Dec 20, 2017

Similar request: #40363

vi added a commit to vi/rust that referenced this issue Jan 31, 2018

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 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.

bors added a commit that referenced this issue Feb 23, 2018

Auto merge of #47894 - vi:rustdoc_foldable_impls, r=GuillaumeGomez,Qu…
…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?

bors added a commit that referenced this issue Feb 24, 2018

Auto merge of #47894 - vi:rustdoc_foldable_impls, r=GuillaumeGomez,Qu…
…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?

Manishearth added a commit to Manishearth/rust that referenced this issue Feb 25, 2018

Rollup merge of rust-lang#47894 - vi:rustdoc_foldable_impls, r=Guilla…
…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?

Manishearth added a commit to Manishearth/rust that referenced this issue Feb 25, 2018

Rollup merge of rust-lang#47894 - vi:rustdoc_foldable_impls, r=Guilla…
…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 26, 2018

Auto merge of #47894 - vi:rustdoc_foldable_impls, r=GuillaumeGomez,Qu…
…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?

bors added a commit that referenced this issue Feb 28, 2018

Auto merge of #47894 - vi:rustdoc_foldable_impls, r=GuillaumeGomez,Qu…
…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

This comment has been minimized.

Copy link
Contributor Author

Centril commented Mar 18, 2018

Closing as resolved.

@Centril Centril closed this Mar 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.