Update OOUI to v0.33.2

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.33.2

Bug: T158708
Bug: T226780
Bug: T227040
Bug: T227275
Depends-on: I3d7a990d0f32734a9048ec55d22035150a562f04
Change-Id: I4287a6f2e950a8ad0511b24f4a1c8074e4f427b3
This commit is contained in:
Volker E 2019-07-10 07:07:23 -07:00 committed by James D. Forrester
parent ad4c7e66d9
commit 574bed63bf
21 changed files with 250 additions and 104 deletions

View file

@ -74,7 +74,7 @@ For notes on 1.33.x and older releases, see HISTORY.
==== Changed external libraries ==== ==== Changed external libraries ====
* Updated Mustache from 1.0.0 to v3.0.1. * Updated Mustache from 1.0.0 to v3.0.1.
* Updated OOUI from v0.31.3 to v0.33.1. * Updated OOUI from v0.31.3 to v0.33.2.
* Updated composer/semver from 1.4.2 to 1.5.0. * Updated composer/semver from 1.4.2 to 1.5.0.
* Updated composer/spdx-licenses from 1.4.0 to 1.5.1 (dev-only). * Updated composer/spdx-licenses from 1.4.0 to 1.5.1 (dev-only).
* Updated mediawiki/codesniffer from 25.0.0 to 26.0.0 (dev-only). * Updated mediawiki/codesniffer from 25.0.0 to 26.0.0 (dev-only).

View file

@ -27,7 +27,7 @@
"ext-xml": "*", "ext-xml": "*",
"guzzlehttp/guzzle": "6.3.3", "guzzlehttp/guzzle": "6.3.3",
"liuggio/statsd-php-client": "1.0.18", "liuggio/statsd-php-client": "1.0.18",
"oojs/oojs-ui": "0.33.1", "oojs/oojs-ui": "0.33.2",
"pear/mail": "1.4.1", "pear/mail": "1.4.1",
"pear/mail_mime": "1.10.2", "pear/mail_mime": "1.10.2",
"pear/net_smtp": "1.8.1", "pear/net_smtp": "1.8.1",

View file

@ -249,8 +249,8 @@ oojs-router:
ooui: ooui:
type: tar type: tar
src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.33.1.tgz src: https://registry.npmjs.org/oojs-ui/-/oojs-ui-0.33.2.tgz
integrity: sha384-fv71jivIYuDB5peWKZ/msXftorlKL8P4ZBILxigkvFnuuW8eqT1s17tR0XxvRNIt integrity: sha384-GDh1OBtwuGUcH+VHwqILri0AeE8tDSNwYHu0TQBaXqQJq7bG5lgE3ix70mgFe/R7
dest: dest:
# Main stuff # Main stuff

View file

@ -1,4 +1,22 @@
# OOUI Release History # OOUI Release History
## v0.33.2 / 2019-07-09
### Styles
* MessageWidget: Amend icon position and `margin` handling (Volker E.)
* ProcessDialog: Fix icon+label `padding` (Ed Sanders)
* ProcessDialog: Fix title alignment on mobile (Ed Sanders)
* ProcessDialog: Match styling of error messages to new MessageWidget design (Bartosz Dziewoński)
### Code
* Avoid Sizzle selectors (Ed Sanders)
* Element: Implement `#setScrollLeft` and use where needed (Bartosz Dziewoński)
* Scroll tab to centre on mobile (Ed Sanders)
* demos: Fix PositionSelectWidget radio size (Bartosz Dziewoński)
* demos: Fix PositionSelectWidget styling in RTL (Ed Sanders)
* demos: Remove unnecessary 'flags' config options (Bartosz Dziewoński)
* docs: Fix MenuSelectWidget 'width' documentation (Bartosz Dziewoński)
* docs: Fix weird whitespace in code example (Bartosz Dziewoński)
## v0.33.1 / 2019-07-03 ## v0.33.1 / 2019-07-03
### Styles ### Styles
* MessageWidget: Use emphasized color for boxed 'error' type (Volker E.) * MessageWidget: Use emphasized color for boxed 'error' type (Volker E.)

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-element-hidden { .oo-ui-element-hidden {
display: none !important; display: none !important;
@ -493,6 +493,13 @@
margin: 0.25em 0 0 0.25em; margin: 0.25em 0 0 0.25em;
padding: 0; padding: 0;
} }
.oo-ui-fieldLayout-messages > .oo-ui-messageWidget {
margin-left: 0.15625em;
margin-right: 0.15625em;
}
.oo-ui-fieldLayout-messages > .oo-ui-messageWidget:first-child {
margin-top: 0.3125em;
}
.oo-ui-actionFieldLayout-input, .oo-ui-actionFieldLayout-input,
.oo-ui-actionFieldLayout-button { .oo-ui-actionFieldLayout-button {
@ -749,12 +756,21 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
padding: 0.3125em 0.78125em;
font-weight: bold; font-weight: bold;
} }
.oo-ui-messageWidget .oo-ui-labelElement-label { .oo-ui-messageWidget .oo-ui-labelElement-label {
display: block; display: block;
} }
.oo-ui-messageWidget .oo-ui-iconElement-icon {
display: block;
float: left;
margin: 0;
}
.oo-ui-messageWidget .oo-ui-labelElement-label {
margin-top: 0.15625em;
margin-left: 2.5em;
line-height: 1.4;
}
.oo-ui-messageWidget.oo-ui-messageWidget-block { .oo-ui-messageWidget.oo-ui-messageWidget-block {
border: 1px solid; border: 1px solid;
padding: 1.5625em 1.875em; padding: 1.5625em 1.875em;
@ -781,15 +797,8 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
.oo-ui-messageWidget.oo-ui-flaggedElement-success:not( .oo-ui-messageWidget-block ) { .oo-ui-messageWidget.oo-ui-flaggedElement-success:not( .oo-ui-messageWidget-block ) {
color: #34782b; color: #34782b;
} }
.oo-ui-messageWidget .oo-ui-iconElement-icon { .oo-ui-messageWidget + .oo-ui-messageWidget {
display: block; margin-top: 0.625em;
float: left;
margin: 0;
}
.oo-ui-messageWidget .oo-ui-labelElement-label {
margin-top: 0.15625em;
margin-left: 2.5em;
line-height: 1.4;
} }
.oo-ui-iconWidget { .oo-ui-iconWidget {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-element-hidden { .oo-ui-element-hidden {
display: none !important; display: none !important;
@ -662,9 +662,15 @@
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
max-width: 50em; max-width: 50em;
margin: 0;
padding: 0.28571429em 0; padding: 0.28571429em 0;
} }
.oo-ui-fieldLayout-messages > .oo-ui-messageWidget {
margin-left: 0.85714286em;
margin-right: 0.85714286em;
}
.oo-ui-fieldLayout-messages > .oo-ui-messageWidget:first-child {
margin-top: 0.28571429em;
}
.oo-ui-fieldLayout-disabled > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header > .oo-ui-labelElement-label { .oo-ui-fieldLayout-disabled > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header > .oo-ui-labelElement-label {
color: #72777d; color: #72777d;
} }
@ -945,16 +951,24 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
padding: 0.28571429em 0.85714286em;
font-weight: bold; font-weight: bold;
} }
.oo-ui-messageWidget .oo-ui-labelElement-label { .oo-ui-messageWidget .oo-ui-labelElement-label {
display: block; display: block;
} }
.oo-ui-messageWidget > .oo-ui-iconElement-icon {
background-position: 0 0;
}
.oo-ui-messageWidget .oo-ui-labelElement-label {
margin-left: 2em;
}
.oo-ui-messageWidget.oo-ui-messageWidget-block { .oo-ui-messageWidget.oo-ui-messageWidget-block {
border: 1px solid; border: 1px solid;
padding: 1.42857143em 1.71428571em; padding: 1.42857143em 1.71428571em;
} }
.oo-ui-messageWidget.oo-ui-messageWidget-block > .oo-ui-iconElement-icon {
background-position: 0 1.42857143em;
}
.oo-ui-messageWidget.oo-ui-messageWidget-block.oo-ui-flaggedElement-error { .oo-ui-messageWidget.oo-ui-messageWidget-block.oo-ui-flaggedElement-error {
background-color: #fee7e6; background-color: #fee7e6;
border-color: #d33; border-color: #d33;
@ -977,8 +991,8 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
.oo-ui-messageWidget.oo-ui-flaggedElement-success:not( .oo-ui-messageWidget-block ) { .oo-ui-messageWidget.oo-ui-flaggedElement-success:not( .oo-ui-messageWidget-block ) {
color: #14866d; color: #14866d;
} }
.oo-ui-messageWidget .oo-ui-labelElement-label { .oo-ui-messageWidget + .oo-ui-messageWidget {
margin-left: 2em; margin-top: 0.57142857em;
} }
.oo-ui-iconWidget { .oo-ui-iconWidget {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {
@ -1052,7 +1052,7 @@ OO.ui.Element.static.getDimensions = function ( el ) {
borders: { top: 0, left: 0, bottom: 0, right: 0 }, borders: { top: 0, left: 0, bottom: 0, right: 0 },
scroll: { scroll: {
top: $win.scrollTop(), top: $win.scrollTop(),
left: $win.scrollLeft() left: OO.ui.Element.static.getScrollLeft( win )
}, },
scrollbar: { right: 0, bottom: 0 }, scrollbar: { right: 0, bottom: 0 },
rect: { rect: {
@ -1068,7 +1068,7 @@ OO.ui.Element.static.getDimensions = function ( el ) {
borders: this.getBorders( el ), borders: this.getBorders( el ),
scroll: { scroll: {
top: $el.scrollTop(), top: $el.scrollTop(),
left: $el.scrollLeft() left: OO.ui.Element.static.getScrollLeft( el )
}, },
scrollbar: { scrollbar: {
right: $el.innerWidth() - el.clientWidth, right: $el.innerWidth() - el.clientWidth,
@ -1079,29 +1079,12 @@ OO.ui.Element.static.getDimensions = function ( el ) {
} }
}; };
/** ( function () {
* Get the number of pixels that an element's content is scrolled to the left.
*
* Adapted from <https://github.com/othree/jquery.rtl-scroll-type>.
* Original code copyright 2012 Wei-Ko Kao, licensed under the MIT License.
*
* This function smooths out browser inconsistencies (nicely described in the README at
* <https://github.com/othree/jquery.rtl-scroll-type>) and produces a result consistent
* with Firefox's 'scrollLeft', which seems the sanest.
*
* @static
* @method
* @param {HTMLElement|Window} el Element to measure
* @return {number} Scroll position from the left.
* If the element's direction is LTR, this is a positive number between `0` (initial scroll
* position) and `el.scrollWidth - el.clientWidth` (furthest possible scroll position).
* If the element's direction is RTL, this is a negative number between `0` (initial scroll
* position) and `-el.scrollWidth + el.clientWidth` (furthest possible scroll position).
*/
OO.ui.Element.static.getScrollLeft = ( function () {
var rtlScrollType = null; var rtlScrollType = null;
function test() { // Adapted from <https://github.com/othree/jquery.rtl-scroll-type>.
// Original code copyright 2012 Wei-Ko Kao, licensed under the MIT License.
function rtlScrollTypeTest() {
var $definer = $( '<div>' ).attr( { var $definer = $( '<div>' ).attr( {
dir: 'rtl', dir: 'rtl',
style: 'font-size: 14px; width: 4px; height: 1px; position: absolute; top: -1000px; overflow: scroll;' style: 'font-size: 14px; width: 4px; height: 1px; position: absolute; top: -1000px; overflow: scroll;'
@ -1125,28 +1108,113 @@ OO.ui.Element.static.getScrollLeft = ( function () {
$definer.remove(); $definer.remove();
} }
return function getScrollLeft( el ) { function isRoot( el ) {
var isRoot = el.window === el || return el.window === el ||
el === el.ownerDocument.body || el === el.ownerDocument.body ||
el === el.ownerDocument.documentElement, el === el.ownerDocument.documentElement;
scrollLeft = isRoot ? $( window ).scrollLeft() : el.scrollLeft, }
// All browsers use the correct scroll type ('negative') on the root, so don't
// do any fixups when looking at the root element /**
direction = isRoot ? 'ltr' : $( el ).css( 'direction' ); * Convert native `scrollLeft` value to a value consistent between browsers. See #getScrollLeft.
* @param {number} nativeOffset Native `scrollLeft` value
* @param {HTMLElement|Window} el Element from which the value was obtained
* @return {number}
*/
OO.ui.Element.static.computeNormalizedScrollLeft = function ( nativeOffset, el ) {
// All browsers use the correct scroll type ('negative') on the root, so don't
// do any fixups when looking at the root element
var direction = isRoot( el ) ? 'ltr' : $( el ).css( 'direction' );
if ( direction === 'rtl' ) { if ( direction === 'rtl' ) {
if ( rtlScrollType === null ) { if ( rtlScrollType === null ) {
test(); rtlScrollTypeTest();
} }
if ( rtlScrollType === 'reverse' ) { if ( rtlScrollType === 'reverse' ) {
scrollLeft = -scrollLeft; return -nativeOffset;
} else if ( rtlScrollType === 'default' ) { } else if ( rtlScrollType === 'default' ) {
scrollLeft = scrollLeft - el.scrollWidth + el.clientWidth; return nativeOffset - el.scrollWidth + el.clientWidth;
} }
} }
return nativeOffset;
};
/**
* Convert our normalized `scrollLeft` value to a value for current browser. See #getScrollLeft.
* @param {number} normalizedOffset Normalized `scrollLeft` value
* @param {HTMLElement|Window} el Element on which the value will be set
* @return {number}
*/
OO.ui.Element.static.computeNativeScrollLeft = function ( normalizedOffset, el ) {
// All browsers use the correct scroll type ('negative') on the root, so don't
// do any fixups when looking at the root element
var direction = isRoot( el ) ? 'ltr' : $( el ).css( 'direction' );
if ( direction === 'rtl' ) {
if ( rtlScrollType === null ) {
rtlScrollTypeTest();
}
if ( rtlScrollType === 'reverse' ) {
return -normalizedOffset;
} else if ( rtlScrollType === 'default' ) {
return normalizedOffset + el.scrollWidth - el.clientWidth;
}
}
return normalizedOffset;
};
/**
* Get the number of pixels that an element's content is scrolled to the left.
*
* This function smooths out browser inconsistencies (nicely described in the README at
* <https://github.com/othree/jquery.rtl-scroll-type>) and produces a result consistent
* with Firefox's 'scrollLeft', which seems the sanest.
*
* (Firefox's scrollLeft handling is nice because it increases from left to right, consistently
* with `getBoundingClientRect().left` and related APIs; because initial value is zero, so
* resetting it is easy; because adapting a hardcoded scroll position to a symmetrical RTL
* interface requires just negating it, rather than involving `clientWidth` and `scrollWidth`;
* and because if you mess up and don't adapt your code to RTL, it will scroll to the beginning
* rather than somewhere randomly in the middle but not where you wanted.)
*
* @static
* @method
* @param {HTMLElement|Window} el Element to measure
* @return {number} Scroll position from the left.
* If the element's direction is LTR, this is a positive number between `0` (initial scroll
* position) and `el.scrollWidth - el.clientWidth` (furthest possible scroll position).
* If the element's direction is RTL, this is a negative number between `0` (initial scroll
* position) and `-el.scrollWidth + el.clientWidth` (furthest possible scroll position).
*/
OO.ui.Element.static.getScrollLeft = function ( el ) {
var scrollLeft = isRoot( el ) ? $( window ).scrollLeft() : el.scrollLeft;
scrollLeft = OO.ui.Element.static.computeNormalizedScrollLeft( scrollLeft, el );
return scrollLeft; return scrollLeft;
}; };
/**
* Set the number of pixels that an element's content is scrolled to the left.
*
* See #getScrollLeft.
*
* @static
* @method
* @param {HTMLElement|Window} el Element to scroll (and to use in calculations)
* @param {number} scrollLeft Scroll position from the left.
* If the element's direction is LTR, this must be a positive number between `0` (initial scroll
* position) and `el.scrollWidth - el.clientWidth` (furthest possible scroll position).
* If the element's direction is RTL, this must be a negative number between `0` (initial scroll
* position) and `-el.scrollWidth + el.clientWidth` (furthest possible scroll position).
*/
OO.ui.Element.static.setScrollLeft = function ( el, scrollLeft ) {
scrollLeft = OO.ui.Element.static.computeNativeScrollLeft( scrollLeft, el );
if ( isRoot( el ) ) {
$( window ).scrollLeft( scrollLeft );
} else {
el.scrollLeft = scrollLeft;
}
};
}() ); }() );
/** /**
@ -1325,6 +1393,9 @@ OO.ui.Element.static.scrollIntoView = function ( elOrPosition, config ) {
// of scrolling the left out of view // of scrolling the left out of view
Math.min( position.left - padding.left, -position.right + padding.right ); Math.min( position.left - padding.left, -position.right + padding.right );
} }
if ( animations.scrollLeft !== undefined ) {
animations.scrollLeft = OO.ui.Element.static.computeNativeScrollLeft( animations.scrollLeft, container );
}
} }
if ( !$.isEmptyObject( animations ) ) { if ( !$.isEmptyObject( animations ) ) {
if ( animate ) { if ( animate ) {
@ -1665,7 +1736,7 @@ OO.mixinClass( OO.ui.Layout, OO.EventEmitter );
*/ */
OO.ui.Layout.prototype.resetScroll = function () { OO.ui.Layout.prototype.resetScroll = function () {
this.$element[ 0 ].scrollTop = 0; this.$element[ 0 ].scrollTop = 0;
// TODO: Reset scrollLeft in an RTL-aware manner, see OO.ui.Element.static.getScrollLeft. OO.ui.Element.static.setScrollLeft( this.$element[ 0 ], 0 );
return this; return this;
}; };
@ -7688,7 +7759,7 @@ OO.ui.MenuSectionOptionWidget.static.highlightable = false;
* @cfg {boolean} [highlightOnFilter] Highlight the first result when filtering * @cfg {boolean} [highlightOnFilter] Highlight the first result when filtering
* @cfg {string} [filterMode='prefix'] The mode by which the menu filters the results. * @cfg {string} [filterMode='prefix'] The mode by which the menu filters the results.
* Options are 'exact', 'prefix' or 'substring'. See `OO.ui.SelectWidget#getItemMatcher` * Options are 'exact', 'prefix' or 'substring'. See `OO.ui.SelectWidget#getItemMatcher`
* @param {number|string} [width] Width of the menu as a number of pixels or CSS string with unit * @cfg {number|string} [width] Width of the menu as a number of pixels or CSS string with unit
* suffix, used by {@link OO.ui.mixin.ClippableElement ClippableElement} * suffix, used by {@link OO.ui.mixin.ClippableElement ClippableElement}
*/ */
OO.ui.MenuSelectWidget = function OoUiMenuSelectWidget( config ) { OO.ui.MenuSelectWidget = function OoUiMenuSelectWidget( config ) {

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-tool > .oo-ui-tool-link > .oo-ui-tool-checkIcon { .oo-ui-tool > .oo-ui-tool-link > .oo-ui-tool-checkIcon {
display: none; display: none;

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-tool { .oo-ui-tool {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget { .oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget {
cursor: move; cursor: move;

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget { .oo-ui-draggableElement-handle:not( .oo-ui-draggableElement-undraggable ).oo-ui-widget {
cursor: move; cursor: move;

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {
@ -3799,6 +3799,40 @@ OO.inheritClass( OO.ui.TabOptionWidget, OO.ui.OptionWidget );
*/ */
OO.ui.TabOptionWidget.static.highlightable = false; OO.ui.TabOptionWidget.static.highlightable = false;
/**
* @static
* @inheritdoc
*/
OO.ui.TabOptionWidget.static.scrollIntoViewOnSelect = true;
/**
* Center tab horizontally after selecting on mobile
*
* @param {Object} [config] Configuration options
* @return {jQuery.Promise} Promise which resolves when the scroll is complete
*/
OO.ui.TabOptionWidget.prototype.scrollElementIntoView = function ( config ) {
var padding;
if ( !OO.ui.isMobile() || !this.getElementGroup() ) {
// Parent method
return OO.ui.TabOptionWidget.super.prototype.scrollElementIntoView.call( this );
} else {
padding = Math.max( (
this.getElementGroup().$element[ 0 ].clientWidth - this.$element[ 0 ].clientWidth
) / 2, 0 );
// Parent method
return OO.ui.TabOptionWidget.super.prototype.scrollElementIntoView.call( this, $.extend(
{
padding: {
left: padding,
right: padding
}
},
config
) );
}
};
/** /**
* TabSelectWidget is a list that contains {@link OO.ui.TabOptionWidget tab options} * TabSelectWidget is a list that contains {@link OO.ui.TabOptionWidget tab options}
* *

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-window { .oo-ui-window {
@ -239,7 +239,6 @@
.oo-ui-processDialog-navigation { .oo-ui-processDialog-navigation {
position: relative; position: relative;
height: 3.4em; height: 3.4em;
padding: 0 1em;
} }
.oo-ui-processDialog-location { .oo-ui-processDialog-location {
padding: 0.75em 0; padding: 0.75em 0;
@ -336,9 +335,8 @@
text-align: left; text-align: left;
margin: 1em; margin: 1em;
padding: 1em; padding: 1em;
border: 1px solid #ff9e9e; border: 1px solid #d45353;
background-color: #fff7f7; background-color: #ffdcdc;
border-radius: 3px;
} }
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-location { .oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-location {
text-align: left; text-align: left;

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:15Z * Date: 2019-07-10T12:25:14Z
*/ */
.oo-ui-window { .oo-ui-window {
@ -251,7 +251,7 @@
padding: 0.71428571em 0.85714286em; padding: 0.71428571em 0.85714286em;
} }
.oo-ui-processDialog [class^='oo-ui-processDialog-actions'] .oo-ui-actionWidget.oo-ui-labelElement.oo-ui-iconElement > .oo-ui-buttonElement-button { .oo-ui-processDialog [class^='oo-ui-processDialog-actions'] .oo-ui-actionWidget.oo-ui-labelElement.oo-ui-iconElement > .oo-ui-buttonElement-button {
padding-left: 2.28571429em; padding-left: 2.64285714em;
} }
.oo-ui-processDialog-actions-safe .oo-ui-actionWidget > .oo-ui-buttonElement-button, .oo-ui-processDialog-actions-safe .oo-ui-actionWidget > .oo-ui-buttonElement-button,
.oo-ui-processDialog-actions-other .oo-ui-actionWidget > .oo-ui-buttonElement-button { .oo-ui-processDialog-actions-other .oo-ui-actionWidget > .oo-ui-buttonElement-button {
@ -288,7 +288,7 @@
} }
.oo-ui-processDialog-errors { .oo-ui-processDialog-errors {
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
padding: 3em 3em 1.5em 3em; padding: 3em 3em 0 3em;
text-align: center; text-align: center;
} }
.oo-ui-processDialog-errors .oo-ui-buttonWidget { .oo-ui-processDialog-errors .oo-ui-buttonWidget {
@ -297,15 +297,14 @@
.oo-ui-processDialog-errors-title { .oo-ui-processDialog-errors-title {
font-size: 1.5em; font-size: 1.5em;
color: #000; color: #000;
margin-bottom: 2em; margin-bottom: 1.5em;
} }
.oo-ui-processDialog-error { .oo-ui-processDialog-error {
text-align: left; background-color: #fee7e6;
margin: 1em; margin: 1em 0 0;
padding: 1em;
border: 1px solid #d33; border: 1px solid #d33;
background-color: #fff7f7; padding: 1.42857143em 1.71428571em;
border-radius: 2px; text-align: left;
} }
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-content .oo-ui-window-head, .oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-content .oo-ui-window-head,
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-navigation, .oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-navigation,
@ -313,6 +312,7 @@
min-height: 3.14285714em; min-height: 3.14285714em;
} }
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-location { .oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-location {
margin-left: 1em;
text-align: left; text-align: left;
} }
.oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-title { .oo-ui-processDialog.oo-ui-isMobile .oo-ui-processDialog-title {

View file

@ -1,12 +1,12 @@
/*! /*!
* OOUI v0.33.1 * OOUI v0.33.2
* https://www.mediawiki.org/wiki/OOUI * https://www.mediawiki.org/wiki/OOUI
* *
* Copyright 20112019 OOUI Team and other contributors. * Copyright 20112019 OOUI Team and other contributors.
* Released under the MIT license * Released under the MIT license
* http://oojs.mit-license.org * http://oojs.mit-license.org
* *
* Date: 2019-07-03T21:05:08Z * Date: 2019-07-10T12:25:07Z
*/ */
( function ( OO ) { ( function ( OO ) {
@ -120,10 +120,12 @@ OO.ui.ActionWidget.prototype.getModes = function () {
* MyProcessDialog.static.name = 'myProcessDialog'; * MyProcessDialog.static.name = 'myProcessDialog';
* // An action set that uses modes ('edit' and 'help' mode, in this example). * // An action set that uses modes ('edit' and 'help' mode, in this example).
* MyProcessDialog.static.actions = [ * MyProcessDialog.static.actions = [
* { action: 'continue', modes: 'edit', label: 'Continue', * {
* flags: [ * action: 'continue',
* 'primary', 'progressive' * modes: 'edit',
* ] }, * label: 'Continue',
* flags: [ 'primary', 'progressive' ]
* },
* { action: 'help', modes: 'edit', label: 'Help' }, * { action: 'help', modes: 'edit', label: 'Help' },
* { modes: 'edit', label: 'Cancel', flags: 'safe' }, * { modes: 'edit', label: 'Cancel', flags: 'safe' },
* { action: 'back', modes: 'help', label: 'Back', flags: 'safe' } * { action: 'back', modes: 'help', label: 'Back', flags: 'safe' }
@ -3439,13 +3441,13 @@ OO.ui.ProcessDialog.prototype.fitLabel = function () {
navigationWidth = size.width - 20; navigationWidth = size.width - 20;
} }
safeWidth = this.$safeActions.is( ':visible' ) ? this.$safeActions.width() : 0; safeWidth = this.$safeActions.width();
primaryWidth = this.$primaryActions.is( ':visible' ) ? this.$primaryActions.width() : 0; primaryWidth = this.$primaryActions.width();
biggerWidth = Math.max( safeWidth, primaryWidth ); biggerWidth = Math.max( safeWidth, primaryWidth );
labelWidth = this.title.$element.width(); labelWidth = this.title.$element.width();
if ( 2 * biggerWidth + labelWidth < navigationWidth ) { if ( !OO.ui.isMobile() && 2 * biggerWidth + labelWidth < navigationWidth ) {
// We have enough space to center the label // We have enough space to center the label
leftWidth = rightWidth = biggerWidth; leftWidth = rightWidth = biggerWidth;
} else { } else {

File diff suppressed because one or more lines are too long