Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/250836
Change subject: Update OOjs UI to v0.13.1 ...................................................................... Update OOjs UI to v0.13.1 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.13.1/History.md Change-Id: Ic8fbb6ee4326c73243ea655708b9cfd09bc7e52a --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/demos/widgets.php M oojs/oojs-ui/i18n/hy.json M oojs/oojs-ui/i18n/jv.json M oojs/oojs-ui/i18n/lb.json M oojs/oojs-ui/i18n/lt.json M oojs/oojs-ui/i18n/pt-br.json M oojs/oojs-ui/package.json M oojs/oojs-ui/php/widgets/InputWidget.php 13 files changed, 167 insertions(+), 105 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/36/250836/1 diff --git a/composer.json b/composer.json index e13fb09..fc6b29d 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "mediawiki/at-ease": "1.1.0", "monolog/monolog": "1.17.2", "nmred/kafka-php": "0.1.4", - "oojs/oojs-ui": "0.13.0", + "oojs/oojs-ui": "0.13.1", "oyejorge/less.php": "1.7.0.9", "php": ">=5.3.3", "psr/log": "1.0.0", diff --git a/composer.lock b/composer.lock index ccb13ed..93e71f3 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": "44591a954c3949ebe9941464165a36bf", - "content-hash": "2b747bca5a388a790e71b85b3107bcc9", + "hash": "8d214923ae0bbeb39360f3acb290300c", + "content-hash": "a69ca0cc1e246d83af0b32a359803a68", "packages": [ { "name": "composer/semver", @@ -393,16 +393,16 @@ }, { "name": "oojs/oojs-ui", - "version": "v0.13.0", + "version": "v0.13.1", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "4508cebcf5f2db272578c33e5c83b9a90dbe779f" + "reference": "c77664633e4d77ad6da991f6afb8d418b20b4058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/4508cebcf5f2db272578c33e5c83b9a90dbe779f", - "reference": "4508cebcf5f2db272578c33e5c83b9a90dbe779f", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c77664633e4d77ad6da991f6afb8d418b20b4058", + "reference": "c77664633e4d77ad6da991f6afb8d418b20b4058", "shasum": "" }, "require": { @@ -460,7 +460,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI", - "time": "2015-10-27 17:33:57" + "time": "2015-11-03 21:19:39" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index d8ad6b6..159bd3c 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1024,79 +1024,6 @@ ] }, { - "name": "oojs/oojs-ui", - "version": "v0.13.0", - "version_normalized": "0.13.0.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "4508cebcf5f2db272578c33e5c83b9a90dbe779f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/4508cebcf5f2db272578c33e5c83b9a90dbe779f", - "reference": "4508cebcf5f2db272578c33e5c83b9a90dbe779f", - "shasum": "" - }, - "require": { - "mediawiki/at-ease": "1.1.0", - "php": ">=5.3.3" - }, - "require-dev": { - "jakub-onderka/php-parallel-lint": "0.9", - "mediawiki/mediawiki-codesniffer": "0.5.0", - "phpunit/phpunit": "~4.5" - }, - "time": "2015-10-27 17:33:57", - "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]" - } - ], - "description": "Provides library of common widgets, layouts, and windows.", - "homepage": "https://www.mediawiki.org/wiki/OOjs_UI" - }, - { "name": "monolog/monolog", "version": "1.17.2", "version_normalized": "1.17.2.0", @@ -1266,5 +1193,78 @@ ], "description": "Convert an arbitrarily-long string from one numeric base to another, optionally zero-padding to a minimum column width.", "homepage": "https://www.mediawiki.org/wiki/base_convert" + }, + { + "name": "oojs/oojs-ui", + "version": "v0.13.1", + "version_normalized": "0.13.1.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/oojs-ui.git", + "reference": "c77664633e4d77ad6da991f6afb8d418b20b4058" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c77664633e4d77ad6da991f6afb8d418b20b4058", + "reference": "c77664633e4d77ad6da991f6afb8d418b20b4058", + "shasum": "" + }, + "require": { + "mediawiki/at-ease": "1.1.0", + "php": ">=5.3.3" + }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9", + "mediawiki/mediawiki-codesniffer": "0.5.0", + "phpunit/phpunit": "~4.5" + }, + "time": "2015-11-03 21:19:39", + "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]" + } + ], + "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 1cbf79a..51edb31 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,5 +1,23 @@ # OOjs UI Release History +## v0.13.1 / 2015-11-03 +### Deprecations +* [DEPRECATING CHANGE] InputWidget: Replace `#setRTL` with `#setDir` (Ed Sanders) + +### Features +* Allow widgets to re-use parts of the DOM when infusing; use for InputWidget's `$input` (Bartosz Dziewoński) +* FieldLayout: Allow setting errors and notices dynamically (Bartosz Dziewoński) +* InputWidget: Add '`dir`' to config (Ed Sanders) + +### Styles +* TextInputWidget: Account for scroll bar width when positioning indicators/labels (Ed Sanders) +* TextInputWidget: Ensure icon+indicator+label are top aligned in multi-line mode (Ed Sanders) + +### Code +* FieldLayout: Mark `#makeMessage` as `@protected` (Bartosz Dziewoński) +* History.md: wrap `<select>` tag in backticks (Ricordisamoa) +* tests: Refactor property->attribute copying (Ed Sanders) + ## v0.13.0 / 2015-10-27 ### Breaking changes * [BREAKING CHANGE] Remove aliases for OO.ui.mixins, deprecated in 0.11.4 (C. Scott Ananian) @@ -392,7 +410,7 @@ * SelectFileWidget: Create (Brad Jorsch) * SelectWidget: Listen to keypresses and jump to matching items (Brad Jorsch) * TextInputWidget: Adjust height to other widgets (Bartosz Dziewoński) -* Widget: Add `#supportsSimpleLabel` static property to control <label> usage (Bartosz Dziewoński) +* Widget: Add `#supportsSimpleLabel` static property to control `<label>` usage (Bartosz Dziewoński) * Window: Clear margins for actions in horizontal/vertical groups (Ed Sanders) * `OOUI\Tag`: Avoid 'Potentially unsafe "href" attribute value' exceptions for relative URLs (Bartosz Dziewoński) @@ -401,7 +419,7 @@ * styles: Change gradient mixin syntax to W3C standards' syntax (Volker E) * styles: Remove obsolete "-ms-linear-gradient" declaration (Volker E) * Apex theme: Use matching 'lock' and 'unLock' icons (Bartosz Dziewoński) -* MediaWiki and Apex themes: Force background color of <select> to white (Ed Sanders) +* MediaWiki and Apex themes: Force background color of `<select>` to white (Ed Sanders) * MediaWiki and Apex themes: Re-crush SVG files (James D. Forrester) ### Code @@ -984,7 +1002,7 @@ * demo: Add button style showcase from PHP demo (Bartosz Dziewoński) * demo: Reorder widgets into somewhat logical groupings (Bartosz Dziewoński) * demo: Stop inline consoles from generating white space (Bartosz Dziewoński) -* demo: Use properties instead of attributes for <link> (Timo Tijhof) +* demo: Use properties instead of attributes for `<link>` (Timo Tijhof) * PHP demo: Add Vector/Raster and MediaWiki/Apex controls (Bartosz Dziewoński) * PHP demo: Just echo the autoload error message, don't trigger_error() (Bartosz Dziewoński) * PHP demo: Resynchronize with JS demo (Bartosz Dziewoński) @@ -1154,11 +1172,11 @@ * MediaWiki theme: checkbox: Fix states according to spec (Prateek Saxena) ### Code -* Account for <html> rather than <body> being the scrollable root in Chrome (Bartosz Dziewoński) +* Account for `<html>` rather than `<body>` being the scrollable root in Chrome (Bartosz Dziewoński) * ClippableElement: 7 is a better number than 10 (Bartosz Dziewoński) * Don't set line-height of unset button labels (Bartosz Dziewoński) * FieldLayout: Synchronise PHP with JS (Bartosz Dziewoński) -* FieldLayout: Use <label> for this.$body, not this.$element (Bartosz Dziewoński) +* FieldLayout: Use `<label>` for this.$body, not this.$element (Bartosz Dziewoński) * Fix primary button description text (Niklas Laxström) * GridLayout: Don't round to 1% (Bartosz Dziewoński) * Kill the escape keydown event after handling a window close (Ed Sanders) diff --git a/oojs/oojs-ui/demos/pages/widgets.js b/oojs/oojs-ui/demos/pages/widgets.js index dd4be8c..b2d5f51 100644 --- a/oojs/oojs-ui/demos/pages/widgets.js +++ b/oojs/oojs-ui/demos/pages/widgets.js @@ -882,6 +882,20 @@ ), new OO.ui.FieldLayout( new OO.ui.TextInputWidget( { + multiline: true, + autosize: true, + icon: 'tag', + indicator: 'required', + label: 'Inline label', + value: 'Autosize\nAutosize\nAutosize\nAutosize' + } ), + { + label: 'TextInputWidget (autosize, icon, indicator, label)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.TextInputWidget( { icon: 'tag', indicator: 'alert', value: 'Text input with label', diff --git a/oojs/oojs-ui/demos/widgets.php b/oojs/oojs-ui/demos/widgets.php index 191e1de..d55f3a5 100644 --- a/oojs/oojs-ui/demos/widgets.php +++ b/oojs/oojs-ui/demos/widgets.php @@ -642,6 +642,18 @@ ) ), new OOUI\FieldLayout( + new OOUI\TextInputWidget( array( + 'multiline' => true, + 'value' => "Multiline\nMultiline", + 'icon' => 'tag', + 'indicator' => 'required' + ) ), + array( + 'label' => "TextInputWidget (multiline, icon, indicator)\xE2\x80\x8E", + 'align' => 'top' + ) + ), + new OOUI\FieldLayout( new OOUI\DropdownInputWidget( array( 'options' => array( array( diff --git a/oojs/oojs-ui/i18n/hy.json b/oojs/oojs-ui/i18n/hy.json index c2b45a8..2cd688e 100644 --- a/oojs/oojs-ui/i18n/hy.json +++ b/oojs/oojs-ui/i18n/hy.json @@ -19,6 +19,8 @@ "ooui-dialog-process-dismiss": "Փակել", "ooui-dialog-process-retry": "Կրկին փորձել", "ooui-dialog-process-continue": "Շարունակել", + "ooui-selectfile-button-select": "Ընտրել նիշք", "ooui-selectfile-not-supported": "Ֆայլի ընտրությունը չի պաշտպանվում", - "ooui-selectfile-placeholder": "Ֆայլն ընտրված չէ" + "ooui-selectfile-placeholder": "Ֆայլն ընտրված չէ", + "ooui-selectfile-dragdrop-placeholder": "Ֆայլը գցել այստե" } diff --git a/oojs/oojs-ui/i18n/jv.json b/oojs/oojs-ui/i18n/jv.json index 677b1c3..1024d2a 100644 --- a/oojs/oojs-ui/i18n/jv.json +++ b/oojs/oojs-ui/i18n/jv.json @@ -4,14 +4,15 @@ "Gleki", "NoiX180", "Pras", - "Jadinegara" + "Jadinegara", + "Meursault2004" ] }, "ooui-outline-control-move-down": "Pindhahaken butir mangandhap", - "ooui-outline-control-move-up": "Pindhah kara mêndhuwur", + "ooui-outline-control-move-up": "Pindhah kara menyang dhuwur", "ooui-outline-control-remove": "Busak kara", - "ooui-toolbar-more": "Mênèh", - "ooui-toolgroup-expand": "Mênèh", + "ooui-toolbar-more": "Manèh", + "ooui-toolgroup-expand": "Manèh", "ooui-toolgroup-collapse": "Suda", "ooui-dialog-message-accept": "Oké", "ooui-dialog-message-reject": "Batal", @@ -19,6 +20,6 @@ "ooui-dialog-process-dismiss": "Tutup", "ooui-dialog-process-retry": "Jajal manèh", "ooui-dialog-process-continue": "Tutug", - "ooui-selectfile-not-supported": "Pilihan bêrkas ora disokong", - "ooui-selectfile-placeholder": "Ora ana bêrkas sing kapilih" + "ooui-selectfile-not-supported": "Pilihan berkas ora disokong", + "ooui-selectfile-placeholder": "Ora ana berkas sing kapilih" } diff --git a/oojs/oojs-ui/i18n/lb.json b/oojs/oojs-ui/i18n/lb.json index 39bc670..fad4c1c 100644 --- a/oojs/oojs-ui/i18n/lb.json +++ b/oojs/oojs-ui/i18n/lb.json @@ -23,6 +23,7 @@ "ooui-dialog-process-retry": "Nach eng Kéier probéieren", "ooui-dialog-process-continue": "Virufueren", "ooui-selectfile-button-select": "E Fichier eraussichen", + "ooui-selectfile-not-supported": "D'Eraussiche vu Fichiere gëtt net ënnerstëtzt.", "ooui-selectfile-placeholder": "Et ass kee Fichier erausgesicht", "ooui-selectfile-dragdrop-placeholder": "Fichier hei ofleeën" } diff --git a/oojs/oojs-ui/i18n/lt.json b/oojs/oojs-ui/i18n/lt.json index fbd22d0..86c6d64 100644 --- a/oojs/oojs-ui/i18n/lt.json +++ b/oojs/oojs-ui/i18n/lt.json @@ -9,7 +9,7 @@ }, "ooui-outline-control-move-down": "Perkelti elementą žemyn", "ooui-outline-control-move-up": "Perkelti elementą aukštyn", - "ooui-outline-control-remove": "Šalinti elementus", + "ooui-outline-control-remove": "Šalinti įrašą", "ooui-toolbar-more": "Daugiau", "ooui-toolgroup-expand": "Daugiau", "ooui-toolgroup-collapse": "Mažiau", diff --git a/oojs/oojs-ui/i18n/pt-br.json b/oojs/oojs-ui/i18n/pt-br.json index bcc31e0..fc29962 100644 --- a/oojs/oojs-ui/i18n/pt-br.json +++ b/oojs/oojs-ui/i18n/pt-br.json @@ -26,6 +26,8 @@ "ooui-dialog-process-dismiss": "Dispensar", "ooui-dialog-process-retry": "Tentar novamente", "ooui-dialog-process-continue": "Continuar", + "ooui-selectfile-button-select": "Selecionar um arquivo", "ooui-selectfile-not-supported": "O selecionamento de arquivos não é suportado", - "ooui-selectfile-placeholder": "Nenhum arquivo selecionado" + "ooui-selectfile-placeholder": "Nenhum arquivo selecionado", + "ooui-selectfile-dragdrop-placeholder": "Arraste o arquivo para cá" } diff --git a/oojs/oojs-ui/package.json b/oojs/oojs-ui/package.json index ba383ef..d2e43af 100644 --- a/oojs/oojs-ui/package.json +++ b/oojs/oojs-ui/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.13.0", + "version": "0.13.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", diff --git a/oojs/oojs-ui/php/widgets/InputWidget.php b/oojs/oojs-ui/php/widgets/InputWidget.php index 24f5a51..7e3d368 100644 --- a/oojs/oojs-ui/php/widgets/InputWidget.php +++ b/oojs/oojs-ui/php/widgets/InputWidget.php @@ -33,6 +33,7 @@ * @param array $config Configuration options * @param string $config['name'] HTML input name (default: '') * @param string $config['value'] Input value (default: '') + * @param string $config['dir'] The directionality of the input (ltr/rtl) */ public function __construct( array $config = array() ) { // Parent constructor @@ -63,6 +64,9 @@ ->appendContent( $this->input ); $this->input->addClasses( array( 'oo-ui-inputWidget-input' ) ); $this->setValue( isset( $config['value'] ) ? $config['value'] : null ); + if ( isset( $config['dir'] ) ) { + $this->setDir( $config['dir'] ); + } } /** @@ -85,18 +89,26 @@ } /** - * Sets the direction of the current input, either RTL or LTR + * Set the directionality of the input, either RTL (right-to-left) or LTR (left-to-right). * - * @param boolean $isRTL + * @deprecated since v0.13.1, use #setDir directly + * @param boolean $isRTL Directionality is right-to-left + * @chainable */ public function setRTL( $isRTL ) { - if ( $isRTL ) { - $this->input->removeClasses( array( 'oo-ui-ltr' ) ); - $this->input->addClasses( array( 'oo-ui-rtl' ) ); - } else { - $this->input->removeClasses( array( 'oo-ui-rtl' ) ); - $this->input->addClasses( array( 'oo-ui-ltr' ) ); - } + $this->setDir( $isRTL ? 'rtl' : 'ltr' ); + return $this; + } + + /** + * Set the directionality of the input. + * + * @param string $dir Text directionality: 'ltr', 'rtl' or 'auto' + * @chainable + */ + public function setDir( $dir ) { + $this->input->setAttributes( array( 'dir' => $dir ) ); + return $this; } /** -- To view, visit https://gerrit.wikimedia.org/r/250836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8fbb6ee4326c73243ea655708b9cfd09bc7e52a 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
