VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404626 )
Change subject: Update OOUI to v0.25.1 ...................................................................... Update OOUI to v0.25.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.25.1 Change-Id: I4d0697f93fccd919fedd370b0c196af8a3046c50 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/LICENSE-MIT M oojs/oojs-ui/README.md M oojs/oojs-ui/demos/demo.js M oojs/oojs-ui/demos/demos.php M oojs/oojs-ui/demos/index.html M oojs/oojs-ui/demos/pages/widgets.php M oojs/oojs-ui/i18n/hy.json M oojs/oojs-ui/i18n/ja.json M oojs/oojs-ui/package.json M oojs/oojs-ui/php/Element.php M oojs/oojs-ui/php/Tag.php M oojs/oojs-ui/php/widgets/MultilineTextInputWidget.php M oojs/oojs-ui/php/widgets/TextInputWidget.php 17 files changed, 134 insertions(+), 129 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/26/404626/1 diff --git a/composer.json b/composer.json index 1193387..23c9403 100644 --- a/composer.json +++ b/composer.json @@ -82,7 +82,7 @@ "mustangostang/spyc": "0.6.2", "nikic/php-parser": "3.0.6", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.25.0", + "oojs/oojs-ui": "0.25.1", "oyejorge/less.php": "1.7.0.14", "pear/console_getopt": "1.4.1", "pear/mail": "1.4.1", diff --git a/composer.lock b/composer.lock index 31fdabf..79b8e27 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": "9806bc719f523adfc8bb29f4388b54fe", + "content-hash": "837c313a820d305f7d8972f339ad3f58", "packages": [ { "name": "composer/semver", @@ -1192,16 +1192,16 @@ }, { "name": "oojs/oojs-ui", - "version": "v0.25.0", + "version": "v0.25.1", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "c165b27112aeb281437bb724603851d12f3cb714" + "reference": "f78d952f8f2deb2d6a251c0243b3b1f2e8639a95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c165b27112aeb281437bb724603851d12f3cb714", - "reference": "c165b27112aeb281437bb724603851d12f3cb714", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/f78d952f8f2deb2d6a251c0243b3b1f2e8639a95", + "reference": "f78d952f8f2deb2d6a251c0243b3b1f2e8639a95", "shasum": "" }, "require": { @@ -1266,8 +1266,8 @@ } ], "description": "Provides library of common widgets, layouts, and windows.", - "homepage": "https://www.mediawiki.org/wiki/OOjs_UI", - "time": "2018-01-09T23:46:30+00:00" + "homepage": "https://www.mediawiki.org/wiki/OOUI", + "time": "2018-01-17T01:10:25+00:00" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 9c4fd20..af5afe8 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -3638,87 +3638,6 @@ "description": "Parsing and pretty-printing Lucene explain data" }, { - "name": "oojs/oojs-ui", - "version": "v0.25.0", - "version_normalized": "0.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/oojs-ui.git", - "reference": "c165b27112aeb281437bb724603851d12f3cb714" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c165b27112aeb281437bb724603851d12f3cb714", - "reference": "c165b27112aeb281437bb724603851d12f3cb714", - "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": "15.0.0", - "phpunit/phpunit": "4.8.21" - }, - "time": "2018-01-09T23:46:30+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": "wikibase/data-model-services", "version": "3.9.0", "version_normalized": "3.9.0.0", @@ -3776,5 +3695,86 @@ "wikibase", "wikidata" ] + }, + { + "name": "oojs/oojs-ui", + "version": "v0.25.1", + "version_normalized": "0.25.1.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/oojs-ui.git", + "reference": "f78d952f8f2deb2d6a251c0243b3b1f2e8639a95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/f78d952f8f2deb2d6a251c0243b3b1f2e8639a95", + "reference": "f78d952f8f2deb2d6a251c0243b3b1f2e8639a95", + "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": "15.0.0", + "phpunit/phpunit": "4.8.21" + }, + "time": "2018-01-17T01:10:25+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/OOUI" } ] diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md index a07153e..0e9e45f 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,4 +1,16 @@ # OOUI Release History +## v0.25.1 / 2018-01-16 +### Code +* Allow other stuff to handle the event when we call `simulateLabelClick()` (Bartosz Dziewoński) +* Follow-Up I0f1d9c1f: Update usages of `getSelectedItem` -> `findSelectedItem` (Ed Sanders) +* PanelLayout: Remove buggy `translateZ` performance hack (Volker E.) +* PopupToolGroup: Revert "Fix popup direction changing…" (Bartosz Dziewoński) +* Rename prefixes of unique IDs to not mention "OOjs" (Bartosz Dziewoński) +* build, demos, docs: Use “OOUI” as unified name (Volker E.) +* demos: Use MultilineTextInputWidget in PHP demos (Ed Sanders) +* docs: Clarify `required` true handling with `indicator: 'required'` (Volker E.) +* docs: Use “OOUI” as unified name in code comments (Volker E.) + ## v0.25.0 / 2018-01-09 ### Breaking changes * [BREAKING CHANGE] Drop the `constructive` flag entirely (James D. Forrester) diff --git a/oojs/oojs-ui/LICENSE-MIT b/oojs/oojs-ui/LICENSE-MIT index 7648d4c..8f0984c 100644 --- a/oojs/oojs-ui/LICENSE-MIT +++ b/oojs/oojs-ui/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright 2011-2018 OOjs UI Team and other contributors. +Copyright 2011-2018 OOUI Team and other contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/oojs/oojs-ui/README.md b/oojs/oojs-ui/README.md index f10330f..6e98d42 100644 --- a/oojs/oojs-ui/README.md +++ b/oojs/oojs-ui/README.md @@ -1,9 +1,9 @@ [](https://www.npmjs.com/package/oojs-ui) [](https://packagist.org/packages/oojs/oojs-ui) [](https://david-dm.org/wikimedia/oojs-ui#info=devDependencies) -OOjs UI +OOUI ================= -OOjs UI is a component-based JavaScript UI library. Key features: +OOUI is a component-based JavaScript UI library. Key features: * Common widgets, layouts, and dialogs * Classes, elements, and mixins to create custom interfaces @@ -95,7 +95,7 @@ * Join the Wikimedia Developers mailing list, [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l). * Chat with the maintainers on `#wikimedia-dev` on `irc.freenode.net`. * Ask questions on [StackOverflow](https://stackoverflow.com/tags/oojs-ui/info). -* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOjs_UI) on MediaWiki to stay updated. +* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOUI) on MediaWiki to stay updated. Versioning diff --git a/oojs/oojs-ui/demos/demo.js b/oojs/oojs-ui/demos/demo.js index 9ee3e12..a4f89f1 100644 --- a/oojs/oojs-ui/demos/demo.js +++ b/oojs/oojs-ui/demos/demo.js @@ -297,10 +297,10 @@ * Will load a new page. */ Demo.prototype.onModeChange = function () { - var page = this.pageMenu.getSelectedItem().getData(), - theme = this.themeSelect.getSelectedItem().getData(), - direction = this.directionSelect.getSelectedItem().getData(), - platform = this.platformSelect.getSelectedItem().getData(); + var page = this.pageMenu.findSelectedItem().getData(), + theme = this.themeSelect.findSelectedItem().getData(), + direction = this.directionSelect.findSelectedItem().getData(), + platform = this.platformSelect.findSelectedItem().getData(); history.pushState( null, document.title, this.getUrlQuery( [ page, theme, direction, platform ] ) ); $( window ).triggerHandler( 'popstate' ); diff --git a/oojs/oojs-ui/demos/demos.php b/oojs/oojs-ui/demos/demos.php index 00eaca4..39082b7 100644 --- a/oojs/oojs-ui/demos/demos.php +++ b/oojs/oojs-ui/demos/demos.php @@ -81,7 +81,7 @@ <html lang="en" dir="<?php echo $direction; ?>"> <head> <meta charset="UTF-8"> - <title>OOjs UI Widget Demo</title> + <title>OOUI Widget Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php foreach ( $urls as $url ) { diff --git a/oojs/oojs-ui/demos/index.html b/oojs/oojs-ui/demos/index.html index d3ef499..93cc9c6 100644 --- a/oojs/oojs-ui/demos/index.html +++ b/oojs/oojs-ui/demos/index.html @@ -2,7 +2,7 @@ <html lang="en" dir="ltr"> <head> <meta charset="UTF-8"> - <title>OOjs UI Demos</title> + <title>OOUI Demos</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="classes/ButtonStyleShowcaseWidget.css"> <link rel="stylesheet" href="classes/SimpleWidget.css"> diff --git a/oojs/oojs-ui/demos/pages/widgets.php b/oojs/oojs-ui/demos/pages/widgets.php index fa48e7d..9f1c971 100644 --- a/oojs/oojs-ui/demos/pages/widgets.php +++ b/oojs/oojs-ui/demos/pages/widgets.php @@ -417,35 +417,23 @@ ] ), new OOUI\FieldLayout( - new OOUI\TextInputWidget( [ - 'multiline' => true, - 'value' => "Multiline\nMultiline" - ] ), - [ - 'label' => "TextInputWidget (multiline; deprecated)\xE2\x80\x8E", - 'align' => 'top' - ] - ), - new OOUI\FieldLayout( - new OOUI\TextInputWidget( [ - 'multiline' => true, + new OOUI\MultilineTextInputWidget( [ 'rows' => 15, 'value' => "Multiline\nMultiline" ] ), [ - 'label' => "TextInputWidget (multiline, rows=15)\xE2\x80\x8E", + 'label' => "MultilineTextInputWidget (rows=15)\xE2\x80\x8E", 'align' => 'top' ] ), new OOUI\FieldLayout( - new OOUI\TextInputWidget( [ - 'multiline' => true, + new OOUI\MultilineTextInputWidget( [ 'value' => "Multiline\nMultiline", 'icon' => 'tag', - 'indicator' => 'required' + 'indicator' => 'alert' ] ), [ - 'label' => "TextInputWidget (multiline, icon, indicator)\xE2\x80\x8E", + 'label' => "MultilineTextInputWidget (icon, indicator)\xE2\x80\x8E", 'align' => 'top' ] ) diff --git a/oojs/oojs-ui/i18n/hy.json b/oojs/oojs-ui/i18n/hy.json index 341d0ff..598fee3 100644 --- a/oojs/oojs-ui/i18n/hy.json +++ b/oojs/oojs-ui/i18n/hy.json @@ -4,7 +4,8 @@ "Vacio", "Xelgen", "Դավիթ Սարոյան", - "Vahe Gharakhanyan" + "Vahe Gharakhanyan", + "Kareyac" ] }, "ooui-outline-control-move-down": "Իջեցնել ներքև", @@ -13,6 +14,7 @@ "ooui-toolbar-more": "Ավելին", "ooui-toolgroup-expand": "Ավելին", "ooui-toolgroup-collapse": "Պակաս", + "ooui-item-remove": "Հեռացնել", "ooui-dialog-message-accept": "Լավ", "ooui-dialog-message-reject": "Չեղարկել", "ooui-dialog-process-error": "Ինչ-որ սխալ է տեղի ունեցել", diff --git a/oojs/oojs-ui/i18n/ja.json b/oojs/oojs-ui/i18n/ja.json index 960e943..1c3f9c3 100644 --- a/oojs/oojs-ui/i18n/ja.json +++ b/oojs/oojs-ui/i18n/ja.json @@ -9,14 +9,15 @@ "Los688", "Sujiniku", "Translatealcd", - "Otokoume" + "Otokoume", + "Rxy" ] }, "ooui-outline-control-move-down": "項目を下に移動させる", "ooui-outline-control-move-up": "項目を上に移動させる", "ooui-outline-control-remove": "項目を除去", "ooui-toolbar-more": "その他", - "ooui-toolgroup-expand": "その他", + "ooui-toolgroup-expand": "続き", "ooui-toolgroup-collapse": "折り畳む", "ooui-item-remove": "削除", "ooui-dialog-message-accept": "OK", diff --git a/oojs/oojs-ui/package.json b/oojs/oojs-ui/package.json index 38065b6..9cf9121 100644 --- a/oojs/oojs-ui/package.json +++ b/oojs/oojs-ui/package.json @@ -1,12 +1,12 @@ { "name": "oojs-ui", - "version": "0.25.0", + "version": "0.25.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", "ui" ], - "homepage": "https://www.mediawiki.org/wiki/OOjs UI", + "homepage": "https://www.mediawiki.org/wiki/OOUI", "repository": { "type": "git", "url": "https://phabricator.wikimedia.org/diffusion/GOJU/oojs-ui.git" diff --git a/oojs/oojs-ui/php/Element.php b/oojs/oojs-ui/php/Element.php index 2c0a871..c46861f 100644 --- a/oojs/oojs-ui/php/Element.php +++ b/oojs/oojs-ui/php/Element.php @@ -268,12 +268,12 @@ /** * A helper method to massage an array of HTML attributes into a format that is more likely to - * work with an OOjs UI PHP element, camel-casing attribute names and setting values of boolean + * work with an OOUI PHP element, camel-casing attribute names and setting values of boolean * ones to true. Intended as a convenience to be used when refactoring legacy systems using HTML - * to use OOjs UI. + * to use OOUI. * * @param array $attrs HTML attributes, e.g. `[ 'disabled' => '', 'accesskey' => 'k' ]` - * @return array OOjs UI PHP element config, e.g. `[ 'disabled' => true, 'accessKey' => 'k' ]` + * @return array OOUI PHP element config, e.g. `[ 'disabled' => true, 'accessKey' => 'k' ]` */ public static function configFromHtmlAttributes( array $attrs ) { $booleanAttrs = [ diff --git a/oojs/oojs-ui/php/Tag.php b/oojs/oojs-ui/php/Tag.php index 1c308bd..9f39861 100644 --- a/oojs/oojs-ui/php/Tag.php +++ b/oojs/oojs-ui/php/Tag.php @@ -279,7 +279,7 @@ */ public static function generateElementId() { self::$elementId++; - return 'ooui-' . self::$elementId; + return 'ooui-php-' . self::$elementId; } /** @@ -409,7 +409,7 @@ } // Note that this is not a complete list of HTML attributes that need this validation. - // We only check for the ones that are generated by built-in OOjs UI PHP elements. + // We only check for the ones that are generated by built-in OOUI PHP elements. if ( $key === 'href' || $key === 'action' ) { if ( !self::isSafeUrl( $value ) ) { // We can't tell for sure whether this URL is safe (although it might be). The only safe diff --git a/oojs/oojs-ui/php/widgets/MultilineTextInputWidget.php b/oojs/oojs-ui/php/widgets/MultilineTextInputWidget.php index 73d3975..1ccf7d9 100644 --- a/oojs/oojs-ui/php/widgets/MultilineTextInputWidget.php +++ b/oojs/oojs-ui/php/widgets/MultilineTextInputWidget.php @@ -23,7 +23,8 @@ * @param number $config['maxLength'] Maximum allowed number of characters to input * @param int $config['rows'] If multiline, number of visible lines in textarea * @param bool $config['required'] Mark the field as required. - * Implies `indicator: 'required'`. (default: false) + * Implies `indicator: 'required'`. Note that `false` & setting `indicator: 'required' + * will result in no indicator shown. (default: false) */ public function __construct( array $config = [] ) { // Config initialization diff --git a/oojs/oojs-ui/php/widgets/TextInputWidget.php b/oojs/oojs-ui/php/widgets/TextInputWidget.php index 9b84d8e..f879c6a 100644 --- a/oojs/oojs-ui/php/widgets/TextInputWidget.php +++ b/oojs/oojs-ui/php/widgets/TextInputWidget.php @@ -51,7 +51,8 @@ * @param bool $config['multiline'] Allow multiple lines of text (default: false) * @param int $config['rows'] If multiline, number of visible lines in textarea * @param bool $config['required'] Mark the field as required. - * Implies `indicator: 'required'`. (default: false) + * Implies `indicator: 'required'`. Note that `false` & setting `indicator: 'required' + * will result in no indicator shown. (default: false) * @param bool $config['autocomplete'] If the field should support autocomplete * or not (default: true) * @param bool $config['spellcheck'] If the field should support spellcheck @@ -76,7 +77,7 @@ if ( $this->multiline && !( $this instanceof MultilineTextInputWidget ) ) { Element::warnDeprecation( - 'The TextInputWidget "multiline" option is deprecated as of OOjs UI v0.22.2. ' . + 'The TextInputWidget "multiline" option is deprecated as of OOUI v0.22.2. ' . 'Use MultilineTextInputWidget instead.' ); } -- To view, visit https://gerrit.wikimedia.org/r/404626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d0697f93fccd919fedd370b0c196af8a3046c50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vendor Gerrit-Branch: master Gerrit-Owner: VolkerE <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
