RCFilters UI: Only show full coverage message if item isn't highlighted
authorMoriel Schottlender <moriel@gmail.com>
Fri, 24 Mar 2017 17:17:37 +0000 (10:17 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Fri, 24 Mar 2017 17:21:05 +0000 (10:21 -0700)
Bug: T161273
Change-Id: If62bbab3e12fc3d9e83f9452723a9b2d6b75854a

resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js

index a066d9e..221d2a5 100644 (file)
 
                                messageKey = details.message;
                                affectingItems = details.names;
-                       } else if ( this.isIncluded() ) {
+                       } else if ( this.isIncluded() && !this.isHighlighted() ) {
+                               // We only show the 'no effect' full-coverage message
+                               // if the item is also not highlighted. See T161273
                                superset = this.getSuperset();
                                // For this message we need to collect the affecting superset
                                affectingItems = this.getGroupModel().getSelectedItems( this )
                                        } );
 
                                messageKey = 'rcfilters-state-message-subset';
-                       } else if ( this.isFullyCovered() ) {
+                       } else if ( this.isFullyCovered() && !this.isHighlighted() ) {
                                affectingItems = this.getGroupModel().getSelectedItems( this )
                                        .map( function ( item ) {
                                                return mw.msg( 'quotation-marks', item.getLabel() );