Skip to content

Runtime toggle for private/hidden items documentation #149106

@ojeda

Description

@ojeda

In some projects, it can be useful to see private/hidden items/documentation/details (and /* private fields */ etc.) without having to go into the source view, which isn't as nice.

Instead of re-rendering the documentation with --document-private-items and --document-hidden-items, it would be very interesting to have a runtime toggle (i.e. in the web UI) that users could click to show hidden and/or private items on the fly.

This feature would also mean that we would already get checking for private/hidden items, i.e. it could be an alternative for #149105 for those that want to use the runtime toggle anyway.

This can be worked around on the user side by generating every documentation set needed and then adding custom UI. Of course, that is slower, takes more space, doesn't allow for an implementation that avoids reloading, users need to reimplement the same idea, etc.

#141299

Cc @GuillaumeGomez @fmease @lolbinarycat

@rustbot label T-rustdoc
@rustbot label A-intra-doc-links
@rustbot label A-rust-for-linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameA-rust-for-linuxRelevant for the Rust-for-Linux projectT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions