~sircmpwn/lists.sr.ht#143: 
Long text lines are not wrapped

Long text lines in messages are not wrapped, and they cause the appearance of horizontal scrollbars, which makes reading hard.

Example:

https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CuR3VBoz5iuqpEqy0YPi2SIgKJuW-Bv2Lqlo1e3SbCkNC7WeW79tOtlGmVzG3D_cAqBIldietHJQAB2nNaGyj1sefvhLpKr7zvtet7-NHYOE%3D%40protonmail.com%3E#%3CuR3VBoz5iuqpEqy0YPi2SIgKJuW-Bv2Lqlo1e3SbCkNC7WeW79tOtlGmVzG3D_cAqBIldietHJQAB2nNaGyj1sefvhLpKr7zvtet7-NHYOE=@protonmail.com%3E

(Incidentally, the old Mailman archiver also doesn't wrap long lines, so this seems an unwelcome blast from the past.)

Status
REPORTED
Submitter
~teknico
Assigned to
No-one
Submitted
4 years ago
Updated
8 days ago
Labels
No labels applied.

~dominicm 1 year, 9 months ago

+1

Adding white-space: pre-wrap fixes the issue. It's much more usable than the horizontal scrolling, with the exception of git patches on mobile.

While not perfect, I think this is a big improvement as many emails are not manually wrapped.

~logankirkland 11 months ago*

+1

This wrapping issue makes viewing list archives from mobile very difficult—in my opinion, almost unusable. Why not make this a user-configurable setting?

I read the discussion and understand the motivation for not wrapping. It seems to boil down to the fact that sometimes "...some people also deliberately format their lines exceeding the [recommended 72 character] limit in some cases, for example with an embedded log file or some such.". I certainly see the value in preserving formatting in this case. But I wonder how often this is relevant? If most messages aren't intentionally exceeding the limit, wouldn't it make more sense to wrap by default, and perhaps add the option to "view original"? Just my thoughts.

~logankirkland 11 months ago

If you're willing to install a userscript, I created this: sourcehut-lists-userscript, which adds wrapping by default, as well as a link on each message to view unwrapped.

~rdpate 8 days ago

To fix this locally, I've started using this CSS:

div.container {
    max-width: 100ch;
}

pre {
    /* Selector does not include .message-body because that is missing from https://lists.sr.ht/~USER. */
    overflow: visible;
    padding: 1em;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 100%;
    line-height: 1.2;
    hyphens: auto;
    hyphenate-limit-chars: auto 4;
}
Register here or Log in to comment, or comment via email.