Skip to content

Toggle to show/hide plugin help TOC #1526

Description

@Bloke

(background)

Having some way to see all the text in one go is a nice idea as it facilitates in-browser searching.

Proposal:

  • Auto-TOC is generated by default.
  • Somewhere nearby (above the TOC?) is a “Hide” link of some description.
  • Clicking this will set a cookie/localStorage pref such as singlePagePluginHelp of your intention and refresh the page.
  • Some kind of ‘show’ link is prepended to the documentation if we’re hiding the TOC. ‘Show TOC’ would do, or something more generic that we can use elsewhere if necessary to offer similar functionality on other panels in future? (I'm thinking about custom field blocks on the Write panel here).
  • Clicking ‘show’ will clear the singlePagePluginHelp pref and refresh the page.

Thus, depending on the state of the singlePagePluginHelp value, the JavaScript that renders the TOC can either be invoked or not and the necessary toggle added to the markup. It makes sense to omit the sidebar completely so the docs can then take up the full width.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions