Skip to content

Hiding long sections partially #6289

@ojacques

Description

@ojacques

Context

This request is a follow to a GitHub discussion.

Description

I write documentation and tutorials which may have long sections, between two options. For example:

You could do it this way:

- long set of instructions

Or this other way:

- Another long set of instructions

I would like the ability to show a preview of long sections of texts and fold/unfold to see the full text.

Related links

Use Cases

On a long documentation page, not all sections are relevant to the reader, or sections which contain explanations and long code blocks. I would like readers to judge whether they need to see and read those sections, or continue reading the rest of the documentation.
I expect this to improve readability of long pages.

Visuals

An example on how this is done on this AWS documentation site:

image

As you can see, some sections are partially hidden, until the reader presses "Show more", which unfolds the section.

image

One can then click "Show less" to fold the section back.

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvement

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions