Jforrester has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/331000 )
Change subject: [DEPRECATING CHANGE] MessageDialog: Default 'verbose' option to
true
......................................................................
[DEPRECATING CHANGE] MessageDialog: Default 'verbose' option to true
This was an arbitrary styling choice that eventually became the default
in our designs; rather than keep actively choosing it, instead let's
just do it always. Later, we'll remove the ability to choose compact
styling.
Bug: T152354
Change-Id: I8cefacce62fdcb6b0b247a2d271c22ff190eb34a
---
M src/dialogs/MessageDialog.js
M src/windows.js
2 files changed, 5 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/00/331000/1
diff --git a/src/dialogs/MessageDialog.js b/src/dialogs/MessageDialog.js
index 5c45241..48a0ea5 100644
--- a/src/dialogs/MessageDialog.js
+++ b/src/dialogs/MessageDialog.js
@@ -60,7 +60,8 @@
OO.ui.MessageDialog.static.size = 'small';
-OO.ui.MessageDialog.static.verbose = false;
+// @deprecated since v0.18.4 as default; TODO: Remove
+OO.ui.MessageDialog.static.verbose = true;
/**
* Dialog title.
@@ -168,7 +169,6 @@
* @param {Object} [data] Dialog opening data
* @param {jQuery|string|Function|null} [data.title] Description of the action
being confirmed
* @param {jQuery|string|Function|null} [data.message] Description of the
action's consequence
- * @param {boolean} [data.verbose] Message is verbose and should be styled as
a long message
* @param {Object[]} [data.actions] List of OO.ui.ActionOptionWidget
configuration options for each
* action item
*/
@@ -184,6 +184,7 @@
this.message.setLabel(
data.message !== undefined ? data.message :
this.constructor.static.message
);
+ // @deprecated since v0.18.4 as default; TODO: Remove
and make default instead.
this.message.$element.toggleClass(
'oo-ui-messageDialog-message-verbose',
data.verbose !== undefined ? data.verbose :
this.constructor.static.verbose
diff --git a/src/windows.js b/src/windows.js
index 1c48068..551c1bc 100644
--- a/src/windows.js
+++ b/src/windows.js
@@ -39,7 +39,6 @@
OO.ui.alert = function ( text, options ) {
return OO.ui.getWindowManager().openWindow( 'messageDialog', $.extend( {
message: text,
- verbose: true,
actions: [ OO.ui.MessageDialog.static.actions[ 0 ] ]
}, options ) ).then( function ( opened ) {
return opened.then( function ( closing ) {
@@ -75,8 +74,7 @@
*/
OO.ui.confirm = function ( text, options ) {
return OO.ui.getWindowManager().openWindow( 'messageDialog', $.extend( {
- message: text,
- verbose: true
+ message: text
}, options ) ).then( function ( opened ) {
return opened.then( function ( closing ) {
return closing.then( function ( data ) {
@@ -121,8 +119,7 @@
// TODO: This is a little hacky, and could be done by extending
MessageDialog instead.
return manager.openWindow( 'messageDialog', $.extend( {
- message: textField.$element,
- verbose: true
+ message: textField.$element
}, options ) ).then( function ( opened ) {
// After ready
textInput.on( 'enter', function () {
--
To view, visit https://gerrit.wikimedia.org/r/331000
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cefacce62fdcb6b0b247a2d271c22ff190eb34a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits