From: James D. Forrester Date: Sat, 22 Dec 2018 11:36:59 +0000 (+0000) Subject: Update OOUI to v0.30.0 X-Git-Tag: 1.34.0-rc.0~3189^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=221b03c2436dd99f395e22e09fd356e4d380e04d;p=lhc%2Fweb%2Fwiklou.git Update OOUI to v0.30.0 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.30.0 Bug: T150071 Bug: T150781 Bug: T183271 Bug: T190581 Bug: T196208 Bug: T208644 Bug: T208821 Bug: T210039 Bug: T210914 Bug: T211154 Bug: T211223 Bug: T212064 Bug: T212068 Bug: T212159 Bug: T212186 Bug: T212299 Bug: T212389 Depends-On: I00d3fa932de968019c6ad676237ed5e5077fb961 Change-Id: I00d3fa932de968019c6ad676237ed5e5077fb962 --- diff --git a/composer.json b/composer.json index 11573332f1..88f5daa590 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "guzzlehttp/promises": "1.3.1", "guzzlehttp/psr7": "1.5.0", "liuggio/statsd-php-client": "1.0.18", - "oojs/oojs-ui": "0.29.6", + "oojs/oojs-ui": "0.30.0", "pear/mail": "1.4.1", "pear/mail_mime": "1.10.2", "pear/net_smtp": "1.8.0", diff --git a/maintenance/resources/foreign-resources.yaml b/maintenance/resources/foreign-resources.yaml index b6f90176ac..ee5b8c34d4 100644 --- a/maintenance/resources/foreign-resources.yaml +++ b/maintenance/resources/foreign-resources.yaml @@ -112,8 +112,8 @@ oojs: ooui: type: tar - src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.29.6.tgz - integrity: sha384-Jl6ZzM7NN4noAFIVCsA8AKaC/Yt4pA1jlOXUh6Fx78LejAfevDzbNYEbbMo6WGvY + src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.30.0.tgz + integrity: sha384-MobtIvHeTSLhBXh5VNtjjmzTYhcj7bD9QlAMIZ6impdwFpx8jTA8cgpjtNaR9i2O dest: # Main stuff package/dist/oojs-ui-core.js{,.map.json}: diff --git a/resources/lib/ooui/History.md b/resources/lib/ooui/History.md index 31d71b581a..72c9bb65e2 100644 --- a/resources/lib/ooui/History.md +++ b/resources/lib/ooui/History.md @@ -1,4 +1,60 @@ # OOUI Release History +## v0.30.0 / 2018-12-19 +### Breaking changes +* [BREAKING CHANGE] Make non-continuous StackLayouts non-scrollable (Ed Sanders) +* [BREAKING CHANGE] icons: Drop 'advanced' icon, deprecated in v0.28.1 (Volker E.) + +### Features +* DropdownInputWidget: Add `title` config option to handle (Volker E.) + +### Deprecations +* [DEPRECATING CHANGE] Deprecate passing string IDs to infuse (Ed Sanders) +* [DEPRECATING CHANGE] PopupTagMultiselectWidget: Deprecate widget (Volker E.) +* [DEPRECATING CHANGE] indicators: Flag unused 'search' indicator as to be removed (Volker E.) + +### Styles +* WikimediaUI theme: Make up for inner 'down' indicator distance (Volker E.) +* Apex theme: Align functionality of ComboBoxInputWidget with WikimediaUI theme (Volker E.) +* Apex theme: DropdownWidget align CSS code to WikimediaUI theme (Volker E.) +* Apex theme: Unify distance on icon and label TextInputWidget (Volker E.) +* Apex theme: Use variable for `text-shadow` and unify (Volker E.) +* icons: Add 'robot' icon to 'content' pack (Volker E.) +* icons: Add localized 'bold' and 'italic' for Urdu (Tulsi Bhagat) +* build: Update 'wikimedia-ui-base' to latest (Volker E.) + +### Code +* Avoid HTML parsing (Ed Sanders) +* Avoid deprecated OO.ui.infuse( id ) (Ed Sanders) +* Use `-webkit-overflow-scrolling: touch` for scrollable things (Bartosz Dziewoński) +* ComboBoxInputWidget: Add 'label' and `aria-controls` attribute to button (Volker E.) +* ComboBoxInputWidget: `aria-expanded` needs to be set from intialization (Volker E.) +* DropDownWidget: Turn handle into `button` and add ARIA attribute (Volker E.) +* LookupElement: `aria-expanded` needs to be set from intialization (Volker E.) +* MenuTagMultiselectWidget: Clear input before adding tag (Thalia Chan) +* TagMultiselectWidget: Resize input when enabling (Thalia Chan) +* WindowManager: Move inline CSS to a class (Bartosz Dziewoński) +* Hygiene: Don't put a space after mixin names when defining them (Bartosz Dziewoński) +* i18n: Fix 'tooltip' in qqq descriptions (Volker E.) +* build: Bump various devDependencies to latest (James D. Forrester) +* build: Fix case of 'LESS' in comments (Volker E.) +* tests: Unbreak unit tests (Bartosz Dziewoński) +* demos: Add ARIA `role="main"` to PHP demo (Volker E.) +* demos: Add labels to remaining DropdownWidgets (Volker E.) +* demos: Don't showcase 'indicator' only buttons explicitly (Volker E.) +* demos: Ensure color contrast on special, non-production summary example (Volker E.) +* demos: Avoid implicit globals in infusion demo (Ed Sanders) +* demos: Let buttons in PHP demo carry screen reader labels (Volker E.) +* demos: Make the interface usable on mobile (Bartosz Dziewoński) +* demos: Reorder icons and indicators (Volker E.) +* demos: Use appropriate 'helpNotice' icon for location (Volker E.) +* demos: Use system monospace font stack following Style Guide (Volker E.) +* tutorials: Center box shadows (Ed Sanders) +* tutorials: Replace $(document).ready with $(fn) (Ed Sanders) +* tutorials: Select current page in dropdown (Ed Sanders) +* tutorials: Use CSS transitions for scroller (Ed Sanders) +* tutorials: Use system monospace font stack following Style Guide (Volker E.) + + ## v0.29.6 / 2018-12-04 ### Styles * Match BookletLayout menu's width and animations to Dialog's (Bartosz Dziewoński) diff --git a/resources/lib/ooui/i18n/da.json b/resources/lib/ooui/i18n/da.json index 0a75f1f393..f7881445da 100644 --- a/resources/lib/ooui/i18n/da.json +++ b/resources/lib/ooui/i18n/da.json @@ -24,6 +24,7 @@ "ooui-dialog-message-accept": "OK", "ooui-dialog-message-reject": "Afbryd", "ooui-dialog-process-error": "Noget gik galt", + "ooui-dialog-process-dismiss": "Luk", "ooui-dialog-process-retry": "Prøv igen", "ooui-dialog-process-continue": "Fortsæt", "ooui-selectfile-button-select": "Vælg en fil", diff --git a/resources/lib/ooui/i18n/en.json b/resources/lib/ooui/i18n/en.json index 7ccd746d77..4f925dbf51 100644 --- a/resources/lib/ooui/i18n/en.json +++ b/resources/lib/ooui/i18n/en.json @@ -29,6 +29,7 @@ "ooui-dialog-process-dismiss": "Dismiss", "ooui-dialog-process-retry": "Try again", "ooui-dialog-process-continue": "Continue", + "ooui-combobox-button-label": "Dropdown for combobox", "ooui-selectfile-button-select": "Select a file", "ooui-selectfile-not-supported": "File selection is not supported", "ooui-selectfile-placeholder": "No file is selected", diff --git a/resources/lib/ooui/i18n/mai.json b/resources/lib/ooui/i18n/mai.json new file mode 100644 index 0000000000..282019a87b --- /dev/null +++ b/resources/lib/ooui/i18n/mai.json @@ -0,0 +1,20 @@ +{ + "@metadata": { + "authors": [ + "Haribanshi" + ] + }, + "ooui-outline-control-move-down": "प्रविष्टि तर लजाबी", + "ooui-outline-control-remove": "शीर्षक सभकेँ हटाउ", + "ooui-toolbar-more": "आर", + "ooui-toolgroup-expand": "आर", + "ooui-toolgroup-collapse": "कम", + "ooui-item-remove": "हटाबी", + "ooui-dialog-message-accept": "ठीक अछि", + "ooui-dialog-message-reject": "रद्द करु", + "ooui-dialog-process-dismiss": "खारिज", + "ooui-dialog-process-retry": "पुनः प्रयास करू", + "ooui-dialog-process-continue": "आगु चलु", + "ooui-selectfile-button-select": "फ़ाइल चुरू", + "ooui-field-help": "सहायता" +} diff --git a/resources/lib/ooui/i18n/qqq.json b/resources/lib/ooui/i18n/qqq.json index 2e1d222bbe..884e4995c2 100644 --- a/resources/lib/ooui/i18n/qqq.json +++ b/resources/lib/ooui/i18n/qqq.json @@ -23,8 +23,8 @@ ] }, "ooui-outline-control-move-down": "Tooltip for a button that moves items in a list down one place", - "ooui-outline-control-move-up": "Tool tip for a button that moves items in a list up one place", - "ooui-outline-control-remove": "Tool tip for a button that removes items from a list.\n{{Identical|Remove item}}", + "ooui-outline-control-move-up": "Tooltip for a button that moves items in a list up one place", + "ooui-outline-control-remove": "Tooltip for a button that removes items from a list.\n{{Identical|Remove item}}", "ooui-toolbar-more": "Label for the toolbar group that contains a list of all other available tools.\n{{Identical|More}}", "ooui-toolgroup-expand": "Label for the fake tool that expands the full list of tools in a toolbar group.\n\nSee also:\n* {{msg-mw|Ooui-toolgroup-collapse}}\n{{Identical|More}}", "ooui-toolgroup-collapse": "Label for the fake tool that collapses the full list of tools in a toolbar group.\n\nSee also:\n* {{msg-mw|Ooui-toolgroup-expand}}\n{{Identical|Fewer}}", @@ -35,6 +35,7 @@ "ooui-dialog-process-dismiss": "Label for process dialog dismiss error button, visible when describing errors\n{{Identical|Dismiss}}", "ooui-dialog-process-retry": "Label for process dialog retry action button, visible when describing recoverable errors\n{{Identical|Try again}}", "ooui-dialog-process-continue": "Label for process dialog retry action button, visible when describing only warnings\n{{Identical|Continue}}", + "ooui-combobox-button-label": "Label for button in combobox input that triggers its dropdown", "ooui-selectfile-button-select": "Label for the file selection widget's select file button", "ooui-selectfile-not-supported": "Label for the file selection widget if file selection is not supported", "ooui-selectfile-placeholder": "Label for the file selection widget when no file is currently selected", diff --git a/resources/lib/ooui/i18n/ro.json b/resources/lib/ooui/i18n/ro.json index 69daa1806c..e8d0c05fe8 100644 --- a/resources/lib/ooui/i18n/ro.json +++ b/resources/lib/ooui/i18n/ro.json @@ -5,7 +5,8 @@ "Firilacroco", "Minisarm", "Stelistcristi", - "Gloria sah" + "Gloria sah", + "KlaudiuMihaila" ] }, "ooui-outline-control-move-down": "Mută elementul mai jos", @@ -23,5 +24,6 @@ "ooui-selectfile-button-select": "Alege un fișier", "ooui-selectfile-not-supported": "Selecția de fișiere nu este acceptată", "ooui-selectfile-placeholder": "Niciun fișier selectat", - "ooui-selectfile-dragdrop-placeholder": "Trageți fișierul aici" + "ooui-selectfile-dragdrop-placeholder": "Trageți fișierul aici", + "ooui-field-help": "Ajutor" } diff --git a/resources/lib/ooui/oojs-ui-apex.js b/resources/lib/ooui/oojs-ui-apex.js index 3a66bd8b22..0841424e10 100644 --- a/resources/lib/ooui/oojs-ui-apex.js +++ b/resources/lib/ooui/oojs-ui-apex.js @@ -1,12 +1,12 @@ /*! - * OOUI v0.29.6 + * OOUI v0.30.0 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2018 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2018-12-05T00:15:55Z + * Date: 2018-12-20T06:10:28Z */ ( function ( OO ) { diff --git a/resources/lib/ooui/oojs-ui-core-apex.css b/resources/lib/ooui/oojs-ui-core-apex.css index a0c1f3d35c..2fbde18f39 100644 --- a/resources/lib/ooui/oojs-ui-core-apex.css +++ b/resources/lib/ooui/oojs-ui-core-apex.css @@ -1,12 +1,12 @@ /*! - * OOUI v0.29.6 + * OOUI v0.30.0 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2018 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2018-12-05T00:16:02Z + * Date: 2018-12-20T06:10:36Z */ .oo-ui-element-hidden { display: none !important; @@ -258,6 +258,7 @@ -moz-box-sizing: border-box; box-sizing: border-box; min-height: 3.125em; + -webkit-overflow-scrolling: touch; } .oo-ui-floatableElement { @@ -573,6 +574,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { } .oo-ui-panelLayout-scrollable { overflow: auto; + -webkit-overflow-scrolling: touch; } .oo-ui-panelLayout-expanded { position: absolute; @@ -1227,9 +1229,9 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { .oo-ui-textInputWidget.oo-ui-widget-disabled input, .oo-ui-textInputWidget.oo-ui-widget-disabled textarea { color: #ccc; - text-shadow: 0 1px 1px #fff; border-color: #ddd; background-color: #f3f3f3; + text-shadow: 0 1px 1px #fff; } .oo-ui-textInputWidget.oo-ui-widget-disabled > .oo-ui-iconElement-icon, .oo-ui-textInputWidget.oo-ui-widget-disabled > .oo-ui-indicatorElement-indicator { @@ -1252,7 +1254,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { } .oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon { max-height: 2.5em; - margin-left: 0.45625em; + margin-left: 0.5em; } .oo-ui-textInputWidget.oo-ui-indicatorElement input, .oo-ui-textInputWidget.oo-ui-indicatorElement textarea { @@ -1331,25 +1333,32 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { vertical-align: middle; width: 100%; max-width: 50em; - background-color: #fff; margin-right: 0.5em; } .oo-ui-dropdownWidget-handle { position: relative; width: 100%; display: block; - white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; overflow: hidden; + font-family: inherit; + font-size: inherit; + text-align: left; text-overflow: ellipsis; + white-space: nowrap; cursor: default; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; +} +.oo-ui-dropdownWidget-handle::-moz-focus-inner { + border-color: transparent; + padding: 0; } .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle { cursor: pointer; @@ -1362,9 +1371,6 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { border: 1px solid #ccc; border-radius: 3px; } -.oo-ui-dropdownWidget-handle:hover { - border-color: #aaa; -} .oo-ui-dropdownWidget-handle:focus { outline: 0; } @@ -1386,15 +1392,21 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { right: 0; margin: 0 0.775em; } +.oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle { + background-color: #fff; +} +.oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:hover { + border-color: #aaa; +} .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:focus { border-color: #ace; box-shadow: 0 0 2px 2px #ace; } .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle { + background-color: #f3f3f3; color: #ccc; - text-shadow: 0 1px 1px #fff; border-color: #ddd; - background-color: #f3f3f3; + text-shadow: 0 1px 1px #fff; } .oo-ui-dropdownWidget.oo-ui-widget-disabled .oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator { opacity: 0.2; @@ -1457,14 +1469,14 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { position: absolute; top: 0; right: 0; - visibility: hidden; } -.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button { - padding: 0; -} -.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button .oo-ui-indicatorElement-indicator.oo-ui-indicator-down { - visibility: visible; - margin: 0.775em; +.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button, +.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button:hover:not( :focus ), +.oo-ui-buttonElement-pressed.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button, +.oo-ui-buttonElement-pressed.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button:focus:active { + border-color: transparent; + background: none; + box-shadow: none; } .oo-ui-comboBoxInputWidget-php .oo-ui-indicatorWidget { right: 0; diff --git a/resources/lib/ooui/oojs-ui-core-wikimediaui.css b/resources/lib/ooui/oojs-ui-core-wikimediaui.css index 43cea0c6a6..a8a090bf57 100644 --- a/resources/lib/ooui/oojs-ui-core-wikimediaui.css +++ b/resources/lib/ooui/oojs-ui-core-wikimediaui.css @@ -1,12 +1,12 @@ /*! - * OOUI v0.29.6 + * OOUI v0.30.0 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2018 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2018-12-05T00:16:02Z + * Date: 2018-12-20T06:10:36Z */ .oo-ui-element-hidden { display: none !important; @@ -395,6 +395,7 @@ -moz-box-sizing: border-box; box-sizing: border-box; min-height: 3.125em; + -webkit-overflow-scrolling: touch; } .oo-ui-floatableElement { @@ -721,6 +722,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { } .oo-ui-panelLayout-scrollable { overflow: auto; + -webkit-overflow-scrolling: touch; } .oo-ui-panelLayout-expanded { position: absolute; @@ -1723,18 +1725,26 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { position: relative; width: 100%; display: block; - white-space: nowrap; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; overflow: hidden; + font-family: inherit; + font-size: inherit; + text-align: left; text-overflow: ellipsis; + white-space: nowrap; cursor: default; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; +} +.oo-ui-dropdownWidget-handle::-moz-focus-inner { + border-color: transparent; + padding: 0; } .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle { cursor: pointer; @@ -1753,7 +1763,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout { left: 0.85714286em; } .oo-ui-dropdownWidget-handle .oo-ui-indicatorElement-indicator { - right: 0.85714286em; + right: 0.78571429em; } .oo-ui-dropdownWidget-handle .oo-ui-labelElement-label { line-height: 1.07142857em; diff --git a/resources/lib/ooui/oojs-ui-core.js b/resources/lib/ooui/oojs-ui-core.js index 64596751f8..ab9586f6b2 100644 --- a/resources/lib/ooui/oojs-ui-core.js +++ b/resources/lib/ooui/oojs-ui-core.js @@ -1,12 +1,12 @@ /*! - * OOUI v0.29.6 + * OOUI v0.30.0 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2018 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2018-12-05T00:15:55Z + * Date: 2018-12-20T06:10:28Z */ ( function ( OO ) { @@ -377,6 +377,8 @@ OO.ui.infuse = function ( idOrNode, config ) { 'ooui-dialog-process-retry': 'Try again', // Label for process dialog retry action button, visible when describing only warnings 'ooui-dialog-process-continue': 'Continue', + // Label for button in combobox input that triggers its dropdown + 'ooui-combobox-button-label': 'Dropdown for combobox', // Label for the file selection widget's select file button 'ooui-selectfile-button-select': 'Select a file', // Label for the file selection widget if file selection is not supported @@ -697,6 +699,13 @@ OO.ui.Element.static.tagName = 'div'; */ OO.ui.Element.static.infuse = function ( idOrNode, config ) { var obj = OO.ui.Element.static.unsafeInfuse( idOrNode, config, false ); + + if ( typeof idOrNode === 'string' ) { + // IDs deprecated since 0.29.7 + OO.ui.warnDeprecation( + 'Passing a string ID to infuse is deprecated. Use an HTMLElement or jQuery collection instead.' + ); + } // Verify that the type matches up. // FIXME: uncomment after T89721 is fixed, see T90929. /* @@ -1139,7 +1148,10 @@ OO.ui.Element.static.getScrollLeft = ( function () { var rtlScrollType = null; function test() { - var $definer = $( '
A
' ), + var $definer = $( '
' ).attr( { + dir: 'rtl', + style: 'font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;' + } ).text( 'A' ), definer = $definer[ 0 ]; $definer.appendTo( 'body' ); @@ -4148,7 +4160,7 @@ OO.ui.IndicatorWidget.static.tagName = 'span'; * label: 'plaintext label' * } ); * var label2 = new OO.ui.LabelWidget( { - * label: $( 'jQuery label' ) + * label: $( '' ).attr( 'href', 'default.html' ).text( 'jQuery label' ) * } ); * // Create a fieldset layout with fields for each example * var fieldset = new OO.ui.FieldsetLayout(); @@ -7971,7 +7983,7 @@ OO.ui.DropdownWidget = function OoUiDropdownWidget( config ) { OO.ui.DropdownWidget.parent.call( this, config ); // Properties (must be set before TabIndexedElement constructor call) - this.$handle = $( '' ); + this.$handle = $( '