Closed Bug 524254 Opened 15 years ago Closed 15 years ago

The comment box in bug/edit.html.tmpl should be a block

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(3 files, 1 obsolete file)

The only major piece of code in bug/edit.html.tmpl that's not in a BLOCK is the Additional Comments section. I've frequently wanted to have it in a block during customizations, and I've now run into an upstream situation where it would be much easier to refactor the file if that code were in a block, so I'm breaking this off into its own bug and just doing it.
Attached patch v1 (obsolete) — Splinter Review
Okay, here we go! When I created the comment_box block, I moved the actual comments.html.tmpl outside of it. As a result, some new CSS was needed for it. Also, the <hr>'s were no longer the same size as the comments. Instead of getting very complicated with the HTML and CSS structure of the bug edit page, I just moved the Collapse/Expand links to be on the right of the comments, which is nice because there's usually a bunch of extra space there anyway.

I will attach some screenshots.
Assignee: create-and-change → mkanat
Status: NEW → ASSIGNED
Attachment #408174 - Flags: review?(LpSolit)
Attached image Screenshot: Logged In
Here's what it looks like under Dusk when you are logged in.
Attached image Screenshot: Logged Out
And here's what it looks like when you're logged out.

Both of these are at 1024x768, by the way.
Oh, also, by the way, the taking of the comments out of the comment-box table is also necessary for my work on bug 524251.
Sometimes, lines can be long because replies are never wrapped (as expected). In this case, the two links you added on the right may reach the right side of the page. What happens to them in that case, i.e., how do they look like when they wrap?

Also, I visually prefer to have them where they are now, even with HR going away. pyrzak?
The simply collapse a bit. It's a table. Try applying the patch and just making the window smaller.
Comment on attachment 408174 [details] [diff] [review]
v1

>Index: template/en/default/bug/edit.html.tmpl

>+    [% PROCESS bug/comments.html.tmpl
>+      comments = bug.longdescs
>+      mode = user.id ? "edit" : "show"
>+    %]

>-        [% PROCESS bug/comments.html.tmpl
>-           comments = bug.longdescs
>-           mode = user.id ? "edit" : "show"
>-         %]

The patch bitrots due to bug 472217. At both places above, you have to write bug.comments instead of bug.longdescs. r=LpSolit with this change.
Attachment #408174 - Flags: review?(LpSolit) → review+
Flags: approval+
Comment on attachment 408174 [details] [diff] [review]
v1

>Index: template/en/default/bug/edit.html.tmpl

>+        [% Hook.process("after_comment_textarea") %]

Err... wait. This line being in a BLOCK now generates errors in the web server log:

show_bug.cgi: Use of uninitialized value $template_name in concatenation (.) or string at Bugzilla/Template/Plugin/Hook.pm line 60.
show_bug.cgi: Use of uninitialized value $type in concatenation (.) or string at Bugzilla/Template/Plugin/Hook.pm line 60.

Line 60 of Hook.pm is:
  my $extension_template = "$path$template_name-$hook_name.$type.tmpl";


This reminds me a bug where a hook in a BLOCK was having issues about not knowing where it is exactly.
Attachment #408174 - Flags: review+ → review-
Flags: approval+
Whiteboard: [needs new patch asap]
Attached patch v2Splinter Review
Okay, this fixes the bitrot and the Hook problem. The workaround right now for hooks in blocks is to actually specify the template name as the second argument to Hook.process().
Attachment #408174 - Attachment is obsolete: true
Attachment #417393 - Flags: review?(LpSolit)
Whiteboard: [needs new patch asap]
Comment on attachment 417393 [details] [diff] [review]
v2

r=LpSolit
Attachment #417393 - Flags: review?(LpSolit) → review+
Flags: approval+
Checking in skins/standard/global.css;
/cvsroot/mozilla/webtools/bugzilla/skins/standard/global.css,v  <--  global.css
new revision: 1.71; previous revision: 1.70
done
Checking in template/en/default/bug/comments.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/comments.html.tmpl,v  <--  comments.html.tmpl
new revision: 1.46; previous revision: 1.45
done
Checking in template/en/default/bug/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.172; previous revision: 1.171
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Keywords: relnote
Added to the release notes in bug 547466.
Keywords: relnote
Blocks: 658056
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: