Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/284363
Change subject: Update OOjs UI to v0.16.6 ...................................................................... Update OOjs UI to v0.16.6 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.16.6/History.md Change-Id: Ib9bb35d87633d06211dd75e237d7b105947f8df1 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/README.md M oojs/oojs-ui/bin/testsuitegenerator.rb M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/demos/widgets.php M oojs/oojs-ui/i18n/krc.json M oojs/oojs-ui/package.json M oojs/oojs-ui/php/widgets/TextInputWidget.php 11 files changed, 123 insertions(+), 68 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/63/284363/1 diff --git a/composer.json b/composer.json index 1218e47..599c359 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "mediawiki/at-ease": "1.1.0", "monolog/monolog": "1.18.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.16.5", + "oojs/oojs-ui": "0.16.6", "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 6e232e6..2ddd9e9 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": "3708ef691038ee40f722a8f626013036", - "content-hash": "62fd107dd3389eb827e9ef8e83d191d7", + "hash": "34c80b59fe7b23d5597026a8b8556baa", + "content-hash": "d19a6421bb9e6953dd57b3638c731146", "packages": [ { "name": "composer/semver", @@ -364,16 +364,16 @@ }, { "name": "oojs/oojs-ui", - "version": "v0.16.5", + "version": "v0.16.6", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c" + "reference": "ea3f3de85b964fb2f1b2c404d833cbd82bb093aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c", - "reference": "be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/ea3f3de85b964fb2f1b2c404d833cbd82bb093aa", + "reference": "ea3f3de85b964fb2f1b2c404d833cbd82bb093aa", "shasum": "" }, "require": { @@ -439,7 +439,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI", - "time": "2016-04-07 14:47:36" + "time": "2016-04-19 20:52:46" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 340938c..9dc8223 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1685,18 +1685,62 @@ ] }, { - "name": "oojs/oojs-ui", - "version": "v0.16.5", - "version_normalized": "0.16.5.0", + "name": "wikimedia/html-formatter", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", - "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c" + "url": "https://github.com/wikimedia/HtmlFormatter.git", + "reference": "60069c2fb5e4f034e7025089cc4a1023b810d197" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c", - "reference": "be8d85ef13a3149ffe37a25e8e1766cab7ec4d6c", + "url": "https://api.github.com/repos/wikimedia/HtmlFormatter/zipball/60069c2fb5e4f034e7025089cc4a1023b810d197", + "reference": "60069c2fb5e4f034e7025089cc4a1023b810d197", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.5" + }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "0.5.1", + "phpunit/phpunit": "4.7.2" + }, + "time": "2016-04-07 21:25:47", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "MediaWiki contributors" + } + ], + "description": "Performs transformations of HTML by wrapping around libxml2 and working around its countless bugs.", + "homepage": "https://www.mediawiki.org/wiki/HtmlFormatter" + }, + { + "name": "oojs/oojs-ui", + "version": "v0.16.6", + "version_normalized": "0.16.6.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/oojs-ui.git", + "reference": "ea3f3de85b964fb2f1b2c404d833cbd82bb093aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/ea3f3de85b964fb2f1b2c404d833cbd82bb093aa", + "reference": "ea3f3de85b964fb2f1b2c404d833cbd82bb093aa", "shasum": "" }, "require": { @@ -1708,7 +1752,7 @@ "mediawiki/mediawiki-codesniffer": "0.6.0", "phpunit/phpunit": "4.8.21" }, - "time": "2016-04-07 14:47:36", + "time": "2016-04-19 20:52:46", "type": "library", "installation-source": "dist", "autoload": { @@ -1764,49 +1808,5 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI" - }, - { - "name": "wikimedia/html-formatter", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/HtmlFormatter.git", - "reference": "60069c2fb5e4f034e7025089cc4a1023b810d197" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/HtmlFormatter/zipball/60069c2fb5e4f034e7025089cc4a1023b810d197", - "reference": "60069c2fb5e4f034e7025089cc4a1023b810d197", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.5" - }, - "require-dev": { - "jakub-onderka/php-parallel-lint": "0.9.2", - "mediawiki/mediawiki-codesniffer": "0.5.1", - "phpunit/phpunit": "4.7.2" - }, - "time": "2016-04-07 21:25:47", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "MediaWiki contributors" - } - ], - "description": "Performs transformations of HTML by wrapping around libxml2 and working around its countless bugs.", - "homepage": "https://www.mediawiki.org/wiki/HtmlFormatter" } ] diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md index 6a993ee..8791054 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,5 +1,33 @@ # OOjs UI Release History +## v0.16.6 / 2016-04-19 +### Features +* ButtonOptionWidget: Inherit OptionWidget, not DecoratedOptionWidget (Bartosz Dziewoński) +* ClippableElement: Gracefully handle failure to call clip() after natural height change (Roan Kattouw) +* NumberInputWidget: Disable onWheel action unless the widget has focus (Bartosz Dziewoński) +* NumberInputWidget: Disable onWheel action when the widget is disabled (Prateek Saxena) +* NumberInputWidget: Use input type="number" (Prateek Saxena) +* TextInputWidget: Allow type="number" (Prateek Saxena) +* TextInputWidget: Set step to 'any' if the type is set to 'number' (Prateek Saxena) +* styles: Give icons, indicators `min-width/-height` for cross-browser support (Volker E) + +### Styles +* Apex, MediaWiki themes: Properly center PopupButtonWidget anchors (Roan Kattouw) +* MediaWiki theme: Use disabled color variable for disabled label (Volker E) +* styles: Use transparent rather than white in icons (Bartosz Dziewoński) + +### Code +* SelectFileWidget: Merge identical CSS rules (Volker E) +* SelectFileWidget: Simplify CSS selector specificity (Volker E) +* TextInputWidget: Clarify comment about affected browsers (Volker E) +* TextInputWidget: Consolidate selectors with the same property rules (Volker E) +* TextInputWidget: Stop claiming to fire non existent events in the documentation (Prateek Saxena) +* styles: Centralise the width/height properties of icons and indicators (Volker E) +* Apex theme: Change variable names to match MediaWiki theme (Bartosz Dziewoński) +* README: Update with new build process (Matthew Flaschen) +* typo: texfield -> textfield (Derk-Jan Hartman) + + ## v0.16.5 / 2016-04-07 ### Styles * Prevent modal windows from exceeding available height on Firefox (Bartosz Dziewoński) @@ -24,6 +52,7 @@ * build: Update demos script to also run grunt publish-build (Paladox) * build: Use a version of grunt-svg2png without a rate-limited CDN (Paladox) + ## v0.16.4 / 2016-03-22 ### Features * NumberInputWidget: Optionally don't show the increment buttons (Thalia Chan) @@ -41,6 +70,7 @@ * demos: Restore constructive widgets (James D. Forrester) * rubocop: Re-run todos, upgrade to newer rule names (James D. Forrester) * rubocop: Review todos (Bartosz Dziewoński) + ## v0.16.3 / 2016-03-16 ### Features @@ -68,6 +98,7 @@ * testsuitegenerator: Change values tested for 'flags' config options (Bartosz Dziewoński) * testsuitegenerator: Test 'HtmlSnippet' type (mostly for labels) (Bartosz Dziewoński) + ## v0.16.2 / 2016-03-08 ### Deprecations * [DEPRECATING CHANGE] MediaWiki theme: Scrap `constructive` flag (Volker E) @@ -92,6 +123,7 @@ * Clean-up duplicate properties across widgets (Volker E) * docs: Clarify the lack of `.oo-ui-box-shadow()` mixin (Volker E) + ## v0.16.1 / 2016-03-01 ### Styles * CapsuleItemWidget: Revert regression on "remove" button in Firefox (Volker E) diff --git a/oojs/oojs-ui/README.md b/oojs/oojs-ui/README.md index 10a05bf..fc41aaf 100644 --- a/oojs/oojs-ui/README.md +++ b/oojs/oojs-ui/README.md @@ -21,7 +21,9 @@ 1. Install [composer](https://getcomposer.org/download/) and make sure running `composer` will execute it (*e.g.* add it to `$PATH` in POSIX environments). -1. Install dev dependencies and build the distribution files:<br/>`$ npm install` +1. Install dev dependencies:<br/>`$ npm install` + +1. Build the library (you can alternatively use `grunt quick-build` if you don't need to rebuild the PNGs):<br/>`$ grunt build` 1. You can now copy the distribution files from the dist directory into your project. diff --git a/oojs/oojs-ui/bin/testsuitegenerator.rb b/oojs/oojs-ui/bin/testsuitegenerator.rb index 9091052..a553514 100644 --- a/oojs/oojs-ui/bin/testsuitegenerator.rb +++ b/oojs/oojs-ui/bin/testsuitegenerator.rb @@ -42,7 +42,7 @@ # values to test for names sensible_values = { 'href' => ['http://example.com/'], - ['TextInputWidget', 'type'] => %w[text password foo], + ['TextInputWidget', 'type'] => %w[text number password foo], ['ButtonInputWidget', 'type'] => %w[button submit foo], ['FieldLayout', 'help'] => true, # different PHP and JS implementations ['ActionFieldLayout', 'help'] => true, # different PHP and JS implementations diff --git a/oojs/oojs-ui/demos/pages/widgets.js b/oojs/oojs-ui/demos/pages/widgets.js index 165b298..8dda689 100644 --- a/oojs/oojs-ui/demos/pages/widgets.js +++ b/oojs/oojs-ui/demos/pages/widgets.js @@ -886,6 +886,13 @@ } ), new OO.ui.FieldLayout( + new OO.ui.TextInputWidget( { type: 'number' } ), + { + label: 'TextInputWidget (type=number)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( new OO.ui.TextInputWidget( { value: 'Readonly', readOnly: true diff --git a/oojs/oojs-ui/demos/widgets.php b/oojs/oojs-ui/demos/widgets.php index 5b91d7f..eb22fa5 100644 --- a/oojs/oojs-ui/demos/widgets.php +++ b/oojs/oojs-ui/demos/widgets.php @@ -568,6 +568,13 @@ ] ), new OOUI\FieldLayout( + new OOUI\TextInputWidget( [ 'type' => 'number' ] ), + [ + 'label' => "TextInputWidget (type=number)\xE2\x80\x8E", + 'align' => 'top' + ] + ), + new OOUI\FieldLayout( new OOUI\TextInputWidget( [ 'value' => 'Readonly', 'readOnly' => true diff --git a/oojs/oojs-ui/i18n/krc.json b/oojs/oojs-ui/i18n/krc.json index d4068c8..6f17b34 100644 --- a/oojs/oojs-ui/i18n/krc.json +++ b/oojs/oojs-ui/i18n/krc.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "Iltever" + "Iltever", + "Ernác" ] }, "ooui-outline-control-move-down": "Элементни тюбюне кёчюр", diff --git a/oojs/oojs-ui/package.json b/oojs/oojs-ui/package.json index 81529c1..3e80815 100644 --- a/oojs/oojs-ui/package.json +++ b/oojs/oojs-ui/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.16.5", + "version": "0.16.6", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", diff --git a/oojs/oojs-ui/php/widgets/TextInputWidget.php b/oojs/oojs-ui/php/widgets/TextInputWidget.php index f76697d..fc73788 100644 --- a/oojs/oojs-ui/php/widgets/TextInputWidget.php +++ b/oojs/oojs-ui/php/widgets/TextInputWidget.php @@ -33,7 +33,7 @@ /** * @param array $config Configuration options * @param string $config['type'] HTML tag `type` attribute: 'text', 'password', 'search', 'email', - * 'url' or 'date'. Ignored if `multiline` is true. (default: 'text') + * 'url', 'date' or 'number'. Ignored if `multiline` is true. (default: 'text') * * Some values of `type` result in additional behaviors: * - `search`: implies `icon: 'search'` and `indicator: 'clear'`; when clicked, the indicator @@ -135,6 +135,11 @@ protected function getInputElement( $config ) { if ( isset( $config['multiline'] ) && $config['multiline'] ) { return new Tag( 'textarea' ); + } elseif ( $this->getSaneType( $config ) === 'number' ) { + return ( new Tag( 'input' ) )->setAttributes( [ + 'step' => 'any', + 'type' => 'number', + ] ); } else { return ( new Tag( 'input' ) )->setAttributes( [ 'type' => $this->getSaneType( $config ) ] ); } @@ -144,9 +149,10 @@ if ( isset( $config['multiline'] ) && $config['multiline'] ) { return 'multiline'; } else { - $type = in_array( $config['type'], [ 'text', 'password', 'search', 'email', 'url', 'date' ] ) ? - $config['type'] : - 'text'; + $type = in_array( + $config['type'], + [ 'text', 'password', 'search', 'email', 'url', 'date', 'number' ] + ) ? $config['type'] : 'text'; return $type; } } -- To view, visit https://gerrit.wikimedia.org/r/284363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9bb35d87633d06211dd75e237d7b105947f8df1 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
