Merge "RCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 24 Feb 2017 00:54:55 +0000 (00:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 24 Feb 2017 00:54:55 +0000 (00:54 +0000)
includes/Linker.php
includes/changes/ChangesList.php
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
resources/src/mediawiki/mediawiki.js

index 94b145e..05e3abb 100644 (file)
@@ -933,13 +933,14 @@ class Linker {
                if ( $userId ) {
                        // check if the user has an edit
                        $attribs = [];
+                       $attribs['class'] = 'mw-usertoollinks-contribs';
                        if ( $redContribsWhenNoEdits ) {
                                if ( intval( $edits ) === 0 && $edits !== 0 ) {
                                        $user = User::newFromId( $userId );
                                        $edits = $user->getEditCount();
                                }
                                if ( $edits === 0 ) {
-                                       $attribs['class'] = 'new';
+                                       $attribs['class'] .= ' new';
                                }
                        }
                        $contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText );
@@ -986,7 +987,10 @@ class Linker {
         */
        public static function userTalkLink( $userId, $userText ) {
                $userTalkPage = Title::makeTitle( NS_USER_TALK, $userText );
-               $userTalkLink = self::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() );
+               $moreLinkAttribs['class'] = 'mw-usertoollinks-talk';
+               $userTalkLink = self::link( $userTalkPage,
+                                               wfMessage( 'talkpagelinktext' )->escaped(),
+                                               $moreLinkAttribs );
                return $userTalkLink;
        }
 
@@ -998,7 +1002,10 @@ class Linker {
         */
        public static function blockLink( $userId, $userText ) {
                $blockPage = SpecialPage::getTitleFor( 'Block', $userText );
-               $blockLink = self::link( $blockPage, wfMessage( 'blocklink' )->escaped() );
+               $moreLinkAttribs['class'] = 'mw-usertoollinks-block';
+               $blockLink = self::link( $blockPage,
+                                        wfMessage( 'blocklink' )->escaped(),
+                                        $moreLinkAttribs );
                return $blockLink;
        }
 
@@ -1009,7 +1016,10 @@ class Linker {
         */
        public static function emailLink( $userId, $userText ) {
                $emailPage = SpecialPage::getTitleFor( 'Emailuser', $userText );
-               $emailLink = self::link( $emailPage, wfMessage( 'emaillink' )->escaped() );
+               $moreLinkAttribs['class'] = 'mw-usertoollinks-mail';
+               $emailLink = self::link( $emailPage,
+                                        wfMessage( 'emaillink' )->escaped(),
+                                        $moreLinkAttribs );
                return $emailLink;
        }
 
index 9a1f775..bc7d721 100644 (file)
@@ -403,7 +403,7 @@ class ChangesList extends ContextSource {
                        $diffLink = $this->linkRenderer->makeKnownLink(
                                $rc->getTitle(),
                                new HtmlArmor( $this->message['diff'] ),
-                               [],
+                               [ 'class' => 'mw-changeslist-diff' ],
                                $query
                        );
                }
@@ -415,7 +415,7 @@ class ChangesList extends ContextSource {
                        $diffhist .= $this->linkRenderer->makeKnownLink(
                                $rc->getTitle(),
                                new HtmlArmor( $this->message['hist'] ),
-                               [],
+                               [ 'class' => 'mw-changeslist-history' ],
                                [
                                        'curid' => $rc->mAttribs['rc_cur_id'],
                                        'action' => 'history'
index 0bf6f58..65278f9 100644 (file)
@@ -1,13 +1,9 @@
 @import "mw.rcfilters.mixins";
 
 .mw-rcfilters-ui-capsuleItemWidget {
-       &-popup {
-               padding: 1em;
-       }
-
-       .oo-ui-popupWidget {
-               // Fix the positioning of the popup itself
-               margin-top: 1em;
+       &-popup-content {
+               padding: 0.5em;
+               color: #54595d;
        }
 
        .oo-ui-labelElement-label {
index 293f3c3..94da3ac 100644 (file)
@@ -8,26 +8,31 @@
                padding-top: 0.5em;
        }
 
-       &-filterCheckbox {
-               &-label {
-                       &-title {
-                               font-weight: bold;
-                               font-size: 1.2em;
-                               color: #222;
-                       }
-                       &-desc {
-                               color: #464a4f;
-                       }
+       &-muted {
+               background-color: #f8f9fa; // Base90 AAA
+               .mw-rcfilters-ui-filterItemWidget-label-title,
+               .mw-rcfilters-ui-filterItemWidget-label-desc {
+                       color: #54595d; // Base20 AAA
+               }
+       }
+
+       &-label {
+               &-title {
+                       font-weight: bold;
+                       font-size: 1.2em;
+                       color: #222;
                }
+               &-desc {
+                       color: #464a4f;
+               }
+       }
 
+       &-filterCheckbox {
                .oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
                        // Override margin-top and -bottom rules from FieldLayout
                        margin: 0 !important;
                }
 
-               &-muted {
-                       opacity: 0.5;
-               }
        }
 
        &-highlightButton {
index 8c5bd82..cf03932 100644 (file)
@@ -14,7 +14,7 @@
         */
        mw.rcfilters.ui.CapsuleItemWidget = function MwRcfiltersUiCapsuleItemWidget( controller, model, config ) {
                var $popupContent = $( '<div>' )
-                       .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup' ),
+                               .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup-content' ),
                        descLabelWidget = new OO.ui.LabelWidget();
 
                // Configuration initialization
                // Mixin constructors
                OO.ui.mixin.PopupElement.call( this, $.extend( {
                        popup: {
-                               padded: true,
+                               padded: false,
                                align: 'center',
                                $content: $popupContent
                                        .append( descLabelWidget.$element ),
-                               $floatableContainer: this.$element
+                               $floatableContainer: this.$element,
+                               classes: [ 'mw-rcfilters-ui-capsuleItemWidget-popup' ]
                        }
                }, config ) );
 
index a2a6b16..84248e1 100644 (file)
                        this.applyHighlight();
 
                        // Make sure enhanced RC re-initializes correctly
-                       mw.hook( 'wikipage.content' ).fire( this.$changesListContent );
+                       mw.hook( 'wikipage.content' ).fire( this.$element );
                }
                this.popPending();
        };
index 94ad217..7872818 100644 (file)
                                        // Whether the store is in use on this page.
                                        enabled: null,
 
+                                       // Modules whose string representation exceeds 100 kB are
+                                       // ineligible for storage. See bug T66721.
                                        MODULE_SIZE_MAX: 100 * 1000,
 
                                        // The contents of the store, mapping '[name]@[version]' keys