Merge "Update OOUI to v0.42.1"

This commit is contained in:
jenkins-bot 2021-11-04 21:16:31 +00:00 committed by Gerrit Code Review
commit d9b4c1c0eb
47 changed files with 281 additions and 212 deletions

View file

@ -63,6 +63,7 @@ For notes on 1.36.x and older releases, see HISTORY.
* …
==== Changed external libraries ====
* Updated OOUI from v0.42.0 to v0.42.1
* Updated WVUI from v0.3.0 to v0.3.2
* Updated wikimedia/parsoid from v0.14.0-a14 to v0.15.0-a1.
* Updated wikimedia/purtle from 1.0.7 to 1.0.8.

View file

@ -36,7 +36,7 @@
"guzzlehttp/guzzle": "7.2.0",
"liuggio/statsd-php-client": "1.0.18",
"monolog/monolog": "2.2.0",
"oojs/oojs-ui": "0.42.0",
"oojs/oojs-ui": "0.42.1",
"pear/mail": "1.4.1",
"pear/mail_mime": "1.10.11",
"pear/net_smtp": "1.10.0",

View file

@ -241,8 +241,8 @@ oojs-router:
ooui:
type: tar
src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.42.0.tgz
integrity: sha384-tu/8BxaO7ZZItJFfcc8QYeLwD/dvLevmNPcBbwWc6GSNO1vUkG25+v68mfydCFJG
src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.42.1.tgz
integrity: sha384-vSN0wlVZbqXuK+STLIua57J99NzItHDbonUHS7sL8BuZ/kKkn0faO7ZGLOIVo/pV
dest:
# Main stuff

View file

@ -1,4 +1,32 @@
# OOUI Release History
## v0.42.1 / 2021-11-03
### Deprecating changes
* [DEPRECATING CHANGE] icons: Mark 'destructive' variant of close icon as deprecated (Kosta Harlan)
### Styles
* Center and size action buttons to match bar height (Ed Sanders)
* WikimediaUI theme: Add missing styles for disabled list tools (Ed Sanders)
* icons: Add 'database' icon (Luca Mauri)
* icons: Provide 'sandbox' in 'editing-advanced' pack (James D. Forrester)
### Code
* BookletLayout: Fix `BookletLayout.setPage()` emitting events twice (Thiemo Kreuz)
* BookletLayout: Reduce deep nesting in `BookletLayout.setPage()` (Thiemo Kreuz)
* BookletLayout: Remove bogus auto-scroll behavior from BookletLayout (Thiemo Kreuz)
* BookletLayout: Remove misplaced `.selectFirstSelectablePage()` calls (Thiemo Kreuz)
* IndexLayout: Fix documentation for class property (Umherirrender)
* PageLayout: Remove unused return from OO.ui.PageLayout.setupOutlineItem (Thiemo Kreuz)
* StackLayout: Fix StackLayout scrolling to the very top when removing items (Thiemo Kreuz)
* LabelElement: Remove non-existent parameter from 'labelChange' event doc (Bartosz Dziewoński)
* SelectWidget: Mark multiselect SelectWidget with `aria-multiselectable="true"` (Thiemo Kreuz)
* PHP Tag: Remove unreachable statement after trigger_error (Umherirrender)
* build: Updating composer dependencies (libraryupgrader)
* build: Updating mediawiki/mediawiki-codesniffer to 38.0.0 (libraryupgrader)
* build: Updating npm dependencies (libraryupgrader)
* icons: Remove unnecessary `fill-rule="…"` attributes from 2 icons (Thiemo Kreuz)
* tests: Allow ES6 syntax (Bartosz Dziewoński)
## v0.42.0 / 2021-08-18
### Breaking changes
* [BREAKING CHANGE] Remove obsolete browsers' vendor prefixes (Volker E.)

View file

@ -12,7 +12,22 @@
"ooui-outline-control-move-up": "Bəndi yuxarı apar",
"ooui-outline-control-remove": "Bəndi sil",
"ooui-toolbar-more": "Daha artıq",
"ooui-toolgroup-expand": "Daha çox",
"ooui-toolgroup-collapse": "Daha az",
"ooui-item-remove": "Sil",
"ooui-dialog-message-accept": "Oldu",
"ooui-dialog-message-reject": "İmtina",
"ooui-dialog-process-error": "Xəta baş verdi",
"ooui-dialog-process-dismiss": "Bağla",
"ooui-dialog-process-retry": "Yenidən cəhd et",
"ooui-dialog-process-continue": "Davam et",
"ooui-combobox-button-label": "Seçimləri dəyişin",
"ooui-selectfile-button-select": "Fayl seç",
"ooui-selectfile-dragdrop-placeholder": "Faylı buraya burax"
"ooui-selectfile-button-select-multiple": "Faylları seç",
"ooui-selectfile-not-supported": "Fayl seçimi dəstəklənmir",
"ooui-selectfile-placeholder": "Heç bir fayl seçilməyib",
"ooui-selectfile-dragdrop-placeholder": "Faylı buraya burax",
"ooui-selectfile-dragdrop-placeholder-multiple": "Faylları buraya burax",
"ooui-popup-widget-close-button-aria-label": "Bağla",
"ooui-field-help": "Kömək"
}

View file

@ -0,0 +1,29 @@
{
"@metadata": {
"authors": [
"Chinamoonroll"
]
},
"ooui-outline-control-move-down": "Gingsirang item kabetén",
"ooui-outline-control-move-up": "Gingsirang item kaduur",
"ooui-outline-control-remove": "Usap item",
"ooui-toolbar-more": "Malih",
"ooui-toolgroup-expand": "Malih",
"ooui-toolgroup-collapse": "Sacukupné",
"ooui-item-remove": "Usap",
"ooui-dialog-message-accept": "OK",
"ooui-dialog-message-reject": "Wangdé",
"ooui-dialog-process-error": "Wénten sané iwang",
"ooui-dialog-process-dismiss": "Tutup",
"ooui-dialog-process-retry": "Coba malih",
"ooui-dialog-process-continue": "Lanturang",
"ooui-combobox-button-label": "Buka/tutup opsi",
"ooui-selectfile-button-select": "Pilih aberkas",
"ooui-selectfile-button-select-multiple": "Pilih berkas",
"ooui-selectfile-not-supported": "Pamilihan berkas tan kadukung",
"ooui-selectfile-placeholder": "Nénten wénten berkas kapilih",
"ooui-selectfile-dragdrop-placeholder": "Genahang berkas driki",
"ooui-selectfile-dragdrop-placeholder-multiple": "Genahang berkas-berkas driki",
"ooui-popup-widget-close-button-aria-label": "Sineb",
"ooui-field-help": "Wantuan"
}

View file

@ -1,15 +0,0 @@
{
"@metadata": {
"authors": [
"Pierpao"
]
},
"ooui-dialog-message-accept": "OK",
"ooui-dialog-message-reject": "Cancel",
"ooui-dialog-process-dismiss": "Dismiss",
"ooui-dialog-process-retry": "Try again",
"ooui-dialog-process-continue": "Continue",
"ooui-selectfile-button-select": "Select a file",
"ooui-selectfile-not-supported": "File selection is not supported",
"ooui-selectfile-placeholder": "No file is selected"
}

View file

@ -12,6 +12,7 @@
"ooui-toolbar-more": "Veel",
"ooui-toolgroup-expand": "Veel",
"ooui-toolgroup-collapse": "Vähem",
"ooui-item-remove": "Eemalda",
"ooui-dialog-message-accept": "Sobib",
"ooui-dialog-message-reject": "Loobu",
"ooui-dialog-process-error": "Midagi läks valesti",

View file

@ -0,0 +1,29 @@
{
"@metadata": {
"authors": [
"Bashir Gwanki"
]
},
"ooui-outline-control-move-down": "Matsar da abu ƙasa",
"ooui-outline-control-move-up": "Matsar da abu sama",
"ooui-outline-control-remove": "Cire abu",
"ooui-toolbar-more": "Da Yawa, mai yawa",
"ooui-toolgroup-expand": "Mai Yawa",
"ooui-toolgroup-collapse": "Ƙarami",
"ooui-item-remove": "Cire",
"ooui-dialog-message-accept": "Amincewa",
"ooui-dialog-message-reject": "Sokewa",
"ooui-dialog-process-error": "Wani abu yayi kuskure",
"ooui-dialog-process-dismiss": "sallama",
"ooui-dialog-process-retry": "Sake gwadawa",
"ooui-dialog-process-continue": "Cigaba",
"ooui-combobox-button-label": "Canza zaɓuɓɓuka",
"ooui-selectfile-button-select": "Zaɓi fayil",
"ooui-selectfile-button-select-multiple": "Zaɓi fayiloli",
"ooui-selectfile-not-supported": "Ba a tallafawa zaɓin fayil",
"ooui-selectfile-placeholder": "Ba a zaɓi fayil ba",
"ooui-selectfile-dragdrop-placeholder": "Sauke fayil anan",
"ooui-selectfile-dragdrop-placeholder-multiple": "Sauke fayiloli anan",
"ooui-popup-widget-close-button-aria-label": "Rufe, kulle, kusa da",
"ooui-field-help": "Taimako"
}

View file

@ -21,5 +21,6 @@
"ooui-selectfile-button-select": "Selektar dokumento",
"ooui-selectfile-not-supported": "Dokumento-selekto ne esas suportata",
"ooui-selectfile-placeholder": "Nula dokumento selektesis",
"ooui-selectfile-dragdrop-placeholder": "Pozar dokumento hike"
"ooui-selectfile-dragdrop-placeholder": "Pozar dokumento hike",
"ooui-selectfile-dragdrop-placeholder-multiple": "Pozez arkivi hike"
}

View file

@ -11,5 +11,6 @@
"ooui-outline-control-move-down": "Sposta di sutta",
"ooui-outline-control-move-up": "Sposta di supra",
"ooui-toolbar-more": "Àutri cosi",
"ooui-item-remove": "Leva",
"ooui-field-help": "Aiutu"
}

View file

@ -13,11 +13,11 @@
"ooui-dialog-message-accept": "ٺيڪ",
"ooui-dialog-message-reject": "رد",
"ooui-dialog-process-error": "ڪا غلطي ٿي",
"ooui-dialog-process-dismiss": "برخاست ڪريو",
"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": "فائيل کي هتي ڪيرايو"
}

View file

@ -21,9 +21,13 @@
"ooui-dialog-process-dismiss": "Bỏ qua",
"ooui-dialog-process-retry": "Thử lại",
"ooui-dialog-process-continue": "Tiếp tục",
"ooui-combobox-button-label": "Bật/tắt tùy chọn",
"ooui-selectfile-button-select": "Chọn tập tin",
"ooui-selectfile-button-select-multiple": "Chọn các tập tin",
"ooui-selectfile-not-supported": "Không hỗ trợ việc chọn tập tin",
"ooui-selectfile-placeholder": "Không có tập tin nào được chọn",
"ooui-selectfile-dragdrop-placeholder": "Thả tập tin vào đây",
"ooui-selectfile-dragdrop-placeholder-multiple": "Thả các tập tin vào đây",
"ooui-popup-widget-close-button-aria-label": "Đóng",
"ooui-field-help": "Trợ giúp"
}

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {
@ -2805,7 +2805,6 @@ OO.initClass( OO.ui.mixin.LabelElement );
/**
* @event labelChange
* @param {string} value
*/
/* Static Properties */
@ -6929,7 +6928,10 @@ OO.ui.SelectWidget = function OoUiSelectWidget( config ) {
// Initialization
this.$element
.addClass( 'oo-ui-selectWidget oo-ui-selectWidget-unpressed' )
.attr( 'role', 'listbox' );
.attr( {
role: 'listbox',
'aria-multiselectable': this.multiselect.toString()
} );
this.setFocusOwner( this.$element );
if ( Array.isArray( config.items ) ) {
this.addItems( config.items );

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */
@ -244,6 +244,15 @@
.oo-ui-image-progressive.oo-ui-icon-articleRedirect {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/articleRedirect-ltr-progressive.svg);
}
.oo-ui-icon-database {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/database.svg);
}
.oo-ui-image-invert.oo-ui-icon-database {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/database-invert.svg);
}
.oo-ui-image-progressive.oo-ui-icon-database {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/database-progressive.svg);
}
.oo-ui-icon-die {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/die.svg);
}
@ -2266,6 +2275,15 @@
.oo-ui-image-progressive.oo-ui-icon-quotes {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/quotes-ltr-progressive.svg);
}
.oo-ui-icon-sandbox {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/sandbox.svg);
}
.oo-ui-image-invert.oo-ui-icon-sandbox {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/sandbox-invert.svg);
}
.oo-ui-image-progressive.oo-ui-icon-sandbox {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/sandbox-progressive.svg);
}
.oo-ui-icon-searchCaseSensitive {
background-image: /* @embed */ url(themes/wikimediaui/images/icons/searchCaseSensitive.svg);
}

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */
@ -564,10 +564,20 @@
.oo-ui-listToolGroup-tools .oo-ui-tool-active.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title {
color: #36c;
}
.oo-ui-listToolGroup.oo-ui-widget-disabled,
.oo-ui-listToolGroup-tools .oo-ui-tool.oo-ui-widget-disabled .oo-ui-tool-title {
color: #72777d;
}
.oo-ui-listToolGroup-tools .oo-ui-tool.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
.oo-ui-listToolGroup-tools .oo-ui-tool.oo-ui-widget-disabled .oo-ui-iconElement-icon {
opacity: 0.34;
}
.oo-ui-listToolGroup.oo-ui-widget-disabled {
color: #72777d;
}
.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator,
.oo-ui-listToolGroup.oo-ui-widget-disabled .oo-ui-iconElement-icon {
opacity: 0.34;
}
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {
@ -1277,16 +1277,13 @@ OO.ui.PageLayout.prototype.setOutlineItem = function ( outlineItem ) {
/**
* Set up the outline item.
*
* Use this method to customize the outline item (e.g., to add a label or outline level). To set or
* unset the outline item itself (with an {@link OO.ui.OutlineOptionWidget outline option} or
* Override this method to customize the outline item (e.g., to add a label or outline level). To
* set or unset the outline item itself (with an {@link OO.ui.OutlineOptionWidget outline option} or
* `null`), use the #setOutlineItem method instead.
*
* @param {OO.ui.OutlineOptionWidget} outlineItem Outline option widget to set up
* @chainable
* @return {OO.ui.PageLayout} The layout, for chaining
* @protected
*/
OO.ui.PageLayout.prototype.setupOutlineItem = function () {
return this;
};
/**
@ -1363,7 +1360,6 @@ OO.ui.StackLayout = function OoUiStackLayout( config ) {
this.$element.addClass( 'oo-ui-stackLayout' );
if ( this.continuous ) {
this.$element.addClass( 'oo-ui-stackLayout-continuous' );
this.$element.on( 'scroll', OO.ui.debounce( this.onScroll.bind( this ), 250 ) );
}
if ( Array.isArray( config.items ) ) {
this.addItems( config.items );
@ -1385,72 +1381,8 @@ OO.mixinClass( OO.ui.StackLayout, OO.ui.mixin.GroupElement );
* @param {OO.ui.Layout|null} item Current panel or `null` if no panel is shown
*/
/**
* When used in continuous mode, this event is emitted when the user scrolls down
* far enough such that currentItem is no longer visible.
*
* @event visibleItemChange
* @param {OO.ui.PanelLayout} panel The next visible item in the layout
*/
/* Methods */
/**
* Handle scroll events from the layout element
*
* @param {jQuery.Event} e
* @fires visibleItemChange
*/
OO.ui.StackLayout.prototype.onScroll = function () {
var currentRect, currentIndex, newIndex, containerRect,
len = this.items.length;
if ( !this.currentItem ) {
// onScroll should never be triggered while there are no items, but this event is debounced.
return;
}
currentIndex = this.items.indexOf( this.currentItem );
newIndex = currentIndex;
containerRect = this.$element[ 0 ].getBoundingClientRect();
if ( !containerRect || ( !containerRect.top && !containerRect.bottom ) ) {
// Can't get bounding rect, possibly not attached.
return;
}
function getRect( item ) {
return item.$element[ 0 ].getBoundingClientRect();
}
function isVisible( item ) {
var rect = getRect( item );
return rect.bottom > containerRect.top && rect.top < containerRect.bottom;
}
currentRect = getRect( this.currentItem );
if ( currentRect.bottom < containerRect.top ) {
// Scrolled down past current item
while ( ++newIndex < len ) {
if ( isVisible( this.items[ newIndex ] ) ) {
break;
}
}
} else if ( currentRect.top > containerRect.bottom ) {
// Scrolled up past current item
while ( --newIndex >= 0 ) {
if ( isVisible( this.items[ newIndex ] ) ) {
break;
}
}
}
if ( newIndex !== currentIndex ) {
this.emit( 'visibleItemChange', this.items[ newIndex ] );
}
};
/**
* Get the current panel.
*
@ -1509,18 +1441,28 @@ OO.ui.StackLayout.prototype.addItems = function ( items, index ) {
* Removed panels are detached from the DOM, not removed, so that they may be reused. To remove all
* panels, you may wish to use the #clearItems method instead.
*
* @param {OO.ui.Layout[]} items Panels to remove
* @param {OO.ui.Layout[]} itemsToRemove Panels to remove
* @chainable
* @return {OO.ui.StackLayout} The layout, for chaining
* @fires set
*/
OO.ui.StackLayout.prototype.removeItems = function ( items ) {
// Mixin method
OO.ui.mixin.GroupElement.prototype.removeItems.call( this, items );
OO.ui.StackLayout.prototype.removeItems = function ( itemsToRemove ) {
var isCurrentItemRemoved = itemsToRemove.indexOf( this.currentItem ) !== -1,
nextItem;
if ( items.indexOf( this.currentItem ) !== -1 ) {
if ( isCurrentItemRemoved ) {
var i = this.items.indexOf( this.currentItem );
do {
nextItem = this.items[ ++i ];
} while ( nextItem && itemsToRemove.indexOf( nextItem ) !== -1 );
}
// Mixin method
OO.ui.mixin.GroupElement.prototype.removeItems.call( this, itemsToRemove );
if ( isCurrentItemRemoved ) {
if ( this.items.length ) {
this.setItem( this.items[ 0 ] );
this.setItem( nextItem || this.items[ this.items.length - 1 ] );
} else {
this.unsetCurrentItem();
}
@ -1973,10 +1915,6 @@ OO.ui.BookletLayout = function OoUiBookletLayout( config ) {
this.outlineSelectWidget.connect( this, {
select: 'onOutlineSelectWidgetSelect'
} );
this.scrolling = false;
this.stackLayout.connect( this, {
visibleItemChange: 'onStackLayoutVisibleItemChange'
} );
}
if ( this.autoFocus ) {
// Event 'focus' does not bubble, but 'focusin' does
@ -2050,22 +1988,6 @@ OO.ui.BookletLayout.prototype.onStackLayoutFocus = function ( e ) {
}
};
/**
* Handle visibleItemChange events from the stackLayout
*
* The next visible page is set as the current page by selecting it
* in the outline
*
* @param {OO.ui.PageLayout} page The next visible page in the layout
*/
OO.ui.BookletLayout.prototype.onStackLayoutVisibleItemChange = function ( page ) {
// Set a flag to so that the resulting call to #onStackLayoutSet doesn't
// try and scroll the item into view again.
this.scrolling = true;
this.outlineSelectWidget.selectItemByData( page.getName() );
this.scrolling = false;
};
/**
* Handle stack layout set events.
*
@ -2333,7 +2255,7 @@ OO.ui.BookletLayout.prototype.addPages = function ( pages, index ) {
if ( this.outlined && items.length ) {
this.outlineSelectWidget.addItems( items, index );
this.selectFirstSelectablePage();
// It's impossible to lose a selection here. Selecting something else is business logic.
}
this.stackLayout.addItems( pages, index );
this.emit( 'add', pages, index );
@ -2353,20 +2275,20 @@ OO.ui.BookletLayout.prototype.addPages = function ( pages, index ) {
*/
OO.ui.BookletLayout.prototype.removePages = function ( pages ) {
var i, len, name, page,
items = [];
itemsToRemove = [];
for ( i = 0, len = pages.length; i < len; i++ ) {
page = pages[ i ];
name = page.getName();
delete this.pages[ name ];
if ( this.outlined ) {
items.push( this.outlineSelectWidget.findItemFromData( name ) );
itemsToRemove.push( this.outlineSelectWidget.findItemFromData( name ) );
page.setOutlineItem( null );
}
}
if ( this.outlined && items.length ) {
this.outlineSelectWidget.removeItems( items );
this.selectFirstSelectablePage();
if ( itemsToRemove.length ) {
this.outlineSelectWidget.removeItems( itemsToRemove );
// We might loose the selection here, but what to select instead is business logic.
}
this.stackLayout.removeItems( pages );
this.emit( 'remove', pages );
@ -2409,19 +2331,25 @@ OO.ui.BookletLayout.prototype.clearPages = function () {
* @param {string} name Symbolic name of page
*/
OO.ui.BookletLayout.prototype.setPage = function ( name ) {
var selectedItem,
$focused,
page = this.pages[ name ],
previousPage = this.currentPageName && this.pages[ this.currentPageName ];
var page = this.pages[ name ];
if ( !page || name === this.currentPageName ) {
return;
}
var previousPage = this.pages[ this.currentPageName ];
this.currentPageName = name;
if ( name !== this.currentPageName ) {
if ( this.outlined ) {
selectedItem = this.outlineSelectWidget.findSelectedItem();
var selectedItem = this.outlineSelectWidget.findSelectedItem();
if ( selectedItem && selectedItem.getData() !== name ) {
// Warning! This triggers a "select" event and the .onOutlineSelectWidgetSelect()
// handler, which calls .setPage() a second time. Make sure .currentPageName is set to
// break this loop.
this.outlineSelectWidget.selectItemByData( name );
}
}
if ( page ) {
var $focused;
if ( previousPage ) {
previousPage.setActive( false );
// Blur anything focused if the next page doesn't have anything focusable.
@ -2429,8 +2357,7 @@ OO.ui.BookletLayout.prototype.setPage = function ( name ) {
// focused this blur happens automatically). If the layout is non-continuous, this
// check is meaningless because the next page is not visible yet and thus can't
// hold focus.
if (
this.autoFocus &&
if ( this.autoFocus &&
!OO.ui.isMobile() &&
this.stackLayout.continuous &&
OO.ui.findFocusable( page.$element ).length !== 0
@ -2441,7 +2368,6 @@ OO.ui.BookletLayout.prototype.setPage = function ( name ) {
}
}
}
this.currentPageName = name;
page.setActive( true );
this.stackLayout.setItem( page );
if ( !this.stackLayout.continuous && previousPage ) {
@ -2454,8 +2380,6 @@ OO.ui.BookletLayout.prototype.setPage = function ( name ) {
}
}
this.emit( 'set', page );
}
}
};
/**

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:45:01Z
* Date: 2021-11-04T01:18:47Z
*/
/* stylelint-disable selector-no-vendor-prefix */
/* stylelint-enable selector-no-vendor-prefix */
@ -357,7 +357,9 @@
padding-left: 3.14285714em;
}
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-actionWidget.oo-ui-labelElement > .oo-ui-buttonElement-button {
padding: 11px 12px;
min-height: 3.14285714em;
line-height: 3.14285714em;
padding: 0 12px;
}
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-actionWidget.oo-ui-labelElement.oo-ui-iconElement > .oo-ui-buttonElement-button {
padding-left: 2.42857143em;

View file

@ -1,12 +1,12 @@
/*!
* OOUI v0.42.0
* OOUI v0.42.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 20112021 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2021-08-19T04:44:48Z
* Date: 2021-11-04T01:18:37Z
*/
( function ( OO ) {

View file

@ -50,6 +50,9 @@
"rtl": "../wikimediaui/images/icons/articleRedirect-rtl.svg"
}
},
"database": {
"file": "../wikimediaui/images/icons/database.svg"
},
"die": {
"file": "../wikimediaui/images/icons/die.svg"
},

View file

@ -92,6 +92,9 @@
"rtl": "../wikimediaui/images/icons/quotes-rtl.svg"
}
},
"sandbox": {
"file": "../wikimediaui/images/icons/sandbox.svg"
},
"searchCaseSensitive": {
"file": "../wikimediaui/images/icons/searchCaseSensitive.svg"
},

View file

@ -73,6 +73,9 @@
"rtl": "images/icons/articleRedirect-rtl.svg"
}
},
"database": {
"file": "../wikimediaui/images/icons/database.svg"
},
"die": {
"file": "images/icons/die.svg"
},

View file

@ -115,6 +115,9 @@
"rtl": "images/icons/quotes-rtl.svg"
}
},
"sandbox": {
"file": "images/icons/sandbox.svg"
},
"searchCaseSensitive": {
"file": "images/icons/searchCaseSensitive.svg"
},

View file

@ -53,7 +53,8 @@
},
"close": {
"file": "images/icons/close.svg",
"variants": [ "destructive" ]
"variants": [ "destructive" ],
"deprecated": "The 'destructive' variant is deprecated since version 0.42.1."
},
"ellipsis": {
"file": "images/icons/ellipsis.svg"

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>database</title><path fill="#fff" d="M4 1L2 3v2h16V3l-2-2H4zm0 18l-2-2v-2h16v2l-2 2H4zM2 8h16v4H2z"/></svg>

After

Width:  |  Height:  |  Size: 235 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>database</title><path fill="#36c" d="M4 1L2 3v2h16V3l-2-2H4zm0 18l-2-2v-2h16v2l-2 2H4zM2 8h16v4H2z"/></svg>

After

Width:  |  Height:  |  Size: 235 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>database</title><path d="M4 1L2 3v2h16V3l-2-2H4zm0 18l-2-2v-2h16v2l-2 2H4zM2 8h16v4H2z"/></svg>

After

Width:  |  Height:  |  Size: 223 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><g fill="#fff"><path fill-rule="evenodd" d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z" clip-rule="evenodd"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><g fill="#fff"><path d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></g></svg>

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 399 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><g fill="#36c"><path fill-rule="evenodd" d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z" clip-rule="evenodd"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><g fill="#36c"><path d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></g></svg>

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 399 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><path fill-rule="evenodd" d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z" clip-rule="evenodd"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>optical character recognition</title><path d="M3 1a2 2 0 00-2 2v4.5h2V3h5V1H3zM1 17v-5.5h2V17h5v2H3a2 2 0 01-2-2zm11 0v2h5a2 2 0 002-2v-5.5h-2V17h-5zm5-9.5h2V3a2 2 0 00-2-2h-5v2h5v4.5z"/><path d="M6 5h8v1H6zM5 8h10v1H5zm1 3h8v1H6zm-1 3h10v1H5z"/></svg>

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 380 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>sandbox</title><path fill="#fff" d="M8 12V9l6-6 3 3-6 6H8zm10-7l-3-3 2-2 3 3-2 2zM8 2h2v2H8zM4 2h2v2H4zM0 3a1 1 0 011-1h1v2H0V3zm0 3h2v2H0zm0 4h2v2H0zm0 4h2v2H0zm0 4h2v2H1a1 1 0 01-1-1v-1zm4 0h2v2H4zm4 0h2v2H8zm4 0h2v1a1 1 0 01-1 1h-1v-2zm0-4h2v2h-2z"/></svg>

After

Width:  |  Height:  |  Size: 387 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>sandbox</title><path fill="#36c" d="M8 12V9l6-6 3 3-6 6H8zm10-7l-3-3 2-2 3 3-2 2zM8 2h2v2H8zM4 2h2v2H4zM0 3a1 1 0 011-1h1v2H0V3zm0 3h2v2H0zm0 4h2v2H0zm0 4h2v2H0zm0 4h2v2H1a1 1 0 01-1-1v-1zm4 0h2v2H4zm4 0h2v2H8zm4 0h2v1a1 1 0 01-1 1h-1v-2zm0-4h2v2h-2z"/></svg>

After

Width:  |  Height:  |  Size: 387 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>sandbox</title><path d="M8 12V9l6-6 3 3-6 6H8zm10-7l-3-3 2-2 3 3-2 2zM8 2h2v2H8zM4 2h2v2H4zM0 3a1 1 0 011-1h1v2H0V3zm0 3h2v2H0zm0 4h2v2H0zm0 4h2v2H0zm0 4h2v2H1a1 1 0 01-1-1v-1zm4 0h2v2H4zm4 0h2v2H8zm4 0h2v1a1 1 0 01-1 1h-1v-2zm0-4h2v2h-2z"/></svg>

After

Width:  |  Height:  |  Size: 375 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path fill="#fff" fill-rule="evenodd" d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM13 8A5 5 0 113 8a5 5 0 0110 0z"/></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path fill="#fff" d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM3 8a5 5 0 1010 0A5 5 0 103 8z"/></svg>

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 253 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path fill="#36c" fill-rule="evenodd" d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM13 8A5 5 0 113 8a5 5 0 0110 0z"/></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path fill="#36c" d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM3 8a5 5 0 1010 0A5 5 0 103 8z"/></svg>

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 253 B

View file

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path fill-rule="evenodd" d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM13 8A5 5 0 113 8a5 5 0 0110 0z"/></svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>search</title><path d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4-5.4-5.4zM3 8a5 5 0 1010 0A5 5 0 103 8z"/></svg>

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 241 B