Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364614 )
Change subject: Update OOjs UI to v0.22.3 ...................................................................... Update OOjs UI to v0.22.3 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.22.3 Change-Id: If676bfab1d2040a9d360c741a5ab4e1c81b36b87 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/bin/testsuitegenerator.rb M oojs/oojs-ui/demos/demos.php M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/package.json M oojs/oojs-ui/php/Element.php M oojs/oojs-ui/php/HtmlSnippet.php M oojs/oojs-ui/php/Tag.php M oojs/oojs-ui/php/Theme.php M oojs/oojs-ui/php/layouts/FieldLayout.php M oojs/oojs-ui/php/mixins/AccessKeyedElement.php M oojs/oojs-ui/php/mixins/ButtonElement.php M oojs/oojs-ui/php/mixins/FlaggedElement.php M oojs/oojs-ui/php/mixins/GroupElement.php M oojs/oojs-ui/php/mixins/IconElement.php M oojs/oojs-ui/php/mixins/IndicatorElement.php M oojs/oojs-ui/php/mixins/LabelElement.php M oojs/oojs-ui/php/mixins/TabIndexedElement.php M oojs/oojs-ui/php/mixins/TitledElement.php M oojs/oojs-ui/php/widgets/HiddenInputWidget.php M oojs/oojs-ui/php/widgets/InputWidget.php M oojs/oojs-ui/php/widgets/ProgressBarWidget.php 25 files changed, 182 insertions(+), 124 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/14/364614/1 diff --git a/composer.json b/composer.json index 46cf220..ca0c907 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "monolog/monolog": "1.22.1", "mustangostang/spyc": "0.6.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.22.2", + "oojs/oojs-ui": "0.22.3", "oyejorge/less.php": "1.7.0.14", "pear/console_getopt": "1.4.1", "pear/mail": "1.3.0", diff --git a/composer.lock b/composer.lock index fe25852..ac09db5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "5c4ef9054eed327bfd6cee4e658c4fea", + "content-hash": "6ca887a2dbd1d8050bbc5727c0ac9619", "packages": [ { "name": "composer/semver", @@ -516,16 +516,16 @@ }, { "name": "oojs/oojs-ui", - "version": "v0.22.2", + "version": "v0.22.3", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "ca5f31425138961c4a779d8e0d7674f16dbc7d24" + "reference": "796f52473294e923d0133bb1b0b3629d9b1332bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca5f31425138961c4a779d8e0d7674f16dbc7d24", - "reference": "ca5f31425138961c4a779d8e0d7674f16dbc7d24", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/796f52473294e923d0133bb1b0b3629d9b1332bc", + "reference": "796f52473294e923d0133bb1b0b3629d9b1332bc", "shasum": "" }, "require": { @@ -534,7 +534,7 @@ }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "mediawiki/mediawiki-codesniffer": "0.6.0", + "mediawiki/mediawiki-codesniffer": "0.10.0", "phpunit/phpunit": "4.8.21" }, "type": "library", @@ -591,7 +591,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI", - "time": "2017-06-28T19:15:29+00:00" + "time": "2017-07-11T21:50:03+00:00" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 1f23170..df92c7d 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -2205,87 +2205,6 @@ "homepage": "https://www.mediawiki.org/wiki/Css-sanitizer" }, { - "name": "oojs/oojs-ui", - "version": "v0.22.2", - "version_normalized": "0.22.2.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "ca5f31425138961c4a779d8e0d7674f16dbc7d24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca5f31425138961c4a779d8e0d7674f16dbc7d24", - "reference": "ca5f31425138961c4a779d8e0d7674f16dbc7d24", - "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": "2017-06-28T19:15:29+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "php/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Timo Tijhof", - "email": "[email protected]" - }, - { - "name": "Bartosz Dziewoński", - "email": "[email protected]" - }, - { - "name": "Ed Sanders", - "email": "[email protected]" - }, - { - "name": "James D. Forrester", - "email": "[email protected]" - }, - { - "name": "Kirsten Menger-Anderson", - "email": "[email protected]" - }, - { - "name": "Rob Moen", - "email": "[email protected]" - }, - { - "name": "Roan Kattouw", - "email": "[email protected]" - }, - { - "name": "Trevor Parscal", - "email": "[email protected]" - }, - { - "name": "Kunal Mehta", - "email": "[email protected]" - }, - { - "name": "Prateek Saxena", - "email": "[email protected]" - } - ], - "description": "Provides library of common widgets, layouts, and windows.", - "homepage": "https://www.mediawiki.org/wiki/OOjs_UI" - }, - { "name": "wikimedia/purtle", "version": "v1.0.6", "version_normalized": "1.0.6.0", @@ -2404,5 +2323,86 @@ "client", "search" ] + }, + { + "name": "oojs/oojs-ui", + "version": "v0.22.3", + "version_normalized": "0.22.3.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/oojs-ui.git", + "reference": "796f52473294e923d0133bb1b0b3629d9b1332bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/796f52473294e923d0133bb1b0b3629d9b1332bc", + "reference": "796f52473294e923d0133bb1b0b3629d9b1332bc", + "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.10.0", + "phpunit/phpunit": "4.8.21" + }, + "time": "2017-07-11T21:50:03+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "php/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Timo Tijhof", + "email": "[email protected]" + }, + { + "name": "Bartosz Dziewoński", + "email": "[email protected]" + }, + { + "name": "Ed Sanders", + "email": "[email protected]" + }, + { + "name": "James D. Forrester", + "email": "[email protected]" + }, + { + "name": "Kirsten Menger-Anderson", + "email": "[email protected]" + }, + { + "name": "Rob Moen", + "email": "[email protected]" + }, + { + "name": "Roan Kattouw", + "email": "[email protected]" + }, + { + "name": "Trevor Parscal", + "email": "[email protected]" + }, + { + "name": "Kunal Mehta", + "email": "[email protected]" + }, + { + "name": "Prateek Saxena", + "email": "[email protected]" + } + ], + "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 b5bf1a2..8be0c72 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,4 +1,37 @@ # OOjs UI Release History +## v0.22.3 / 2017-07-11 +### Features +* Tag-/CapsuleMultiselectWidget: Avoid visual focusTrap feedback (Volker E.) +* WindowManager: Avoid inconsistent state due to asynchronous promise resolution (Bartosz Dziewoński) +* WindowManager: fix closing promise state check (David Lynch) + +### Styles +* icons: Align ongoingConversation to grid (Ed Sanders) +* icons: Replace the puzzle icon, using the one from VisualEditor (James D. Forrester) +* icons: Vertically center mapPin icon (Volker E.) +* Apex theme: Add 'article' icon, copied from WikimediaUI (Moriel Schottlender) + +### Code +* DropdownWidget, MenuSelectWidget: Set `aria-expanded` attribute (Prateek Saxena) +* FieldLayout: Add `role='alert'` for error messages (Prateek Saxena) +* FieldLayout: Set `aria-describedby` on the fieldWidget (Prateek Saxena) +* PopupWidget: Update function name in a comment (Bartosz Dziewoński) +* TagMultiselectWidget: Skip `updateInputSize()` for invisible inputs (Roan Kattouw) +* Toolbar: Add comment for greppability of dynamic CSS classes (Bartosz Dziewoński) +* themes: Align read-only variable names to pseudo-class selector scheme (Volker E.) +* themes: Align variable names to WikimediaUI Base scheme (Volker E.) +* WikimediaUI theme: Align `@opacity-icon*` variable names to WikimediaUI Base (Volker E.) +* WikimediaUI theme: Align checked variable names to pseudo-class scheme (Volker E.) +* WikimediaUI theme: Align disabled variable names to pseudo-class scheme (Volker E.) +* WikimediaUI theme: Align variable pseudo classes names to WikimediaUI Base (Volker E.) +* WikimediaUI theme: Replace `@color-base-light` with `@color-base--inverted` (Volker E.) +* WikimediaUI theme: Variablize PopupWidget values (Volker E.) +* WikimediaUI theme: Pull in the upstream WikimediaUI package (James D. Forrester) +* build: Updating mediawiki/mediawiki-codesniffer to 0.10.0 (Kunal Mehta) +* phpcs: Enable more rules, or document why they are disabled (Bartosz Dziewoński) +* testsuitegenerator: Blacklist deprecated `multiline` config option (Bartosz Dziewoński) + + ## v0.22.2 / 2017-06-28 ### Deprecations * [DEPRECATING CHANGE] TextInputWidget: Move multi-line support out (Prateek Saxena) diff --git a/oojs/oojs-ui/bin/testsuitegenerator.rb b/oojs/oojs-ui/bin/testsuitegenerator.rb index f91e066..25917fc 100644 --- a/oojs/oojs-ui/bin/testsuitegenerator.rb +++ b/oojs/oojs-ui/bin/testsuitegenerator.rb @@ -69,6 +69,8 @@ [ { 'data' => 'a' }, { 'data' => 'b' } ], [ { 'data' => 'a', 'label' => 'A' }, { 'data' => 'b', 'label' => 'B' } ], ], + # deprecated, makes test logs spammy + 'multiline' => [], # usually makes no sense in JS 'autofocus' => [], # too simple to test? diff --git a/oojs/oojs-ui/demos/demos.php b/oojs/oojs-ui/demos/demos.php index 91dd2e1..a401081 100644 --- a/oojs/oojs-ui/demos/demos.php +++ b/oojs/oojs-ui/demos/demos.php @@ -9,10 +9,12 @@ require_once $autoload; require_once 'classes/ButtonStyleShowcaseWidget.php'; + // @codingStandardsIgnoreStart MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment $themes = [ 'wikimediaui' => 'WikimediaUI', // Do not change this line or you'll break `grunt add-theme` 'apex' => 'Apex', ]; + // @codingStandardsIgnoreEnd MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment $theme = ( isset( $_GET['theme'] ) && isset( $themes[ $_GET['theme'] ] ) ) ? $_GET['theme'] : 'wikimediaui'; $themeClass = 'OOUI\\' . $themes[ $theme ] . 'Theme'; diff --git a/oojs/oojs-ui/demos/pages/widgets.js b/oojs/oojs-ui/demos/pages/widgets.js index d4ccc95..e9cee0b 100644 --- a/oojs/oojs-ui/demos/pages/widgets.js +++ b/oojs/oojs-ui/demos/pages/widgets.js @@ -3,6 +3,7 @@ loremIpsum = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' + 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\u200E', textInputForLabel, labelForTextInput, radioSelectInputForLabel, labelForRadioSelectInput, + inputForValidation, fieldLayoutForValidation, horizontalDragItems = [], verticalDragItems = [], verticalHandledDragItems = [], @@ -56,6 +57,28 @@ labelForRadioSelectInput = new OO.ui.LabelWidget( { label: 'Label for RadioSelectInputWidget below', input: radioSelectInputForLabel + } ); + + inputForValidation = new OO.ui.TextInputWidget( { + validate: function ( value ) { + return value.length % 2 === 0; + } + } ); + + fieldLayoutForValidation = new OO.ui.FieldLayout( inputForValidation, { + align: 'top', + label: 'FieldLayout aligned top with validation errors', + help: 'Enter only even number of characters' + } ); + + inputForValidation.$input.on( 'blur', function () { + inputForValidation.getValidity().then( function () { + fieldLayoutForValidation.setErrors( [] ); + }, function () { + fieldLayoutForValidation.setErrors( [ + 'Please enter an even number of characters' + ] ); + } ); } ); fieldsets = [ @@ -2515,7 +2538,8 @@ errors: [ 'The value must be a number.' ], align: 'top' } - ) + ), + fieldLayoutForValidation ] } ), new OO.ui.FieldsetLayout( { diff --git a/oojs/oojs-ui/package.json b/oojs/oojs-ui/package.json index fb48d4d..139a202 100644 --- a/oojs/oojs-ui/package.json +++ b/oojs/oojs-ui/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.22.2", + "version": "0.22.3", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", @@ -24,7 +24,8 @@ }, "dependencies": { "jquery": "3.2.1", - "oojs": "2.1.0" + "oojs": "2.1.0", + "wikimedia-ui-base": "0.9.2" }, "devDependencies": { "eslint-config-wikimedia": "0.4.0", diff --git a/oojs/oojs-ui/php/Element.php b/oojs/oojs-ui/php/Element.php index 8bab42d..bd90d15 100644 --- a/oojs/oojs-ui/php/Element.php +++ b/oojs/oojs-ui/php/Element.php @@ -142,7 +142,9 @@ } /** - * @param callable $func + * Register an additional function to call when building the config. See ::getConfig(). + * + * @param callable $func The function. Parameters and return value are the same as ::getConfig(). */ public function registerConfigCallback( callable $func ) { $this->configCallbacks[] = $func; @@ -151,12 +153,10 @@ /** * Add the necessary properties to the given `$config` array to allow * reconstruction of this widget via its constructor. - * @param array &$config - * An array which will be mutated to add the necessary configuration + * @param array &$config An array which will be mutated to add the necessary configuration * properties. Unless you are implementing a subclass, you should * always pass a new empty array `[]`. - * @return array - * A configuration array which can be passed to this object's + * @return array A configuration array which can be passed to this object's * constructor to recreate it. This is a return value to allow * the safe use of copy-by-value functions like `array_merge` in * the implementation. @@ -181,8 +181,7 @@ * JSON serialization by replacing `Tag` references and * `HtmlSnippet`s. * - * @return array - * A serialized configuration array. + * @return array A serialized configuration array. */ private function getSerializedConfig() { // Ensure that '_' comes first in the output. @@ -190,12 +189,12 @@ $config = $this->getConfig( $config ); // Post-process config array to turn Tag references into ID references // and HtmlSnippet references into a { html: 'string' } JSON form. - $replaceElements = function( &$item ) { + $replaceElements = function ( &$item ) { if ( $item instanceof Tag ) { $item->ensureInfusableId(); $item = [ 'tag' => $item->getAttribute( 'id' ) ]; } elseif ( $item instanceof HtmlSnippet ) { - $item = [ 'html' => (string) $item ]; + $item = [ 'html' => (string)$item ]; } }; array_walk_recursive( $config, $replaceElements ); @@ -250,7 +249,7 @@ /** * Set the default direction of the user interface. * - * @return string Text direction, either 'ltr' or 'rtl' + * @param string $dir Text direction, either 'ltr' or 'rtl' */ public static function setDefaultDir( $dir ) { self::$defaultDir = $dir === 'rtl' ? 'rtl' : 'ltr'; diff --git a/oojs/oojs-ui/php/HtmlSnippet.php b/oojs/oojs-ui/php/HtmlSnippet.php index adde828..6ffe908 100644 --- a/oojs/oojs-ui/php/HtmlSnippet.php +++ b/oojs/oojs-ui/php/HtmlSnippet.php @@ -19,7 +19,7 @@ /* Methods */ /** - * @param string $content + * @param string $content HTML snippet */ public function __construct( $content ) { $this->content = $content; diff --git a/oojs/oojs-ui/php/Tag.php b/oojs/oojs-ui/php/Tag.php index 1fe04d9..5579f3d 100644 --- a/oojs/oojs-ui/php/Tag.php +++ b/oojs/oojs-ui/php/Tag.php @@ -62,7 +62,7 @@ /** * Check for CSS class. * - * @param string $name CSS class name + * @param string $class CSS class name * @return boolean */ public function hasClass( $class ) { diff --git a/oojs/oojs-ui/php/Theme.php b/oojs/oojs-ui/php/Theme.php index 1d5b219..8e8c823 100644 --- a/oojs/oojs-ui/php/Theme.php +++ b/oojs/oojs-ui/php/Theme.php @@ -16,7 +16,7 @@ /* Static Methods */ /** - * @param Theme|null $theme + * @param Theme|null $theme Theme to use throughout the application */ public static function setSingleton( Theme $theme = null ) { self::$singleton = $theme; diff --git a/oojs/oojs-ui/php/layouts/FieldLayout.php b/oojs/oojs-ui/php/layouts/FieldLayout.php index 78aab90..8039762 100644 --- a/oojs/oojs-ui/php/layouts/FieldLayout.php +++ b/oojs/oojs-ui/php/layouts/FieldLayout.php @@ -146,6 +146,7 @@ $listItem = new Tag( 'li' ); if ( $kind === 'error' ) { $icon = new IconWidget( [ 'icon' => 'alert', 'flags' => [ 'warning' ] ] ); + $listItem->setAttributes( [ 'role' => 'alert' ] ); } elseif ( $kind === 'notice' ) { $icon = new IconWidget( [ 'icon' => 'info' ] ); } else { diff --git a/oojs/oojs-ui/php/mixins/AccessKeyedElement.php b/oojs/oojs-ui/php/mixins/AccessKeyedElement.php index 7ed6964..b395bca 100644 --- a/oojs/oojs-ui/php/mixins/AccessKeyedElement.php +++ b/oojs/oojs-ui/php/mixins/AccessKeyedElement.php @@ -37,7 +37,7 @@ $this->setAccessKey( isset( $config['accessKey'] ) ? $config['accessKey'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->accessKey !== null ) { $config['accessKey'] = $this->accessKey; } diff --git a/oojs/oojs-ui/php/mixins/ButtonElement.php b/oojs/oojs-ui/php/mixins/ButtonElement.php index d89810d..3ecf8e6 100644 --- a/oojs/oojs-ui/php/mixins/ButtonElement.php +++ b/oojs/oojs-ui/php/mixins/ButtonElement.php @@ -48,7 +48,7 @@ ] ); } - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->framed !== true ) { $config['framed'] = $this->framed; } diff --git a/oojs/oojs-ui/php/mixins/FlaggedElement.php b/oojs/oojs-ui/php/mixins/FlaggedElement.php index 2c83754..bf84e7f 100644 --- a/oojs/oojs-ui/php/mixins/FlaggedElement.php +++ b/oojs/oojs-ui/php/mixins/FlaggedElement.php @@ -35,12 +35,11 @@ // Initialization $this->setFlags( isset( $config['flags'] ) ? $config['flags'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( !empty( $this->flags ) ) { $config['flags'] = $this->getFlags(); } } ); - } /** diff --git a/oojs/oojs-ui/php/mixins/GroupElement.php b/oojs/oojs-ui/php/mixins/GroupElement.php index 475ccbf..2cfeef7 100644 --- a/oojs/oojs-ui/php/mixins/GroupElement.php +++ b/oojs/oojs-ui/php/mixins/GroupElement.php @@ -27,7 +27,7 @@ // Properties $this->group = isset( $config['group'] ) ? $config['group'] : new Tag( 'div' ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { $config['items'] = $this->items; } ); } diff --git a/oojs/oojs-ui/php/mixins/IconElement.php b/oojs/oojs-ui/php/mixins/IconElement.php index 7d80c2c..4ec7d11 100644 --- a/oojs/oojs-ui/php/mixins/IconElement.php +++ b/oojs/oojs-ui/php/mixins/IconElement.php @@ -38,7 +38,7 @@ $this->icon->addClasses( [ 'oo-ui-iconElement-icon' ] ); $this->setIcon( isset( $config['icon'] ) ? $config['icon'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->iconName !== null ) { $config['icon'] = $this->iconName; } diff --git a/oojs/oojs-ui/php/mixins/IndicatorElement.php b/oojs/oojs-ui/php/mixins/IndicatorElement.php index dce7a49..61f31f7 100644 --- a/oojs/oojs-ui/php/mixins/IndicatorElement.php +++ b/oojs/oojs-ui/php/mixins/IndicatorElement.php @@ -40,7 +40,7 @@ $this->indicator->addClasses( [ 'oo-ui-indicatorElement-indicator' ] ); $this->setIndicator( isset( $config['indicator'] ) ? $config['indicator'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->indicatorName !== null ) { $config['indicator'] = $this->indicatorName; } diff --git a/oojs/oojs-ui/php/mixins/LabelElement.php b/oojs/oojs-ui/php/mixins/LabelElement.php index 21fe246..d4280bd 100644 --- a/oojs/oojs-ui/php/mixins/LabelElement.php +++ b/oojs/oojs-ui/php/mixins/LabelElement.php @@ -33,7 +33,7 @@ $this->label->addClasses( [ 'oo-ui-labelElement-label' ] ); $this->setLabel( isset( $config['label'] ) ? $config['label'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->labelValue !== null ) { $config['label'] = $this->labelValue; } diff --git a/oojs/oojs-ui/php/mixins/TabIndexedElement.php b/oojs/oojs-ui/php/mixins/TabIndexedElement.php index ec88335..5132d5d 100644 --- a/oojs/oojs-ui/php/mixins/TabIndexedElement.php +++ b/oojs/oojs-ui/php/mixins/TabIndexedElement.php @@ -32,12 +32,11 @@ // Initialization $this->setTabIndex( isset( $config['tabIndex'] ) ? $config['tabIndex'] : 0 ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->tabIndex !== 0 ) { $config['tabIndex'] = $this->tabIndex; } } ); - } /** diff --git a/oojs/oojs-ui/php/mixins/TitledElement.php b/oojs/oojs-ui/php/mixins/TitledElement.php index ed2735f..073cc74 100644 --- a/oojs/oojs-ui/php/mixins/TitledElement.php +++ b/oojs/oojs-ui/php/mixins/TitledElement.php @@ -36,12 +36,11 @@ isset( $config['title'] ) ? $config['title'] : null ); - $this->registerConfigCallback( function( &$config ) { + $this->registerConfigCallback( function ( &$config ) { if ( $this->title !== null ) { $config['title'] = $this->title; } } ); - } /** diff --git a/oojs/oojs-ui/php/widgets/HiddenInputWidget.php b/oojs/oojs-ui/php/widgets/HiddenInputWidget.php index af1b234..d848139 100644 --- a/oojs/oojs-ui/php/widgets/HiddenInputWidget.php +++ b/oojs/oojs-ui/php/widgets/HiddenInputWidget.php @@ -15,7 +15,7 @@ /** * DataWidget constructor. * - * @param array $config + * @param array $config Configuration options * @param string $config['value'] The data the input contains. (default: '') * @param string $config['name'] The name of the hidden input. (default: '') */ diff --git a/oojs/oojs-ui/php/widgets/InputWidget.php b/oojs/oojs-ui/php/widgets/InputWidget.php index dfe918b..2601dbc 100644 --- a/oojs/oojs-ui/php/widgets/InputWidget.php +++ b/oojs/oojs-ui/php/widgets/InputWidget.php @@ -145,7 +145,7 @@ /** * Set the 'id' attribute of the `<input>` element. * - * @param string $id + * @param string $id The ID of the input element * @return $this */ public function setInputId( $id ) { diff --git a/oojs/oojs-ui/php/widgets/ProgressBarWidget.php b/oojs/oojs-ui/php/widgets/ProgressBarWidget.php index c31ce45..e49ea20 100644 --- a/oojs/oojs-ui/php/widgets/ProgressBarWidget.php +++ b/oojs/oojs-ui/php/widgets/ProgressBarWidget.php @@ -15,10 +15,8 @@ /** * @param array $config Configuration options - * @param bool|int $config['progress'] The type of progress bar (determinate or indeterminate). - * To create a determinate progress bar,specify a number - * that reflects the initial percent complete. - * By default, the progress bar is indeterminate. + * @param bool|int $config['progress'] Numeric value between 0 and 100 (the percent complete) + * for determinate progress bar, or `false` for indeterminate progress bar (default: false) */ public function __construct( array $config = [] ) { parent::__construct( $config ); @@ -46,7 +44,8 @@ } /** - * @param bool|int $progress + * @param bool|int $progress Numeric value between 0 and 100 (the percent complete) + * for determinate progress bar, or `false` for indeterminate progress bar (default: false) */ public function setProgress( $progress ) { $this->progress = $progress; -- To view, visit https://gerrit.wikimedia.org/r/364614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If676bfab1d2040a9d360c741a5ab4e1c81b36b87 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vendor Gerrit-Branch: master Gerrit-Owner: Jforrester <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
