From: Volker E Date: Fri, 30 Sep 2016 20:18:52 +0000 (-0700) Subject: Replace deprecated `constructive` with `progressive` X-Git-Tag: 1.31.0-rc.0~5258 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=commitdiff_plain;h=7e8539d10ee447903fd760228b26dff3b81ce201;p=lhc%2Fweb%2Fwiklou.git Replace deprecated `constructive` with `progressive` Replacing deprecated `constructive` mediawiki.UI CSS class and OOjs UI flag with `progressive`. Bug: T146923 Change-Id: I524b9722ee49692c55bb1f97d34d8a28068716ee --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 38f8ab69b2..c0c0048db8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4155,7 +4155,7 @@ HTML 'name' => 'wpSave', 'tabindex' => ++$tabindex, ] + Linker::tooltipAndAccesskeyAttribs( 'save' ); - $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-constructive' ] ); + $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-progressive' ] ); ++$tabindex; // use the same for preview and live preview $attribs = [ diff --git a/includes/Xml.php b/includes/Xml.php index 43f72177a9..b1bd098327 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -452,7 +452,7 @@ class Xml { /** * Convenience function to build an HTML submit button - * When $wgUseMediaWikiUIEverywhere is true it will default to a constructive button + * When $wgUseMediaWikiUIEverywhere is true it will default to a progressive button * @param string $value Label text for the button * @param array $attribs Optional custom attributes * @return string HTML @@ -467,7 +467,7 @@ class Xml { // some submit forms // might need to be mw-ui-destructive (e.g. delete a page) if ( $wgUseMediaWikiUIEverywhere ) { - $baseAttrs['class'] = 'mw-ui-button mw-ui-constructive'; + $baseAttrs['class'] = 'mw-ui-button mw-ui-progressive'; } // Any custom attributes will take precendence of anything in baseAttrs e.g. override the class $attribs = $attribs + $baseAttrs; diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index c65d97f0ff..1f4d99ef66 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -176,7 +176,7 @@ class HTMLForm extends ContextSource { protected $mFieldTree; protected $mShowReset = false; protected $mShowSubmit = true; - protected $mSubmitFlags = [ 'constructive', 'primary' ]; + protected $mSubmitFlags = [ 'primary', 'progressive' ]; protected $mShowCancel = false; protected $mCancelTarget; diff --git a/includes/htmlform/fields/HTMLSubmitField.php b/includes/htmlform/fields/HTMLSubmitField.php index cb98549efe..0c33ad94e0 100644 --- a/includes/htmlform/fields/HTMLSubmitField.php +++ b/includes/htmlform/fields/HTMLSubmitField.php @@ -7,7 +7,7 @@ class HTMLSubmitField extends HTMLButtonField { protected $buttonType = 'submit'; - protected $mFlags = [ 'primary', 'constructive' ]; + protected $mFlags = [ 'primary', 'progressive' ]; public function skipLoadData( $request ) { return !$request->getCheck( $this->mName ); diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index ed3cd5e7e9..1dd78d7cfc 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -224,7 +224,7 @@ class SpecialBotPasswords extends FormSpecialPage { 'name' => 'op', 'value' => 'create', 'label-message' => 'botpasswords-label-create', - 'flags' => [ 'primary', 'constructive' ], + 'flags' => [ 'primary', 'progressive' ], ] ); } diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 3a12cf3ce3..7b7661d037 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -462,7 +462,7 @@ class MovePageForm extends UnlistedSpecialPage { 'name' => 'wpMove', 'value' => $this->msg( 'movepagebtn' )->text(), 'label' => $this->msg( 'movepagebtn' )->text(), - 'flags' => [ 'constructive', 'primary' ], + 'flags' => [ 'primary', 'progressive' ], 'type' => 'submit', ] ), [ diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index 5c3715db02..e58a6cfe3c 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -599,7 +599,7 @@ fullscreenButton.$element, new OO.ui.ButtonWidget( { label: mw.message( 'apisandbox-submit' ).text(), - flags: [ 'primary', 'constructive' ] + flags: [ 'primary', 'progressive' ] } ).on( 'click', ApiSandbox.sendRequest ).$element, new OO.ui.ButtonWidget( { label: mw.message( 'apisandbox-reset' ).text(), @@ -1421,7 +1421,7 @@ dynamicParamNameWidget, new OO.ui.ButtonWidget( { icon: 'add', - flags: 'constructive' + flags: 'progressive' } ).on( 'click', addDynamicParamWidget ), { label: mw.message( 'apisandbox-dynamic-parameters-add-label' ).text(), diff --git a/resources/src/mediawiki.ui/components/buttons.less b/resources/src/mediawiki.ui/components/buttons.less index 18fdb2f8ed..a281e67158 100644 --- a/resources/src/mediawiki.ui/components/buttons.less +++ b/resources/src/mediawiki.ui/components/buttons.less @@ -14,7 +14,7 @@ // Neutral button styling // -// These are the main actions on the page/workflow. The page should have only one of progressive, constructive and desctructive buttons, the rest being quiet. +// These are the main actions on the page/workflow. The page should have only one of progressive and destructive buttons, the rest being quiet. // // Markup: //
@@ -93,9 +93,6 @@ // //
//
- // - //
- //
// //
// @@ -116,9 +113,6 @@ // // //
- // - //
- //
// //
// @@ -179,7 +173,7 @@ // Quiet buttons // - // Use quiet buttons when they are less important and alongside other constructive, progressive or destructive buttons. It should be used for an action that exits the user from the current view/workflow. + // Use quiet buttons when they are less important and alongside other progressive or destructive buttons. It should be used for an action that exits the user from the current view/workflow. // Its use is not recommended on mobile/tablet due to lack of hover state. // // Markup: @@ -187,12 +181,6 @@ // // //
- // - //
- //
- // - //
- //
// //
//
diff --git a/resources/src/mediawiki.ui/components/forms.less b/resources/src/mediawiki.ui/components/forms.less index aedec5b9e9..2327efc73b 100644 --- a/resources/src/mediawiki.ui/components/forms.less +++ b/resources/src/mediawiki.ui/components/forms.less @@ -30,7 +30,7 @@ // //
//
-// +// //
// // diff --git a/resources/src/mediawiki.ui/components/inputs.less b/resources/src/mediawiki.ui/components/inputs.less index 76fee23e21..90e769e349 100644 --- a/resources/src/mediawiki.ui/components/inputs.less +++ b/resources/src/mediawiki.ui/components/inputs.less @@ -99,7 +99,7 @@ textarea.mw-ui-input { // // Markup: // -// +// // // Styleguide 1.2. input[type="number"], diff --git a/resources/src/mediawiki.ui/components/text.less b/resources/src/mediawiki.ui/components/text.less index cc27e9e357..555174559f 100644 --- a/resources/src/mediawiki.ui/components/text.less +++ b/resources/src/mediawiki.ui/components/text.less @@ -16,10 +16,10 @@ Text Context classes may be used on elements with only plain-text content with the mw-ui-text base. When the context classes are used on interactive and block-level elements, the appropriate alternative base type classes should also be used. For example, mw-ui-anchor with A, or mw-ui-button with buttons. +'Constructive' is deprecated and merged with 'Progressive'. Markup: Progressive -Constructive Destructive Styleguide 6.1. @@ -28,11 +28,9 @@ Styleguide 6.1. .mw-ui-text { // The selector order is like this on purpose; IE 6 ignores the second selector, // so we don't want to accidentally apply this color on all mw-ui-CONTEXT classes - .mw-ui-progressive& { - color: @colorProgressive; - } + .mw-ui-progressive&, .mw-ui-constructive& { - color: @colorConstructive; + color: @colorProgressive; } .mw-ui-destructive& { color: @colorDestructive; diff --git a/resources/src/mediawiki/mediawiki.Upload.Dialog.js b/resources/src/mediawiki/mediawiki.Upload.Dialog.js index 1ea7e042ad..a719ffe0b6 100644 --- a/resources/src/mediawiki/mediawiki.Upload.Dialog.js +++ b/resources/src/mediawiki/mediawiki.Upload.Dialog.js @@ -84,7 +84,7 @@ modes: 'insert' }, { - flags: [ 'primary', 'constructive' ], + flags: [ 'primary', 'progressive' ], label: mw.msg( 'upload-dialog-button-save' ), action: 'save', modes: 'info' diff --git a/resources/src/mediawiki/mediawiki.feedback.js b/resources/src/mediawiki/mediawiki.feedback.js index 170e1240c8..46b6aec49d 100644 --- a/resources/src/mediawiki/mediawiki.feedback.js +++ b/resources/src/mediawiki/mediawiki.feedback.js @@ -216,12 +216,12 @@ { action: 'submit', label: mw.msg( 'feedback-submit' ), - flags: [ 'primary', 'constructive' ] + flags: [ 'primary', 'progressive' ] }, { action: 'external', label: mw.msg( 'feedback-external-bug-report-button' ), - flags: 'constructive' + flags: 'progressive' }, { action: 'cancel',