Roundup Tracker - Issues

Issue 2550793

classification
Title: Some messages displayed with very long lines not wrapped
Type: behavior Severity: major
Components: Web interface, Mail interface Versions: 1.5, 1.4
process
Status: fixed Resolution: fixed
Dependencies: Superseder:
Assigned To: ThomasAH Nosy List: ThomasAH, ber, jaraco, pefu
Priority: Keywords: patch

Created on 2013-02-10 09:51 by jaraco, last changed 2016-02-25 10:39 by pefu.

Files
File name Uploaded Description Edit Remove
msg.pickle jaraco, 2013-03-09 17:11
Messages
msg4792 Author: [hidden] (jaraco) Date: 2013-02-10 09:51
I've noticed in our tracker instance that often messages appear not to
wrap, and a paragraph will be displayed as a single, long line.
Apparently, this issue is not unique to my instance, as it can also be
observed in issue1795256.

If I view that issue in the latest version of Firefox, msg2481 and
msg2482 are displayed as very short, wide messages, in this case causing
the view to expand to 4 times the width of the browser. This view is
highly unfriendly, as it requires the user to scroll horizontally to
read the message or determine the author and date for the messages.

I have not yet been able to characterize what causes these messages to
be formatted such. It may be the mail gateway or other factor.

I've observed this behavior even with Roundup 1.4.21.

I suspect though haven't confirmed this issue is isolated to e-mail
messages.

I've searched through the options for the e-mail config and don't see
any options for affecting line wrap. Is this behavior expected? Has it
been characterized before? What options are available to work around the
issue?
msg4793 Author: [hidden] (ber) Date: 2013-02-11 08:14
Hi Jason,
thanks for your report.
Can you create an easy example that can be reproduced?
I wonder what happens if there is a long word (having not whitespace),
even when entered via the web. I guess that something it even is
preferable to not line-break those "words", e.g. when they are urls.

Experiment:
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu
vwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
msg4794 Author: [hidden] (ber) Date: 2013-02-11 08:14
Another try
http://issues.roundup-
tracker.org/issue2550793?@ok_message=msg%204793%20created%0Aissue%2025507
93%20nosy%2C%20messages%20edited%20ok&@template=item
msg4795 Author: [hidden] (jaraco) Date: 2013-02-11 13:33
I don't believe the issue happens due to long words. In all cases, the
text is simple prose, like this sentence, but for some reason appears
un-wrapped. It would be hard to reproduce, because I believe it mainly
(only) happens when content is pulled from a mail server.

One thing I might be able to do is find an e-mail message which
generated an unwrapped msg. I'll see if I can track one down.
msg4820 Author: [hidden] (jaraco) Date: 2013-03-09 17:11
Attached is a pickle of a POP3 message (as returned by POP3_SSL.retr)
that generated long lines in my tracker. Load it with:

    import pickle
    with open('msg.pickle', 'rb') as f:
        msg = pickle.load(f)

I've hand-manipulated the lines of the message and replaced names of
individuals and organizations with different names of the same length
(for privacy).

Here is an excerpt of one of the long lines from msg[1]:

 b'We should have some more answers from this one vendor this week, and
if not=',
 b'hing is satisfactorily received for this one, we will keep continue
to move=',
 b' until we have a solution.',

As you can see, the e-mail payload contains continuation blocks
(trailing equals signs). Presumably, these are used construct new lines
that are far more than 80 characters. Because these are not wrapped
before they're displayed in roundup, they cause the display to be very
difficult to read.
msg4993 Author: [hidden] (ThomasAH) Date: 2014-02-26 09:20
This still is a problem. To easily reproduce, just send an email to the tracker which includes very long lines (just as this mail I'm just sending to the tracker). Of course you need to write many words, otherwise the line would not be very long. I repeat: You need many words, so the line is long enough to show the problem.
msg5007 Author: [hidden] (ThomasAH) Date: 2014-03-10 15:44
In our local installation I just added this to style.css:

pre {
  white-space: pre-wrap;
}

It seems to work well, copy&paste of code retains the long lines in the
target. Should this be included in all included Roundup templates?
msg5014 Author: [hidden] (ThomasAH) Date: 2014-03-11 10:10
changeset:   4862:7ed1893ea3ac
user:        Thomas Arendsen Hein <thomas@intevation.de>
date:        Tue Mar 11 10:13:58 2014 +0100
description:
issue2550793: Wrap messages with very long lines in the web interface.

Applied to templates classic, devel, minimal and website/issues.
jinja2 and responsive should already have this through bootstrap.
msg5037 Author: [hidden] (ThomasAH) Date: 2014-03-17 15:27
The change is now deployed to this instance, too, so msg4993 now shows
the wrapping effect.
msg5047 Author: [hidden] (jaraco) Date: 2014-03-21 14:47
Thanks to everyone for the help on this!
msg5465 Author: [hidden] (pefu) Date: 2016-02-24 15:43
In our company we recently had some discussion about this topic.

For western languages it is widely accepted that for best 
readability the length of lines of text should be something 
between 60 and 65 characters per line.  

This means Roundup should normally store text in format=fixed (as
opposed to format=flowed as discussed in
http://www.ietf.org/rfc/rfc3676.txt ).  
However E-mails containing text with format=flowed became 
increasingly popular. Certain foreign languages (like chinese) 
may even require some other special handling. (see 
https://sourceforge.net/p/roundup/mailman/message/34879502/ )

AFAIK currently (1.5.1) the mail gateway of Roundup does nothing with 
emails containing huge lines as seen here in msg4993 and store them
as is.  To get those displayed in readable form with reasonable 
short line lengths the user is forced to narrow the width of the
browser window.

It might be an option to pipe incoming emails through the 
utility program ``fmt -w 65`` to enforce hard line breaks before
the emails gateway hands them over to Roundup for storing.
msg5468 Author: [hidden] (ber) Date: 2016-02-25 08:04
Hi Peter,
thanks for your input on the matter.
Can you open a new issue, I think this one was successfully concluded
by making sure that we get some wrapping for long lines with words.
You are proposing additional improvements, thanks for doing so!

Regards,
Bernhard
msg5471 Author: [hidden] (pefu) Date: 2016-02-25 10:39
I've created issue2550902 as suggested by Bernhard in msg5468.
Peter.
History
Date User Action Args
2016-02-25 10:39:57pefusetmessages: + msg5471
2016-02-25 08:04:55bersetmessages: + msg5468
versions: + 1.5
2016-02-24 15:43:22pefusetmessages: + msg5465
2016-02-24 15:16:35pefusetnosy: + pefu
2014-03-21 14:47:30jaracosetmessages: + msg5047
2014-03-17 15:27:40ThomasAHsetmessages: + msg5037
2014-03-11 10:10:56ThomasAHsetstatus: open -> fixed
resolution: fixed
messages: + msg5014
2014-03-10 15:44:41ThomasAHsetkeywords: + patch
assignee: ThomasAH
status: new -> open
messages: + msg5007
2014-02-26 09:20:54ThomasAHsetnosy: + ThomasAH
messages: + msg4993
2013-03-09 17:11:32jaracosetfiles: + msg.pickle
messages: + msg4820
2013-02-11 13:33:51jaracosetmessages: + msg4795
2013-02-11 08:14:52bersetmessages: + msg4794
2013-02-11 08:14:26bersetnosy: + ber
messages: + msg4793
2013-02-10 09:51:33jaracocreate