Display product and component info in show_bug.cgi

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
User Interface
--
enhancement
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: lizzard, Assigned: dkl)

Tracking

Production

Details

Attachments

(1 attachment, 1 obsolete attachment)

In show_bug.cgi, next to the product and component selection, I would like for there to be a hidden div that can be displayed (maybe with an "(info)" link) that pulls relevant information from describecomponents.cgi.  

This assumes that links to module pages in wiki.mozilla.org will be added (by hand) to the entries for each product and component in describecomponents.cgi. It's intended to lead new contributors directly to useful documentation.
(Reporter)

Updated

5 years ago
Severity: normal → enhancement
Summary: Enhancement - Display product and component info in show_bug.cgi → Display product and component info in show_bug.cgi
(Assignee)

Comment 1

4 years ago
Created attachment 720006 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v1)
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #720006 - Flags: review?(glob)
Comment on attachment 720006 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v1)

Review of attachment 720006 [details] [diff] [review]:
-----------------------------------------------------------------

this is mostly good, however i'd like to see a (close) button to hide the info.

there's issues with component's (info) wrapping down a line when the screen width isn't wide enough (which is the case on my default bugzilla window size of 936px).  this looks weird, would be nice (but not required) to address this.

please remove trailing whitespace.

::: extensions/BMO/template/en/default/hook/bug/edit-after_importance.html.tmpl
@@ +16,5 @@
> +    Y.on('contentready', function() {
> +      var field_container = Y.one('#field_container_product');
> +      field_container.appendChild('<span id="toggle_prod_desc">' + 
> +                                  '(<a href="javascript:void(0);" id="toggle_prod_desc_link">info</a>)' +
> +                                  '</span>');

you need a space before the ( to avoid it abutting the product name when not logged in

@@ +18,5 @@
> +      field_container.appendChild('<span id="toggle_prod_desc">' + 
> +                                  '(<a href="javascript:void(0);" id="toggle_prod_desc_link">info</a>)' +
> +                                  '</span>');
> +      field_container.appendChild('<div class="bz_default_hidden" id="prod_desc_container">' + 
> +                                  '[% bug.product_obj.description FILTER html_light %]</div>');

you need to "FILTER js" after html_light, otherwise descriptions with a ' will trigger a js error.

@@ +29,5 @@
> +    Y.on('contentready', function() {
> +      var field_container = Y.one('#field_container_component');
> +      field_container.appendChild('<span id="toggle_comp_desc">' + 
> +                                  '(<a href="javascript:void(0);" id="toggle_comp_desc_link">info</a>)' +
> +                                  '</span>');

space needed in front of ( too

@@ +31,5 @@
> +      field_container.appendChild('<span id="toggle_comp_desc">' + 
> +                                  '(<a href="javascript:void(0);" id="toggle_comp_desc_link">info</a>)' +
> +                                  '</span>');
> +      field_container.appendChild('<div class="bz_default_hidden" id="comp_desc_container">' + 
> +                                  '[% bug.component_obj.description FILTER html_light %]</div>');

FILTER js here too
Attachment #720006 - Flags: review?(glob) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 721476 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v2)
Attachment #720006 - Attachment is obsolete: true
Attachment #721476 - Flags: review?(glob)
(Reporter)

Updated

4 years ago
Blocks: 848216
Comment on attachment 721476 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v2)

Review of attachment 721476 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob
with issues to fixed on committing.

remove trailing whitespace.

::: extensions/BMO/template/en/default/hook/bug/edit-after_importance.html.tmpl
@@ +11,5 @@
> +  YUI({
> +    base: 'js/yui3/',
> +    combine: false
> +  }).use('node', 'event', function(Y) {
> +    [% IF bug.product_obj.description %]

this check is not required - the description is a mandatory field

@@ +32,5 @@
> +        }
> +      }, '#toggle_prod_desc_link');
> +    }, '#field_container_product');
> +    [% END %]
> +    [% IF bug.component_obj.description %]

this check is not required - the description is a mandatory field
Attachment #721476 - Flags: review?(glob) → review+
(Assignee)

Comment 5

4 years ago
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2         
modified extensions/BMO/web/styles/edit_bug.css
added extensions/BMO/template/en/default/hook/bug/edit-after_importance.html.tmpl
Committed revision 8652.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.