ChangesList: Remove spaces from <td> in EnhancedChangesListGroup.mustache
authorFomafix <fomafix@googlemail.com>
Sun, 10 Feb 2019 20:01:25 +0000 (21:01 +0100)
committerKrinkle <krinklemail@gmail.com>
Tue, 12 Feb 2019 00:06:48 +0000 (00:06 +0000)
The special page RecentChanges can included in wiki content via

  {{Special:RecentChanges}}

In this case the generated content is parsed by a wikitext parser. The
wikitext parser converts

  <td>
    <span>Foo</span>
  </td>

to the HTML

  <td><p><span>Foo</span></p></td>

But the wikitext

  <td><span>Foo</span></td>

is converted to the HTML

  <td><span>Foo</span></td>

The module 'jquery.makeCollapsible' supports custom collapsible toggle
buttons but only when they are a direct child of the <td> element. When
the module does not find a custom collapsible toggle button it adds the
default button [Expand].

Because of the additional <p> element when including the recent changes
the module 'jquery.makeCollapsible' adds a default collapsible toggle
button.

This change removes the spaces between <td> and <span> to prevent the
<p> elements when including the recent changes.

Bug: T215737
Change-Id: Ida46956fc7f9ab923c542751ac13411380c02ab0

includes/templates/EnhancedChangesListGroup.mustache

index e41a98b..6037d37 100644 (file)
@@ -10,9 +10,7 @@
                                <div class="mw-rcfilters-ui-highlights-color-c5" data-color="c5"></div>
                        </div>
                </td>
-               <td>
-                       <span class="mw-collapsible-toggle mw-collapsible-arrow mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span>
-               </td>
+               <td><span class="mw-collapsible-toggle mw-collapsible-arrow mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span></td>
                <td class="mw-changeslist-line-prefix">{{{ prefix }}}</td>
                <td class="mw-enhanced-rc" colspan="2">{{{ collectedRcFlags }}}&#160;{{ timestamp }}&#160;</td>
                <td class="mw-changeslist-line-inner">