Closed Bug 850135 Opened 8 years ago Closed 8 years ago

hide the textarea custom fields by default with an (edit) link

Categories

(Bugzilla :: User Interface, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: glob, Assigned: dkl)

References

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
whoops.


something that's been bugging me for a while .. on products which have the crash signature field enabled we should hide the textarea by default, similar to the summary field.

eg.

unset:
  crash signature: --- (edit)

set:
  crash signature: [@ js::types::TypeObject::sweep(JSContext*) ] (edit)

editing:
  crash signature: (current ui)
Summary: collapse crash → hide the "crash signature" textarea field by default
Severity: normal → trivial
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #724148 - Flags: review?(glob)
this patch looks very good .. i think it's worth pushing this one upstream.

if you agree, are you able to provide a patch against trunk?  otherwise i'm happy to take this for bmo only.

the only issues i've found (aside from trailing whitespace) are minor..

if the field contains linefeeds, these are collapsed when the field is initially displayed...
--
one
two
three
--
is displayed as
--
one two three
--

and when you click 'edit', the text should be selected.
Moving upstream as this relates to any textarea custom field and so would be useful for others as well.

dkl
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: hide the "crash signature" textarea field by default → hide the textarea custom fields by default with an (edit) link
Target Milestone: --- → Bugzilla 5.0
Version: Production → 4.5
Severity: trivial → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Attachment #724148 - Attachment is obsolete: true
Attachment #724148 - Flags: review?(glob)
Attachment #736519 - Flags: review?(glob)
Comment on attachment 736519 [details] [diff] [review]
Patch to hide custom textarea field inputs when not editing (v2)

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

this patch contains trailing whitespace, please remove.

if the field contains linefeeds, these are collapsed when the field is initially displayed...
--
one
two
three
--
is displayed as
--
one two three
--

when you click 'edit', the text should be selected, because this is what happens which you use other (edit) actions.

::: skins/standard/global.css
@@ +521,5 @@
>  }
>  
> +.field_textarea_readonly {
> +    margin:0px;
> +    padding:5px;

there needs to be a margin to avoid it abutting the (edit) element.  i suggest decreasing the padding and increasing the margin slightly.  maybe 2px for both.

@@ +525,5 @@
> +    padding:5px;
> +    overflow:auto;
> +    float:left;
> +    max-width:465px;
> +    max-height:100px;

these should be specified in terms of 'em' not pixels.

@@ +527,5 @@
> +    float:left;
> +    max-width:465px;
> +    max-height:100px;
> +    border:1px solid #CCC;
> +}

nit: space after each :
Attachment #736519 - Flags: review?(glob) → review-
Attachment #736519 - Attachment is obsolete: true
Attachment #741488 - Flags: review?(glob)
Comment on attachment 741488 [details] [diff] [review]
Patch to hide custom textarea field inputs when not editing (v3)

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

r=glob, with the change from <div><pre>..</pre></div> to <pre>..</pre> to be made on commit.

::: template/en/default/bug/field.html.tmpl
@@ +148,5 @@
> +         </div>
> +         [% IF value %]
> +           <div class="field_textarea_readonly">
> +             <pre>[% value FILTER html %]</pre>
> +           </div>

with a <pre> inside of a <div> you end up with a blank line before and after the <pre>, which makes it look like there's two blank lines in the field.

it should be:
<pre class="field_textarea_readonly">[% value FILTER html %]</pre>
Attachment #741488 - Flags: review?(glob) → review+
Flags: approval?
Flags: approval? → approval+
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk    
modified js/field.js
modified skins/standard/global.css                                                      
modified template/en/default/bug/field.html.tmpl
Committed revision 8622.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Blocks: 1196126
You need to log in before you can comment on or make changes to this bug.