Closed Bug 425606 Opened 16 years ago Closed 14 years ago

Wrapping is broken with attachment links

Categories

(Bugzilla :: User Interface, defect)

3.0.3
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: bbaetz, Assigned: mkanat)

References

Details

(Keywords: regression, Whiteboard: [fixed by blocker])

Attachments

(3 files)

Presumably regression from bug 388723?

See bug 425599. I entered:

Changes to attachment flags show up as "Attachment #294955 [details] [diff]Flag". This is due to how the fielddefs stuff is munged.

as one sentence/line, using ff 2.0.0.13. the wrapping got busted, so it looks like:

Changes to attachment flags show up as "Attachment #294955 [details] [diff]Flag". This is due to
how the fielddefs stuff is munged.

as three lines. Not sure if its due to the linkification of the attachment or not.

Test:

Foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz
shaver was complaining about this earlier.
Component: Creating/Changing Bugs → User Interface
Flags: blocking3.2?
Flags: blocking3.0.4?
Blocks: 425607
Depends on: 388723
Keywords: regression
OS: Linux → All
Are you talking about what wrapping looks like in emails or what? I don't just magically know--I haven't seen this bug.
Severity: major → normal
Can you reproduce this on the landfill bugzilla-tip? None of my comments have looked like that. Does it happen no matter what browser you're using to enter comments?
Attached image shaver's screenshot
(In reply to comment #3)
> Does it happen no matter what browser you're using to enter comments?

  Or, looking at shaver's screenshot (which makes this more clear), perhaps the browser being used to view the comment? 

  It's possible the width just isn't wide enough, but I haven't seen it happen to any of my comments.
This happens on CVS tip, on my local machine. Using FF 2.0.0.13.

Both my and shaver's examples have to do with attachments - is that stuffing something up?
Well, the only difference I can see is that the attachment screen's textarea has wrap="soft", which it probably shouldn't have.
Flags: blocking3.2?
Flags: blocking3.2+
Flags: blocking3.0.4?
Flags: blocking3.0.4+
Summary: wrapping is broken → Wrapping is bad when adding an attachment
Target Milestone: --- → Bugzilla 3.0
Its not just adding an attachment - my comment in the original bug just mentioned an attachment. Is the wrapping code looking at the length pre-linkification? Maybe my bug is separate to shaver's.

OK, yeah, so there are two bugs. Movig this back to the original issue.

template/en/default/bug/comments.html.tmpl does quoteUrls on wrapped_comment, but that can change the resulting text.

will do separate bug on shaver's issue
Summary: Wrapping is bad when adding an attachment → Wrapping is broken with attachment links
(In reply to comment #8)
> Is the wrapping code looking at the length pre-linkification? 

  Ah, yes, it is, of course. Otherwise we'd be counting the length of the HTML code. That wasn't a problem when we didn't also have CSS wrapping the field.

  I suspect the solution is just to increase the width of the CSS wrapping. That's probably the solution for shaver's bug, too.
Then,

attachment 312212 [details] is more directly related to bug 425636.

for the current bug, see comment 0,

or bug 425960 comment 6, which I entered with
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070515 SeaMonkey/1.5a] (nightly) (W2Ksp4)
Blocks: 425636
yeah, it looks like it's the " [details]" string getting added that's stuffing it up.
Assignee: create-and-change → guy.pyrzak
As LpSolit pointed out during our meeting, this really isn't severe enough to really stop us from releasing a major version of Bugzilla, so it's not a blocker.
Flags: blocking3.2-
Flags: blocking3.2+
Flags: blocking3.0.4-
Flags: blocking3.0.4+
The Bugzilla 3.0 branch is now locked to security bugs and dataloss fixes only. This bug doesn't fit into one of these two categories and is retargetted to 3.2 as part of a mass-change. To catch bugmails related to this mass-change, use lts081207 in your email client filter.
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Target Milestone: Bugzilla 3.2 → Bugzilla 3.4
This bug regularly affects a LOT of comments, namely every comment that contains a link to attachments like attachment 312212 [details] will be messed up for ever, like here where I have just typed continuous text when I entered this comment. This has a very negative impact on the readability of any such comments. The longer this bug lives, the more comments will be spoiled for good.

It shouldn't be very hard to fix for someone who knows the code:
- first linkify
- then wrap, based on the character count of visible text

Any hopes that this could be fixed any time soon?

Side note: Can anyone explain to me why bugzilla still wraps continuous comments by inserting line breaks AT ALL?
Attached patch v1 option 1Splinter Review
nothing really special here just removing the wrapping but this might make some people unhappy
Attachment #430994 - Flags: review?(mkanat)
Attachment #430994 - Flags: review?(LpSolit)
Attached patch v1 option 2Splinter Review
this option keeps the wrap but does it LAST probably where it should be if we want it to work with the filter but it could cause problems like putting new lines in where they don't belong.
Attachment #430995 - Flags: review?(mkanat)
Attachment #430995 - Flags: review?(LpSolit)
Comment on attachment 430995 [details] [diff] [review]
v1 option 2

>=== modified file 'template/en/default/bug/comments.html.tmpl'

>-  [%- comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment) -%]
>+  [%- comment.body_full() FILTER quoteUrls(bug, comment) 
>+  FILTER wrap_comment(80)-%]

This won't work as it's going to wrap HTML entities too, and will take them into the calculations.
Attachment #430995 - Flags: review?(mkanat)
Attachment #430995 - Flags: review?(LpSolit)
Attachment #430995 - Flags: review-
Depends on: 551468
Comment on attachment 430994 [details] [diff] [review]
v1 option 1

No, this also removes wrapping from emails. I'm actually going to fix this in bug 551468.
Attachment #430994 - Flags: review?(mkanat)
Attachment #430994 - Flags: review?(LpSolit)
Attachment #430994 - Flags: review-
Whiteboard: [blocker will fix]
Target Milestone: Bugzilla 3.4 → ---
Assignee: guy.pyrzak → mkanat
Whiteboard: [blocker will fix] → [fixed by blocker]
Target Milestone: --- → Bugzilla 4.2
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: