jenkins-bot has submitted this change and it was merged. Change subject: No more configuration overrides ......................................................................
No more configuration overrides In various places in the UI code, certain properties of config objects were overridden and in some cases the configurations were documented as private as a strange hack to prevent them from being advertised in the docs. I, Trevor, have been convinced of the error of my ways, and gladly reverse this situation, allowing all configurations to always be overridden when desired, while still allowing default values. Change-Id: I242e3b1902dec8e09eeea38fa64381e69ee04215 --- M modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js M modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js M modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js M modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js M modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js M modules/ve/ui/layouts/ve.ui.StackPanelLayout.js M modules/ve/ui/widgets/ve.ui.MenuItemWidget.js 10 files changed, 14 insertions(+), 29 deletions(-) Approvals: Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js index b279376..b4adf40 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js @@ -17,7 +17,7 @@ */ ve.ui.MWBetaWelcomeDialog = function VeUiMWBetaWelcomeDialog( surface, config ) { // Configuration initialization - config = ve.extendObject( {}, config, { 'small': true, 'footless': false } ); + config = ve.extendObject( { 'small': true, 'footless': false }, config ); // Parent constructor ve.ui.MWDialog.call( this, surface, config ); diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js index c015581..ef50537 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js @@ -17,7 +17,7 @@ */ ve.ui.MWMediaInsertDialog = function VeUiMWMediaInsertDialog( surface, config ) { // Configuration initialization - config = ve.extendObject( {}, config, { 'footless': true } ); + config = ve.extendObject( { 'footless': true }, config ); // Parent constructor ve.ui.MWDialog.call( this, surface, config ); diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js index f4d45eb..9185995 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js @@ -21,7 +21,7 @@ */ ve.ui.MWTransclusionDialog = function VeUiMWTransclusionDialog( surface, config ) { // Configuration initialization - config = ve.extendObject( {}, config, { + config = ve.extendObject( { 'editable': true, 'adders': [ { @@ -35,7 +35,7 @@ 'title': ve.msg( 'visualeditor-dialog-transclusion-add-content' ) } ] - } ); + }, config ); // Parent constructor ve.ui.MWDialog.call( this, surface, config ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js index bd10559..b61f1e1 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js @@ -16,7 +16,7 @@ */ ve.ui.MWCategoryPopupWidget = function VeUiMWCategoryPopupWidget ( config ) { // Configuration initialization - config = ve.extendObject( {}, config, { 'autoClose': true } ); + config = ve.extendObject( { 'autoClose': true }, config ); // Parent constructor ve.ui.PopupWidget.call( this, config ); @@ -55,11 +55,6 @@ this.$body.append( this.$menu ); config.$overlay.append( this.$ ); }; - -/** - * @private - * @cfg {boolean} [autoClose=true] Overridden in this subclass - */ /* Inheritance */ diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js index 990f848..c7f1f0e 100755 --- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js @@ -19,10 +19,10 @@ */ ve.ui.MWMediaSearchWidget = function VeUiMWMediaSearchWidget( config ) { // Configuration intialization - config = ve.extendObject( {}, config, { + config = ve.extendObject( { 'placeholder': ve.msg( 'visualeditor-media-input-placeholder' ), 'value': mw.config.get( 'wgTitle' ) - } ); + }, config ); // Parent constructor ve.ui.SearchWidget.call( this, config ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js index 8936fe4..299ff2b 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWParameterResultWidget.js @@ -17,7 +17,7 @@ */ ve.ui.MWParameterResultWidget = function VeUiMWParameterResultWidget( data, config ) { // Configuration initialization - config = ve.extendObject( {}, config, { 'icon': 'parameter' } ); + config = ve.extendObject( { 'icon': 'parameter' }, config ); // Parent constructor ve.ui.OptionWidget.call( this, data, config ); @@ -26,11 +26,6 @@ this.$.addClass( 've-ui-mwParameterResultWidget' ); this.setLabel( this.buildLabel() ); }; - -/** - * @private - * @cfg {string} icon - */ /* Inheritance */ diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js index 591afb6..e685b08 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js @@ -16,9 +16,9 @@ */ ve.ui.MWParameterSearchWidget = function VeUiMWParameterSearchWidget( template, config ) { // Configuration intialization - config = ve.extendObject( {}, config, { + config = ve.extendObject( { 'placeholder': ve.msg( 'visualeditor-parameter-input-placeholder' ) - } ); + }, config ); // Parent constructor ve.ui.SearchWidget.call( this, config ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js index bd61cab..3fd7207 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js @@ -17,9 +17,9 @@ */ ve.ui.MWReferenceSearchWidget = function VeUiMWReferenceSearchWidget( surface, config ) { // Configuration intialization - config = ve.extendObject( {}, config, { + config = ve.extendObject( { 'placeholder': ve.msg( 'visualeditor-reference-input-placeholder' ) - } ); + }, config ); // Parent constructor ve.ui.SearchWidget.call( this, config ); diff --git a/modules/ve/ui/layouts/ve.ui.StackPanelLayout.js b/modules/ve/ui/layouts/ve.ui.StackPanelLayout.js index 2b14581..4b2ea9b 100644 --- a/modules/ve/ui/layouts/ve.ui.StackPanelLayout.js +++ b/modules/ve/ui/layouts/ve.ui.StackPanelLayout.js @@ -18,7 +18,7 @@ */ ve.ui.StackPanelLayout = function VeUiStackPanelLayout( config ) { // Config initialization - config = ve.extendObject( config, { 'scrollable': true } ); + config = ve.extendObject( { 'scrollable': true }, config ); // Parent constructor ve.ui.PanelLayout.call( this, config ); diff --git a/modules/ve/ui/widgets/ve.ui.MenuItemWidget.js b/modules/ve/ui/widgets/ve.ui.MenuItemWidget.js index 4e51c8c..607299a 100644 --- a/modules/ve/ui/widgets/ve.ui.MenuItemWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MenuItemWidget.js @@ -17,7 +17,7 @@ */ ve.ui.MenuItemWidget = function VeUiMenuItemWidget( data, config ) { // Configuration initialization - config = ve.extendObject( {}, config, { 'icon': 'check' } ); + config = ve.extendObject( { 'icon': 'check' }, config ); // Parent constructor ve.ui.OptionWidget.call( this, data, config ); @@ -25,11 +25,6 @@ // Initialization this.$.addClass( 've-ui-menuItemWidget' ); }; - -/** - * @private - * @cfg {string} icon - */ /* Inheritance */ -- To view, visit https://gerrit.wikimedia.org/r/85134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I242e3b1902dec8e09eeea38fa64381e69ee04215 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Fantasticfears <fantasticfe...@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Fantasticfears <fantasticfe...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Trevor Parscal <tpars...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits