Skip to content

Provide a better visualization for collapsing long blocks of code/output #5405

Open
@svrnm

Description

@svrnm

We are currently using <details> and <summary> to wrap long code blocks or text outputs. An example can be seen here:

Code: https://github.com/open-telemetry/opentelemetry.io/blob/main/content/en/docs/languages/js/getting-started/nodejs.md?plain=1#L254
Output: https://opentelemetry.io/docs/languages/js/getting-started/nodejs/#run-the-instrumented-app

Screenshot:
Screenshot 2024-10-15 at 12 21 45

This is really hard to see and easily overseen when someone scrolls through the page, especially when they are looking for the expected output or a code snippet.

It would be great to have a better visualization, e.g. the first few lines are shown but the rest is hidden away with an "unfold" button. There are plenty of options, but it would be good to have something that makes it visually clear that there is something behind that "tiny arrow"

Special Note for Outreachy Contributors: if you want to work on this issue, please make sure that you have completed the small steps and at least one assigned issue as outlined here: #5290

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionInput from everyone is helpful to drive this forwardux

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions