Changes between Version 3 and Version 4 of HideChangesPlugin


Ignore:
Timestamp:
Jul 20, 2015, 10:45:20 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • HideChangesPlugin

    v3 v4  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Hide ticket changes based on configurable rules =
     3= Hide ticket changes based on configurable rules
    44
    5 == Description ==
     5== Description
    66
    7 Tickets can get noisy with lots of changes.  This plugin hides a configurable set of changes to reduce this clutter.  A button toggles between showing and hiding the changes. See [wiki:HideChangesPlugin#Examples examples below].
     7Tickets can get noisy with lots of changes. This plugin hides a configurable set of changes to reduce this clutter. A button toggles between showing and hiding the changes. See [wiki:HideChangesPlugin#Examples examples below].
    88
    9 '''SECURITY WARNING! ''' This plugin processes freeform !JavaScript/jQuery code from the {{{trac.ini}}} file.  If this can be a security concern in your Trac deployment, please do not use this plugin.
     9'''SECURITY WARNING:''' This plugin processes freeform !JavaScript/jQuery code from the {{{trac.ini}}} file. If this is a security concern in your Trac deployment, please do not use this plugin.
    1010
     11== Bugs/Feature Requests
    1112
    12 == Configuration ==
    13  1. Install the plugin (after downloading and unzipping):
    14     {{{
     13Existing bugs and feature requests for HideChangesPlugin are
     14[report:9?COMPONENT=HideChangesPlugin here].
     15
     16If you have any issues, create a
     17[/newticket?component=HideChangesPlugin new ticket].
     18
     19[[TicketQuery(component=HideChangesPlugin&group=type,format=progress)]]
     20
     21== Download
     22
     23Download the zipped source from [download:hidechangesplugin here].
     24
     25== Source
     26
     27You can check out HideChangesPlugin from [http://trac-hacks.org/svn/hidechangesplugin here] using Subversion, or [source:hidechangesplugin browse the source] with Trac.
     28
     29== Installation and Configuration
     30
     31 1. Install the plugin after downloading and unzipping:
     32    {{{#!sh
    1533    cd hidechangesplugin/trunk
    1634    sudo python setup.py bdist_egg
     
    1836    }}}
    1937
    20     See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options. You'll likely need to restart Trac's web server after installation.
     38 See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options. You'll likely need to restart Trac's web server after installation.
    2139
    22  2. Enable the plugin:
    23     {{{
     40 2. Enable the plugin by adding the following to your `trac.ini` file:
     41    {{{#!ini
    2442    [components]
    2543    hidechanges.* = enabled
    2644    }}}
    2745
    28     You can alternatively use the Trac Web Admin GUI to enable any or all rules.
     46 You can alternatively use the Trac Web Admin GUI to enable any or all rules.
    2947
    30  3. Create rules in the {{{[hidechanges]}}} section of {{{trac.ini}}} for which changes to hide.  See [wiki:HideChangesPlugin#Examples examples below] for details and ideas.
     48 3. Create rules in the {{{[hidechanges]}}} section of {{{trac.ini}}} for which changes to hide. See [wiki:HideChangesPlugin#Examples examples below] for details and ideas.
    3149
     50== Example
    3251
    33 == Bugs/Feature Requests ==
     52You define rules using the {{{rule.<name>}}} option in the {{{[hidechanges]}}} section of {{{trac.ini}}} as freeform !JavaScript/jQuery 1.8.7 code.  Each rule {{{<name>}}} must be unique. Each rule (code) must evaluate to either {{{true}}} or {{{false}}}. If {{{true}}}, the change will be hidden. A {{{changediv}}} jQuery object is available to use within each rule. An example can be helpful to explain this more concretely.
    3453
    35 Existing bugs and feature requests for HideChangesPlugin are
    36 [report:9?COMPONENT=HideChangesPlugin here].
     54=== Hide commentless changes
    3755
    38 If you have any issues, create a
    39 [http://trac-hacks.org/newticket?component=HideChangesPlugin&owner=robguttman new ticket].
    40 
    41 == Download ==
    42 
    43 Download the zipped source from [download:hidechangesplugin here].
    44 
    45 == Source ==
    46 
    47 You can check out HideChangesPlugin from [http://trac-hacks.org/svn/hidechangesplugin here] using Subversion, or [source:hidechangesplugin browse the source] with Trac.
    48 
    49 == Example ==
    50 You define rules using the {{{rule.<name>}}} option in the {{{[hidechanges]}}} section of {{{trac.ini}}} as freeform !JavaScript/jQuery 1.8.7 code.  Each rule {{{<name>}}} must be unique.  Each rule (code) must evaluate to either {{{true}}} or {{{false}}}.  If {{{true}}}, the change will be hidden.  A {{{changediv}}} jQuery object is available to use within each rule. An example can be helpful to explain this more concretely...
    51 
    52 === Hide commentless changes ===
    53 The most common type of changes to want to hide are commentless changes - e.g., when just a field changes without any comment.  Here's how you would configure this rule in {{{trac.ini}}}:
    54 {{{
     56The most common type of changes to want to hide are commentless changes, eg when just a field changes without any comment. Here's how you would configure this rule in {{{trac.ini}}}:
     57{{{#!ini
    5558[hidechanges]
    5659rule.commentless = !changediv.find('div.comment').children().length
     
    5962}}}
    6063
    61 The above rule is named {{{commentless}}}.  It checks the change div's comment div for any children.  If no children are found (length = {{{0}}}), that means the change is commentless.  Since the rule needs to evaluate to {{{true}}} to hide a change, we negate the result with a {{{!}}}.  In this example, we also changed the default button names to make it clear what type of comments are hidden. The button's name changes as the changes are shown or hidden.
     64The above rule is named {{{commentless}}}. It checks the change div's comment div for any children. If no children are found (length = {{{0}}}), that means the change is commentless. Since the rule needs to evaluate to {{{true}}} to hide a change, we negate the result with a {{{!}}}. In this example, we also changed the default button names to make it clear what type of comments are hidden. The button's name changes as the changes are shown or hidden.
    6265
    63 === Hide changeset changes ===
     66=== Hide changeset changes
     67
    6468To hide changeset changes that are in the Trac 0.12 wiki syntax:
    65 {{{
     69{{{#!ini
    6670[hidechanges]
    6771rule.changeset = changediv.find('p a.changeset').children().length
    6872}}}
    6973
    70 This {{{changeset}}} rule checks for an href node with the {{changeset}}} class - this is the wiki syntax for changesets introduced in Trac 0.12 (I believe). If found, hide the change!
     74This {{{changeset}}} rule checks for an href node with the {{changeset}}} class, this is the wiki syntax for changesets introduced in Trac 0.12. If found, hide the change!
    7175
    72 You can combine both/all rules in the {{{[hidechanges]}}} section of the {{{trac.ini}}} file as long as the names are unique.  You should take care in naming the buttons accordingly as one set of buttons apply to all hidden changes.
     76You can combine both/all rules in the {{{[hidechanges]}}} section of the {{{trac.ini}}} file as long as the names are unique. You should take care in naming the buttons accordingly, as one set of buttons apply to all hidden changes.
    7377
    74 
    75 == Recent Changes ==
     78== Recent Changes
    7679
    7780[[ChangeLog(hidechangesplugin, 3)]]
    7881
    79 == Author/Contributors ==
     82== Author/Contributors
    8083
    8184'''Author:''' [wiki:robguttman] [[BR]]
    82 '''Maintainer:''' [wiki:robguttman] [[BR]]
     85'''Maintainer:''' [[Maintainer]] [[BR]]
    8386'''Contributors:'''