Closed Bug 282349 Opened 20 years ago Closed 20 years ago

Comments are forced to being left-justified

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P1)

2.19.2

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: jussi, Assigned: mkanat)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Bug 11901 improved bugzilla's output formatting substantially, but in the process it lost the ability to insert peaces of code or other preformatted text to comments. The below link shows a peace of bugzilla code copied to a comment: <http://landfill.bugzilla.org/bugzilla-tip/show_bug.cgi?id=2383#c2> To fix this, I would suggest adding a tag which could be used to turn off wrapping when necessary. For example: <verbatim> Preformatted text. </verbatim>
(In reply to comment #0) > Bug 11901 improved bugzilla's output formatting substantially, but in the > process it lost the ability to insert peaces of code or other preformatted text > to comments. Nothing was lost. Bugzilla never had that ability, unless you hacked it. You can also now add a > to the front of a line to make it not wrap.
(In reply to comment #1) > Nothing was lost. Bugzilla never had that ability, unless you hacked it. > You can also now add a > to the front of a line to make it not wrap. You are right, but before output formatting bugzilla had kind of WYSIWYG comment writing where everything was preformatted. So I was able to insert indented code etc. without loosing readability. See the link in comment 0 which contains a peace of code copied from User.pm. If I would copy the same code here, it would show up indented correctly.
Oh, that's a bug! :-)
Severity: enhancement → major
Summary: Allow comments with preformatted text → Comments are forced to being left-justified
Target Milestone: --- → Bugzilla 2.20
Keywords: regression
OK, so basically, I discovered that this behavior of Text::Autoformat is not changeable. So I went back to how we used to wrap all attachment comments, but put that code into the wrap_comment sub. So this means that we're back to using Text::Wrap again, which I really like more anyhow, and which I think is probably also faster.
Attachment #174473 - Flags: review?
This pretty much definitely blocks any release. Here's a testing installation, and a link to a bug where I've posted many test-case comments: http://landfill.bugzilla.org/bz282349/show_bug.cgi?id=2323 I didn't want to make this a "back out bug 11901 and check it back in" because this only affects a localized part of that patch.
Status: NEW → ASSIGNED
Flags: blocking2.20?
Attachment #174473 - Flags: review? → review?(myk)
Priority: -- → P1
Comment on attachment 174473 [details] [diff] [review] Go back to using Text::Wrap, with same functionality This seems ok if it doesn't regress functionality, but it should get second review from someone who reviewed the fix for bug 11901 and is familiar with the decision to go with Text::Autoformat in that patch.
Attachment #174473 - Flags: review?(myk) → review+
Comment on attachment 174473 [details] [diff] [review] Go back to using Text::Wrap, with same functionality OK, that would be Gerv. Gerv, could you respond to Myk's comment above?
Attachment #174473 - Flags: review?(gerv)
The reason we chose Text::Autoformat was issue 2 in bug 11901, comment 229. However, you appear to have fixed that with WRAP_IGNORE in your patch (which, BTW, should be hard coded rather than yet another global variable; it's _so_ not going to change.) I find it hard to believe that AutoFormat a) does what you say it does, and b) isn't configurable in it. But if we've solve issue #2, then I have no particular problem with switching back to Text::Wrap. Until, of course, we find some more comments that _that_ can't cope with... Gerv
It does indeed do what I say it does, and it's definitely not configurable. I pored over the Text::Autoformat source for hours. So if I switch WRAP_IGNORE to be a literal instead of a constant, is that a r+?
Oops. Gerv wasn't on CC. Gerv -- see my last comment.
Comment on attachment 174473 [details] [diff] [review] Go back to using Text::Wrap, with same functionality r=gerv with that change. I hope there's not a performance hit associated with calling wrap for every line rather than once per comment... Gerv
Attachment #174473 - Flags: review?(gerv) → review+
Attached patch v1.1Splinter Review
OK, carrying forward r+ from Gerv based on the comments above.
Attachment #174473 - Attachment is obsolete: true
Attachment #175504 - Flags: review+
Flags: blocking2.20? → approval?
Flags: approval? → approval+
Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.356; previous revision: 1.355 done Checking in Bugzilla/Util.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v <-- Util.pm new revision: 1.23; previous revision: 1.22 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 388723
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: