Long shell commands are wrapped

Created on 9 October 2020, over 3 years ago
Updated 14 October 2023, 9 months ago

Documentation location/URL

https://www.drupal.org/docs/official_docs/en/_local_development_guide.html

Problem/Motivation

Long example shell commands are wrapped. This might lead an inexperienced user to copy and execute an incomplete command:

Proposed resolution

Do not wrap long lines, display a scroll bar instead:

Remaining tasks

The proposed solution may require theme and/or configuration changes.

🐛 Bug report
Status

Active

Version

2.0

Component

User interface

Created by

🇩🇪Germany ciss

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    This seems more a report for the module used to show those documentation pages, rather than an issue with the documentation pages.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇺🇸United States eojthebrave Minneapolis, MN

    I think our options here are either to update the source that this is pulled from to break lines as suggested in #2. Which is probably the easier approach right now. Could be done by editing the corresponding .asciidoc file.

    Or, to update the theming on that page so that the text inside the `

    ` tag is not wrapped and then add some overflow styling to it. Which would be part of the custom drupal.org theme I think.
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I would opt for the second option, at least to avoid to change all the command lines that would be too long to be shown on a single line in those lines.

    Gitlab is able to render those pages without wrapping long lines.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Alternatively, I would rewrite that block of commands to show each command individually. At least, it would be clearer when it is a long command line that is wrapped or when two commands are shown.

  • 🇺🇸United States eojthebrave Minneapolis, MN

    The code that currently causes the wrapping is here https://git.drupalcode.org/project/bluecheese/-/blob/7.x-2.x/sass/partia... in the Drupal.org bluecheese theme. It looks like code/pre blocks anywhere on the site basically will wrap lines rather than do something like overflow: scroll.

    So I think if we want to fix this in the them this issue should be moved to the bluecheese queue. And then either add a special pre styling for this specific page. Or, add some kind of class like pre.no-wrap that could be used to style code blocks that we don't want to wrap.

  • 🇳🇴Norway hansfn

    I notice that eojthebrave points to the bluecheese theme, but I move the issue to the general Drupal.org queue. I really think this needs to be fixed - making a lot of doc pages better.

  • 🇺🇸United States drumm NY, US

    Moving to the correct place.

  • 🇺🇸United States drumm NY, US

    #2480515: Code blocks should show 80 characters without wrapping looks like the last time this was discussed, and we got some strong feedback against scrolling.

  • 🇳🇴Norway hansfn

    It can be solved by other means than scrolling - for example expanding when hovering in the code block. There are good solutions for this that we can copy.

    Our current choice to assume that code fits in 80 characters, doesn't work very well for mobil or tablets (or laptops with low resolution). Are we really satisfied with the current state? There is no indication of wrapping.

    Some examples attached to the issue.

Production build 0.69.0 2024