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: Remove double toggle to show undocumented items #84317

Closed
wants to merge 1 commit into from

Conversation

Swatinem
Copy link
Contributor

This removes an indirection, having to expand a trait impl first, just to have another toggle inside.

TBH, the toggles code in rustdoc is super hard to understand.

Before:

grafik

After:

grafik

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 18, 2021
@rust-log-analyzer

This comment has been minimized.

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 18, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 18, 2021

@Swatinem this was changed as part of #54162 I think, in response to #55900. Can you build the Iterator docs locally and see how long they take to load compared the existing page? You can do that with x.py doc --stage 1 library/std, then opening build/x86_64-unknown-linux-gnu/doc/std/iter/trait.Iterator.html in a browser (or replace x86_64... if you're developing on a different platform)

@jyn514 jyn514 added the A-rustdoc-ui Area: Rustdoc UI (generated HTML) label Apr 18, 2021
@GuillaumeGomez
Copy link
Member

@jyn514 x.py doc std --stage 1 works too. ;)

Also: we should add a --open option like cargo for such cases. What do you think about that?

@jyn514
Copy link
Member

jyn514 commented Apr 20, 2021

Sure, seems useful.

@GuillaumeGomez
Copy link
Member

Ok, gonna add that then.

@bors
Copy link
Contributor

bors commented May 2, 2021

☔ The latest upstream changes (presumably #84754) made this pull request unmergeable. Please resolve the merge conflicts.

@jyn514
Copy link
Member

jyn514 commented May 2, 2021

@Swatinem in your screenshot, ToOwned still has the "show hidden undocumented items" toggle - is that intentional?

@Swatinem
Copy link
Contributor Author

Swatinem commented May 3, 2021

ToOwned still has the "show hidden undocumented items" toggle - is that intentional?

Yes, as that has visible-by-default items, vs the other example that only had hidden-by-default items.

TBH, I’m not sure I want to continue with this patch as its a giant hack, and since other people are touching the toggles anyway, someone probably has a much better solution.

@Swatinem Swatinem closed this May 3, 2021
@Swatinem Swatinem deleted the hidden-impl-items branch May 18, 2022 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants