Last Comment Bug 837878 - Display product and component info in show_bug.cgi
: Display product and component info in show_bug.cgi
Status: RESOLVED FIXED
:
Product: bugzilla.mozilla.org
Classification: Other
Component: User Interface (show other bugs)
: Production
: All All
: -- enhancement (vote)
: ---
Assigned To: David Lawrence [:dkl]
:
:
Mentors:
Depends on:
Blocks: 848216
  Show dependency treegraph
 
Reported: 2013-02-04 14:35 PST by Liz Henry (:lizzard) (needinfo? me)
Modified: 2013-03-12 11:43 PDT (History)
3 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch to display prod/comp description in show_bug.cgi for 4.2 (v1) (2.81 KB, patch)
2013-03-01 09:55 PST, David Lawrence [:dkl]
glob: review-
Details | Diff | Splinter Review
Patch to display prod/comp description in show_bug.cgi for 4.2 (v2) (3.59 KB, patch)
2013-03-05 14:54 PST, David Lawrence [:dkl]
glob: review+
Details | Diff | Splinter Review

Description Liz Henry (:lizzard) (needinfo? me) 2013-02-04 14:35:07 PST
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.
Comment 1 David Lawrence [:dkl] 2013-03-01 09:55:34 PST
Created attachment 720006 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v1)
Comment 2 Byron Jones ‹:glob› [PTO until 2016-10-10] 2013-03-05 00:24:03 PST
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
Comment 3 David Lawrence [:dkl] 2013-03-05 14:54:43 PST
Created attachment 721476 [details] [diff] [review]
Patch to display prod/comp description in show_bug.cgi for 4.2 (v2)
Comment 4 Byron Jones ‹:glob› [PTO until 2016-10-10] 2013-03-12 00:11:14 PDT
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
Comment 5 David Lawrence [:dkl] 2013-03-12 11:43:02 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.