jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/373716 )

Change subject: RCFilters: Minimize vertical spacing; get rid of legend and 
<br>s
......................................................................


RCFilters: Minimize vertical spacing; get rid of legend and <br>s

Bug: T174121
Change-Id: I2249bf3d313232fe2f0dff6e34c5140885a13735
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
1 file changed, 11 insertions(+), 4 deletions(-)

Approvals:
  Sbisson: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
index ad99e22..cfcdf35 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
@@ -142,11 +142,14 @@
                        this.$element.find( 'hr' ).detach();
                }
 
+               // Get rid of all <br>s, which are inside rcshowhide
+               // If we still have content in rcshowhide, the <br>s are
+               // gone. Instead, the CSS now has a rule to mark all <span>s
+               // inside .rcshowhide with display:block; to simulate newlines
+               // where they're actually needed.
+               this.$element.find( 'br' ).detach();
                if ( !this.$element.find( '.rcshowhide' ).contents().length ) {
                        this.$element.find( '.rcshowhide' ).detach();
-                       // If we're hiding rcshowhide, the '<br>'s are around 
it,
-                       // there's no need for them either.
-                       this.$element.find( 'br' ).detach();
                }
 
                if ( this.$element.find( '.cloption' ).text().trim() === '' ) {
@@ -157,7 +160,11 @@
                        '.rclistfrom, .rcnotefrom, .rcoptions-listfromreset'
                ).detach();
 
-               if ( this.$element.text().trim() === this.$element.find( 
'legend' ).text() ) {
+               // Get rid of the legend
+               this.$element.find( 'legend' ).detach();
+
+               // Check if the element is essentially empty, and detach it if 
it is
+               if ( !this.$element.text().trim().length ) {
                        this.$element.detach();
                }
        };

-- 
To view, visit https://gerrit.wikimedia.org/r/373716
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2249bf3d313232fe2f0dff6e34c5140885a13735
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to