jenkins-bot has submitted this change and it was merged.
Change subject: Replace deprecated `constructive` with `progressive`
......................................................................
Replace deprecated `constructive` with `progressive`
Replacing deprecated `constructive` mediawiki.UI CSS class and OOjs UI
flag with `progressive`.
Bug: T146923
Change-Id: I524b9722ee49692c55bb1f97d34d8a28068716ee
---
M includes/EditPage.php
M includes/Xml.php
M includes/htmlform/HTMLForm.php
M includes/htmlform/fields/HTMLSubmitField.php
M includes/specials/SpecialBotPasswords.php
M includes/specials/SpecialMovepage.php
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
M resources/src/mediawiki.ui/components/buttons.less
M resources/src/mediawiki.ui/components/forms.less
M resources/src/mediawiki.ui/components/inputs.less
M resources/src/mediawiki.ui/components/text.less
M resources/src/mediawiki/mediawiki.Upload.Dialog.js
M resources/src/mediawiki/mediawiki.feedback.js
13 files changed, 19 insertions(+), 33 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 38f8ab6..c0c0048 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4155,7 +4155,7 @@
'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 43f7217..b1bd098 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -452,7 +452,7 @@
/**
* 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 @@
// 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 c65d97f..1f4d99e 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -176,7 +176,7 @@
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 cb98549..0c33ad9 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 ed3cd5e..1dd78d7 100644
--- a/includes/specials/SpecialBotPasswords.php
+++ b/includes/specials/SpecialBotPasswords.php
@@ -224,7 +224,7 @@
'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 3a12cf3..7b7661d 100644
--- a/includes/specials/SpecialMovepage.php
+++ b/includes/specials/SpecialMovepage.php
@@ -462,7 +462,7 @@
'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 5c3715d..e58a6cf 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 18fdb2f..a281e67 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:
// <div>
@@ -93,9 +93,6 @@
// <button class="mw-ui-button mw-ui-progressive
mw-ui-big">.mw-ui-progressive</button>
// </div>
// <div>
- // <button class="mw-ui-button mw-ui-constructive
mw-ui-big">.mw-ui-constructive</button>
- // </div>
- // <div>
// <button class="mw-ui-button mw-ui-destructive
mw-ui-big">.mw-ui-destructive</button>
// </div>
//
@@ -114,9 +111,6 @@
// </div>
// <div>
// <button class="mw-ui-button mw-ui-progressive
mw-ui-block">.mw-ui-progressive</button>
- // </div>
- // <div>
- // <button class="mw-ui-button mw-ui-constructive
mw-ui-block">.mw-ui-constructive</button>
// </div>
// <div>
// <button class="mw-ui-button mw-ui-destructive
mw-ui-block">.mw-ui-destructive</button>
@@ -179,18 +173,12 @@
// 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:
// <div>
// <button class="mw-ui-button mw-ui-quiet">.mw-ui-button</button>
- // </div>
- // <div>
- // <button class="mw-ui-button mw-ui-constructive
mw-ui-quiet">.mw-ui-constructive</button>
- // </div>
- // <div>
- // <button class="mw-ui-button mw-ui-constructive mw-ui-quiet"
disabled>.mw-ui-constructive</button>
// </div>
// <div>
// <button class="mw-ui-button mw-ui-destructive
mw-ui-quiet">.mw-ui-destructive</button>
diff --git a/resources/src/mediawiki.ui/components/forms.less
b/resources/src/mediawiki.ui/components/forms.less
index aedec5b..2327efc 100644
--- a/resources/src/mediawiki.ui/components/forms.less
+++ b/resources/src/mediawiki.ui/components/forms.less
@@ -30,7 +30,7 @@
// <input class="mw-ui-input" value="input">
// </div>
// <div class="mw-ui-vform-field">
-// <button class="mw-ui-button mw-ui-constructive">Button in vform</button>
+// <button class="mw-ui-button mw-ui-progressive">Button in vform</button>
// </div>
// </form>
//
diff --git a/resources/src/mediawiki.ui/components/inputs.less
b/resources/src/mediawiki.ui/components/inputs.less
index 76fee23..90e769e 100644
--- a/resources/src/mediawiki.ui/components/inputs.less
+++ b/resources/src/mediawiki.ui/components/inputs.less
@@ -99,7 +99,7 @@
//
// Markup:
// <input class="mw-ui-input mw-ui-input-inline">
-// <button class="mw-ui-button mw-ui-constructive">Submit</button>
+// <button class="mw-ui-button mw-ui-progressive">Submit</button>
//
// 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 cc27e9e..5551745 100644
--- a/resources/src/mediawiki.ui/components/text.less
+++ b/resources/src/mediawiki.ui/components/text.less
@@ -16,10 +16,10 @@
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:
<span class="mw-ui-text mw-ui-progressive">Progressive</span>
-<span class="mw-ui-text mw-ui-constructive">Constructive</span>
<span class="mw-ui-text mw-ui-destructive">Destructive</span>
Styleguide 6.1.
@@ -28,11 +28,9 @@
.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 1ea7e04..a719ffe 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 170e124..46b6aec 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',
--
To view, visit https://gerrit.wikimedia.org/r/313617
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I524b9722ee49692c55bb1f97d34d8a28068716ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VolkerE <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits