Jdlrobson has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399324 )
Change subject: Replace instances of constructive and remove option entirely
......................................................................
Replace instances of constructive and remove option entirely
Removing 'constructive' button flag, which has been deprecated,
entirely.
Bug: T182730
Change-Id: Ia3b9b2c3fc8da3724f28bd210e6c3fd24fc99259
---
M includes/MobileUI.php
M includes/specials/SpecialMobileOptions.php
M resources/mobile.init/BetaOptinPanel.js
M resources/mobile.startup/Anchor.js
M resources/mobile.startup/Button.js
M resources/mobile.startup/Overlay.less
M resources/mobile.startup/anchor.hogan
M resources/mobile.startup/button.hogan
M resources/mobile.talk.overlays/TalkSectionOverlay.js
9 files changed, 8 insertions(+), 16 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/24/399324/1
diff --git a/includes/MobileUI.php b/includes/MobileUI.php
index 0206bbf..a1715e6 100644
--- a/includes/MobileUI.php
+++ b/includes/MobileUI.php
@@ -30,7 +30,7 @@
/**
* Get CSS classes for a mediawiki ui semantic element
* @param string $base The base class
- * @param string $modifier Type of anchor (progressive, constructive,
destructive)
+ * @param string $modifier Type of anchor (progressive, destructive)
* @param string $additionalClassNames additional class names you want
to associate
* with the iconed element
* @return string class name for use with HTML element
@@ -42,7 +42,7 @@
/**
* Get CSS classes for buttons
- * @param string $modifier Type of button (progressive, constructive,
destructive)
+ * @param string $modifier Type of button (progressive, destructive)
* @param string $additionalClassNames additional class names you want
to associate
* with the button element
* @return string class name for use with HTML element
@@ -53,7 +53,7 @@
/**
* Get CSS classes for anchors
- * @param string $modifier Type of anchor (progressive, constructive,
destructive)
+ * @param string $modifier Type of anchor (progressive, destructive)
* @param string $additionalClassNames additional class names you want
to associate
* with the anchor element
* @return string class name for use with HTML element
diff --git a/includes/specials/SpecialMobileOptions.php
b/includes/specials/SpecialMobileOptions.php
index 7d61a47..acb3cda 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -148,7 +148,7 @@
$html .= $templateParser->processTemplate(
'checkbox', $data );
}
}
- $className = MobileUI::buttonClass( 'constructive' );
+ $className = MobileUI::buttonClass( 'progressive' );
$html .= <<<HTML
<input type="submit" class="{$className}"
id="mw-mf-settings-save" value="{$saveSettings}">
$token
diff --git a/resources/mobile.init/BetaOptinPanel.js
b/resources/mobile.init/BetaOptinPanel.js
index a0adeb0..cb6dd94 100644
--- a/resources/mobile.init/BetaOptinPanel.js
+++ b/resources/mobile.init/BetaOptinPanel.js
@@ -23,7 +23,7 @@
text: mw.msg( 'mobile-frontend-panel-betaoptin-msg' ),
buttons: [
new Button( {
- constructive: true,
+ progressive: true,
additionalClassNames: 'optin',
label: mw.msg(
'mobile-frontend-panel-ok' )
} ).options,
diff --git a/resources/mobile.startup/Anchor.js
b/resources/mobile.startup/Anchor.js
index 7675322..f6169e8 100644
--- a/resources/mobile.startup/Anchor.js
+++ b/resources/mobile.startup/Anchor.js
@@ -17,8 +17,6 @@
/**
* @cfg {Object} defaults Default options hash.
* @cfg {boolean} defaults.progressive is progressive action
- * @cfg {boolean} defaults.constructive is constructive action.
- * This option is deprecated. Please use `progressive`.
* @cfg {boolean} defaults.destructive is destructive action
* @cfg {string} defaults.additionalClassNames Additional class
name(s).
* @cfg {string} defaults.href url
@@ -27,7 +25,6 @@
defaults: {
progressive: undefined,
destructive: undefined,
- constructive: undefined,
additionalClassNames: '',
href: undefined,
label: undefined
diff --git a/resources/mobile.startup/Button.js
b/resources/mobile.startup/Button.js
index 662077e..059fd3a 100644
--- a/resources/mobile.startup/Button.js
+++ b/resources/mobile.startup/Button.js
@@ -25,7 +25,6 @@
* @cfg {string} defaults.tagName The name of the tag in which
the button is wrapped.
* @cfg {boolean} defaults.block is stacked button
* @cfg {boolean} defaults.progressive is progressive action
- * @cfg {boolean} defaults.constructive is constructive action
* This option is deprecated. Please use `progressive`.
* @cfg {boolean} defaults.quiet is quiet button
* @cfg {boolean} defaults.destructive is destructive action
@@ -38,7 +37,6 @@
block: undefined,
progressive: undefined,
destructive: undefined,
- constructive: undefined,
quiet: undefined,
additionalClassNames: '',
href: undefined,
diff --git a/resources/mobile.startup/Overlay.less
b/resources/mobile.startup/Overlay.less
index 07a0a51..8976123 100644
--- a/resources/mobile.startup/Overlay.less
+++ b/resources/mobile.startup/Overlay.less
@@ -71,9 +71,9 @@
//
// Styleguide 7.2.
-// Overlays (constructive)
+// Overlays
//
-// Constructive overlays should be used when user interaction is required in
the
+// Overlays should be used when user interaction is required in the
// form of, well, a form. These overlays should NOT be set up as a chain (see
// above for those), but rather as a single action that is completed once the
user
// presses the "Submit" button.
@@ -297,7 +297,6 @@
// Bottom Overlays
//
// A overlay that is docked to the bottom of the screen.
-// All types of overlays (progressive and constructive) apply here.
//
// Markup:
// <div class="overlay overlay-bottom position-fixed visible">
diff --git a/resources/mobile.startup/anchor.hogan
b/resources/mobile.startup/anchor.hogan
index adcfa64..5910bbf9 100644
--- a/resources/mobile.startup/anchor.hogan
+++ b/resources/mobile.startup/anchor.hogan
@@ -2,6 +2,5 @@
{{#href}}href="{{href}}"{{/href}}
class="mw-ui-anchor
{{#progressive}}mw-ui-progressive{{/progressive}}
- {{#constructive}}mw-ui-progressive{{/constructive}}
{{#destructive}}mw-ui-destructive{{/destructive}}
{{additionalClassNames}}
">{{label}}</a>
diff --git a/resources/mobile.startup/button.hogan
b/resources/mobile.startup/button.hogan
index 844cbee..130d6ae 100644
--- a/resources/mobile.startup/button.hogan
+++ b/resources/mobile.startup/button.hogan
@@ -3,6 +3,5 @@
class="mw-ui-button {{#progressive}}mw-ui-progressive{{/progressive}}
{{#block}}mw-ui-block{{/block}}
{{#quiet}}mw-ui-quiet{{/quiet}}
- {{#constructive}}mw-ui-progressive{{/constructive}}
{{#destructive}}mw-ui-destructive{{/destructive}}
{{additionalClassNames}}
">{{label}}</{{tagName}}>
diff --git a/resources/mobile.talk.overlays/TalkSectionOverlay.js
b/resources/mobile.talk.overlays/TalkSectionOverlay.js
index a8af395..c5c90e6 100644
--- a/resources/mobile.talk.overlays/TalkSectionOverlay.js
+++ b/resources/mobile.talk.overlays/TalkSectionOverlay.js
@@ -35,7 +35,7 @@
saveButton: new Button( {
block: true,
additionalClassNames: 'save-button',
- constructive: true,
+ progressive: true,
label: mw.msg( 'mobile-frontend-editor-save' )
} ).options,
title: undefined,
--
To view, visit https://gerrit.wikimedia.org/r/399324
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3b9b2c3fc8da3724f28bd210e6c3fd24fc99259
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: specialpages
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits