[Rt-commit] rt branch, 4.2/scrip-custom-code-textareas-visible-only-when-needed, repushed

Dustin Collins strega at bestpractical.com
Sat Sep 3 21:39:51 EDT 2016


The branch 4.2/scrip-custom-code-textareas-visible-only-when-needed was deleted and repushed:
       was 12caab7c2b7d042b1ce98add3c5568c7fcaeac6a
       now 963d166a840d248b4c6b0c81c9f1a72bcdd12120

1:  12caab7 ! 1:  963d166 Hide scrip custom code fields when appropriate
    @@ -2,38 +2,15 @@
     
         Hide scrip custom code fields when appropriate
         
    -    The textareas for condition, action prepare, and action commit code
    -    only make sense for scrips that use "User Defined" condition or
    -    action. This commit shows or hides each textarea (using JavaScript)
    -    based on whether the scrip's current configuration will use its
    -    contents. This is meant to reduce user confusion about when these
    -    textareas take effect, and significantly reduce the length of the page
    -    in the common case of no "User Defined" code.
    -    
    -    To reinforce to users the relationship between the dropdown and its
    -    custom code textarea(s), we've moved each textarea up into the form,
    -    right below to its dropdown. If the fields were to remain in two
    -    separate sections, then users wouldn't notice the show/hide action at
    -    a distance and would wonder why the textareas appear only some of the
    -    time. This also reduces the perceived complexity of the scrip
    -    create/modify page down to one consistent form, rather than two
    -    confusingly-related sections, each with its own Save Changes button.
    -    
    -    In order to ease the transition for custom deployments, two new methods
    -    (UserEditableIDs and IsUserEditable) have been added to ScripCondition
    -    and ScripAction to allow users to easily inform RT of conditions or
    -    actions they have made user editable.
    -    
    -    Now that we've moved the textareas to be inline with the rest of the
    -    form, there arises a new problem where specifying lots of code would
    -    cause the rest of the page (e.g. Template selection) to scroll
    -    offscreen. So adapting the size of the textbox to how many lines are
    -    in the provided code (+3 lines for buffer) has been replaced with a
    -    constant of 6 rows. Users will still be able to use their browser's
    -    textarea resize tool to make the code entry fields longer.
    -    
    -    There is no animation for the show/hide actions because jQuery's
    -    slideUp and slideDown animations cannot handle table tags.
    +    The textareas for condition, action prepare, and action commit code only make sense for scrips that use "User Defined" condition or action. This commit shows or hides each textarea (using JavaScript) based on whether the scrip's current configuration will use its contents. This is meant to reduce user confusion about when these textareas take effect, and significantly reduce the length of the page in the common case of no "User Defined" code.
    +    
    +    To reinforce to users the relationship between the dropdown and its custom code textarea(s), we've moved each textarea up into the form, right below to its dropdown. If the fields were to remain in two separate sections, then users wouldn't notice the show/hide action at a distance and would wonder why the textareas appear only some of the time. This also reduces the perceived complexity of the scrip create/modify page down to one consistent form, rather than two confusingly-related sections, each with its own Save Changes button.
    +    
    +    In order to ease the transition for custom deployments, two new methods (UserEditableIDs and IsUserEditable) have been added to ScripCondition and ScripAction to allow users to easily inform RT of conditions or actions they have made user editable.
    +    
    +    Now that we've moved the textareas to be inline with the rest of the form, there arises a new problem where specifying lots of code would cause the rest of the page (e.g. Template selection) to scroll offscreen. So adapting the size of the textbox to how many lines are in the provided code (+3 lines for buffer) has been replaced with a constant of 6 rows. Users will still be able to use their browser's textarea resize tool to make the code entry fields longer.
    +    
    +    There is no animation for the show/hide actions because jQuery's slideUp and slideDown animations cannot handle table tags.
         
         Fixes: I#32260
     
    @@ -94,7 +71,7 @@
     --- a/lib/RT/ScripCondition.pm
     +++ b/lib/RT/ScripCondition.pm
     @@
    - }
    + 
      
      
     +=head2 IsUserEditable
    @@ -140,9 +117,10 @@
     +}
     +
     +
    - 
    ++
      =head2 id
      
    + Returns the current value of id.
     
     diff --git a/share/html/Admin/Scrips/Create.html b/share/html/Admin/Scrips/Create.html
     --- a/share/html/Admin/Scrips/Create.html



More information about the rt-commit mailing list