jenkins-bot has submitted this change and it was merged.

Change subject: Update OOjs UI to v0.17.2
......................................................................


Update OOjs UI to v0.17.2

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.17.2

Change-Id: I8e8101e3284c69f8fa6edf142f4cf84efff65e09
---
M composer.json
M composer.lock
M composer/LICENSE
M composer/autoload_real.php
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/demos/demos.php
M oojs/oojs-ui/package.json
M oojs/oojs-ui/php/widgets/ButtonWidget.php
9 files changed, 162 insertions(+), 94 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index ea137bf..7701503 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
                "mediawiki/at-ease": "1.1.0",
                "monolog/monolog": "1.18.2",
                "nmred/kafka-php": "0.1.5",
-               "oojs/oojs-ui": "0.17.1",
+               "oojs/oojs-ui": "0.17.2",
                "oyejorge/less.php": "1.7.0.10",
                "pear/console_getopt": "1.4.1",
                "pear/mail": "1.3.0",
diff --git a/composer.lock b/composer.lock
index 1b2b07d..8a4267a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
         "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "b409fa5095e26ed34530b951698cc515",
-    "content-hash": "5e0b25793682fc5b32f000bdaac041f8",
+    "hash": "dc852b7f2bb5efd73adc116edd209c4a",
+    "content-hash": "6afed3a26c04be671b9e9cd7ab0b00db",
     "packages": [
         {
             "name": "composer/semver",
@@ -430,16 +430,16 @@
         },
         {
             "name": "oojs/oojs-ui",
-            "version": "v0.17.1",
+            "version": "v0.17.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/wikimedia/oojs-ui.git";,
-                "reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3"
+                "reference": "236cd4cf1b3df288ee524b1c90716832ebb9af07"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3";,
-                "reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3",
+                "url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/236cd4cf1b3df288ee524b1c90716832ebb9af07";,
+                "reference": "236cd4cf1b3df288ee524b1c90716832ebb9af07",
                 "shasum": ""
             },
             "require": {
@@ -505,7 +505,7 @@
             ],
             "description": "Provides library of common widgets, layouts, and 
windows.",
             "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";,
-            "time": "2016-05-03 22:34:48"
+            "time": "2016-05-10 22:32:23"
         },
         {
             "name": "oyejorge/less.php",
diff --git a/composer/LICENSE b/composer/LICENSE
index b0794ff..1a28124 100644
--- a/composer/LICENSE
+++ b/composer/LICENSE
@@ -1,3 +1,4 @@
+
 Copyright (c) 2016 Nils Adermann, Jordi Boggiano
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -17,3 +18,4 @@
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
+
diff --git a/composer/autoload_real.php b/composer/autoload_real.php
index a8565e8..6a50b69 100644
--- a/composer/autoload_real.php
+++ b/composer/autoload_real.php
@@ -27,15 +27,26 @@
         array_push($includePaths, get_include_path());
         set_include_path(join(PATH_SEPARATOR, $includePaths));
 
-        $classMap = require __DIR__ . '/autoload_classmap.php';
-        if ($classMap) {
-            $loader->addClassMap($classMap);
+        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
+        if ($useStaticLoader) {
+            require_once __DIR__ . '/autoload_static.php';
+
+            
call_user_func(\Composer\Autoload\ComposerStaticInit_mediawiki_vendor::getInitializer($loader));
+        } else {
+            $classMap = require __DIR__ . '/autoload_classmap.php';
+            if ($classMap) {
+                $loader->addClassMap($classMap);
+            }
         }
 
         $loader->setClassMapAuthoritative(true);
         $loader->register(false);
 
-        $includeFiles = require __DIR__ . '/autoload_files.php';
+        if ($useStaticLoader) {
+            $includeFiles = 
Composer\Autoload\ComposerStaticInit_mediawiki_vendor::$files;
+        } else {
+            $includeFiles = require __DIR__ . '/autoload_files.php';
+        }
         foreach ($includeFiles as $fileIdentifier => $file) {
             composerRequire_mediawiki_vendor($fileIdentifier, $file);
         }
diff --git a/composer/installed.json b/composer/installed.json
index 496237a..1afbdd4 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1701,87 +1701,6 @@
         ]
     },
     {
-        "name": "oojs/oojs-ui",
-        "version": "v0.17.1",
-        "version_normalized": "0.17.1.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/wikimedia/oojs-ui.git";,
-            "reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3"
-        },
-        "dist": {
-            "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3";,
-            "reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3",
-            "shasum": ""
-        },
-        "require": {
-            "mediawiki/at-ease": "1.1.0",
-            "php": ">=5.5.9"
-        },
-        "require-dev": {
-            "jakub-onderka/php-parallel-lint": "0.9.2",
-            "mediawiki/mediawiki-codesniffer": "0.6.0",
-            "phpunit/phpunit": "4.8.21"
-        },
-        "time": "2016-05-03 22:34:48",
-        "type": "library",
-        "installation-source": "dist",
-        "autoload": {
-            "classmap": [
-                "php/"
-            ]
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "license": [
-            "MIT"
-        ],
-        "authors": [
-            {
-                "name": "Timo Tijhof",
-                "email": "krinklem...@gmail.com"
-            },
-            {
-                "name": "Bartosz Dziewoński",
-                "email": "matma....@gmail.com"
-            },
-            {
-                "name": "Ed Sanders",
-                "email": "esand...@wikimedia.org"
-            },
-            {
-                "name": "James D. Forrester",
-                "email": "jforres...@wikimedia.org"
-            },
-            {
-                "name": "Kirsten Menger-Anderson",
-                "email": "kmen...@wikimedia.org"
-            },
-            {
-                "name": "Rob Moen",
-                "email": "rm...@wikimedia.org"
-            },
-            {
-                "name": "Roan Kattouw",
-                "email": "r...@wikimedia.org"
-            },
-            {
-                "name": "Trevor Parscal",
-                "email": "tre...@wikimedia.org"
-            },
-            {
-                "name": "Kunal Mehta",
-                "email": "lego...@gmail.com"
-            },
-            {
-                "name": "Prateek Saxena",
-                "email": "prtks...@gmail.com"
-            }
-        ],
-        "description": "Provides library of common widgets, layouts, and 
windows.",
-        "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";
-    },
-    {
         "name": "wikimedia/ip-set",
         "version": "1.1.0",
         "version_normalized": "1.1.0.0",
@@ -1880,5 +1799,86 @@
         ],
         "description": "Constant Database (CDB) wrapper library for PHP. 
Provides pure-PHP fallback when dba_* functions are absent.",
         "homepage": "https://www.mediawiki.org/wiki/CDB";
+    },
+    {
+        "name": "oojs/oojs-ui",
+        "version": "v0.17.2",
+        "version_normalized": "0.17.2.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/wikimedia/oojs-ui.git";,
+            "reference": "236cd4cf1b3df288ee524b1c90716832ebb9af07"
+        },
+        "dist": {
+            "type": "zip",
+            "url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/236cd4cf1b3df288ee524b1c90716832ebb9af07";,
+            "reference": "236cd4cf1b3df288ee524b1c90716832ebb9af07",
+            "shasum": ""
+        },
+        "require": {
+            "mediawiki/at-ease": "1.1.0",
+            "php": ">=5.5.9"
+        },
+        "require-dev": {
+            "jakub-onderka/php-parallel-lint": "0.9.2",
+            "mediawiki/mediawiki-codesniffer": "0.6.0",
+            "phpunit/phpunit": "4.8.21"
+        },
+        "time": "2016-05-10 22:32:23",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "classmap": [
+                "php/"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/";,
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Timo Tijhof",
+                "email": "krinklem...@gmail.com"
+            },
+            {
+                "name": "Bartosz Dziewoński",
+                "email": "matma....@gmail.com"
+            },
+            {
+                "name": "Ed Sanders",
+                "email": "esand...@wikimedia.org"
+            },
+            {
+                "name": "James D. Forrester",
+                "email": "jforres...@wikimedia.org"
+            },
+            {
+                "name": "Kirsten Menger-Anderson",
+                "email": "kmen...@wikimedia.org"
+            },
+            {
+                "name": "Rob Moen",
+                "email": "rm...@wikimedia.org"
+            },
+            {
+                "name": "Roan Kattouw",
+                "email": "r...@wikimedia.org"
+            },
+            {
+                "name": "Trevor Parscal",
+                "email": "tre...@wikimedia.org"
+            },
+            {
+                "name": "Kunal Mehta",
+                "email": "lego...@gmail.com"
+            },
+            {
+                "name": "Prateek Saxena",
+                "email": "prtks...@gmail.com"
+            }
+        ],
+        "description": "Provides library of common widgets, layouts, and 
windows.",
+        "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";
     }
 ]
diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md
index 172f07a..3617b36 100644
--- a/oojs/oojs-ui/History.md
+++ b/oojs/oojs-ui/History.md
@@ -1,5 +1,18 @@
 # OOjs UI Release History
 
+## v0.17.2 / 2016-05-10
+### Features
+* ButtonWidget: Implement, document and demonstrate the 'active' config option 
(Bartosz Dziewoński)
+
+### Styles
+* ToggleSwitchWidget: Align focus state with other widgets (Volker E)
+* MediaWiki theme: Remove `border-radius` from disabled numberInputWidget 
buttons (Volker E)
+
+### Code
+* TextInputWidget: Remove proprietary `<input results>` attribute styles 
(Volker E)
+* MediaWiki theme: Align `input` & `textarea` coding style to Less way (Volker 
E)
+
+
 ## v0.17.1 / 2016-05-03
 ### Styles
 * CapsuleMultiSelectWidget: Fix cross-browser inconsistencies and improve UX 
(Volker E)
@@ -11,6 +24,7 @@
 ### Code
 * DraggableGroupElement: Simplify and improve drag logic (Ed Sanders)
 
+
 ## v0.17.0 / 2016-04-26
 ### Breaking changes
 * [BREAKING CHANGE] PHP: Use traits instead of custom mixin system (Kunal 
Mehta)
diff --git a/oojs/oojs-ui/demos/demos.php b/oojs/oojs-ui/demos/demos.php
index d09aae8..8d8b8dd 100644
--- a/oojs/oojs-ui/demos/demos.php
+++ b/oojs/oojs-ui/demos/demos.php
@@ -56,10 +56,12 @@
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'MediaWiki',
                                                        'href' => '?' . 
http_build_query( array_merge( $query, array( 'theme' => 'mediawiki' ) ) ),
+                                                       'active' => 
$query['theme'] === 'mediawiki',
                                                ) ),
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'Apex',
                                                        'href' => '?' . 
http_build_query( array_merge( $query, array( 'theme' => 'apex' ) ) ),
+                                                       'active' => 
$query['theme'] === 'apex',
                                                ) ),
                                        )
                                ) );
@@ -69,10 +71,12 @@
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'LTR',
                                                        'href' => '?' . 
http_build_query( array_merge( $query, array( 'direction' => 'ltr' ) ) ),
+                                                       'active' => 
$query['direction'] === 'ltr',
                                                ) ),
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'RTL',
                                                        'href' => '?' . 
http_build_query( array_merge( $query, array( 'direction' => 'rtl' ) ) ),
+                                                       'active' => 
$query['direction'] === 'rtl',
                                                ) ),
                                        )
                                ) );
@@ -83,10 +87,12 @@
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'JS',
                                                        'href' => 
".#$page-$theme-$direction",
+                                                       'active' => false,
                                                ) ),
                                                new OOUI\ButtonWidget( array(
                                                        'label' => 'PHP',
                                                        'href' => '?' . 
http_build_query( $query ),
+                                                       'active' => true,
                                                ) ),
                                        )
                                ) );
diff --git a/oojs/oojs-ui/package.json b/oojs/oojs-ui/package.json
index cfea830..ba3f220 100644
--- a/oojs/oojs-ui/package.json
+++ b/oojs/oojs-ui/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.17.1",
+  "version": "0.17.2",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
     "oojs-plugin",
diff --git a/oojs/oojs-ui/php/widgets/ButtonWidget.php 
b/oojs/oojs-ui/php/widgets/ButtonWidget.php
index 18fe6df..1ae97aa 100644
--- a/oojs/oojs-ui/php/widgets/ButtonWidget.php
+++ b/oojs/oojs-ui/php/widgets/ButtonWidget.php
@@ -16,6 +16,13 @@
        use AccessKeyedElement;
 
        /**
+        * Whether button is active.
+        *
+        * @var boolean
+        */
+       protected $active = false;
+
+       /**
         * Hyperlink to visit when clicked.
         *
         * @var string
@@ -40,6 +47,7 @@
 
        /**
         * @param array $config Configuration options
+        * @param string $config['active'] Whether button should be shown as 
active (default: false)
         * @param string $config['href'] Hyperlink to visit when clicked
         * @param string $config['target'] Target to open hyperlink in
         * @param boolean $config['noFollow'] Search engine traversal hint 
(default: true)
@@ -67,6 +75,7 @@
                        ->addClasses( [ 'oo-ui-buttonWidget' ] )
                        ->appendContent( $this->button );
 
+               $this->setActive( isset( $config['active'] ) ? 
$config['active'] : false );
                $this->setHref( isset( $config['href'] ) ? $config['href'] : 
null );
                $this->setTarget( isset( $config['target'] ) ? 
$config['target'] : null );
                $this->setNoFollow( isset( $config['noFollow'] ) ? 
$config['noFollow'] : true );
@@ -164,7 +173,33 @@
                return $this;
        }
 
+       /**
+        * Toggle active state.
+        *
+        * A button should be marked as active when clicking it would only 
refresh the page.
+        *
+        * @param boolean $active Make button active
+        * @return $this
+        */
+       public function setActive( $active = null ) {
+               $this->active = !!$active;
+               $this->toggleClasses( [ 'oo-ui-buttonElement-active' ], 
$this->active );
+               return $this;
+       }
+
+       /**
+        * Check if button is active.
+        *
+        * @return boolean Button is active
+        */
+       public function isActive() {
+               return $this->active;
+       }
+
        public function getConfig( &$config ) {
+               if ( $this->active !== false ) {
+                       $config['active'] = $this->active;
+               }
                if ( $this->href !== null ) {
                        $config['href'] = $this->href;
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e8101e3284c69f8fa6edf142f4cf84efff65e09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to