jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/353115 )
Change subject: demos: Rename deprecated Card to current TabPanel
......................................................................
demos: Rename deprecated Card to current TabPanel
Follow-up to Icfe1652cc038dc131b6b855ce9b45040b8ee5178
Bug: T155152
Change-Id: I3465389e39fda0a30abb87af4b8917bddb1624d5
---
M demos/classes/IndexedDialog.js
D demos/classes/SampleCard.js
A demos/classes/SampleTabPanel.js
M demos/index.html
M src/layouts/IndexLayout.js
M src/layouts/TabPanelLayout.js
6 files changed, 22 insertions(+), 22 deletions(-)
Approvals:
jenkins-bot: Verified
Jforrester: Looks good to me, approved
diff --git a/demos/classes/IndexedDialog.js b/demos/classes/IndexedDialog.js
index 5c2fd10..b29998e 100644
--- a/demos/classes/IndexedDialog.js
+++ b/demos/classes/IndexedDialog.js
@@ -13,14 +13,14 @@
Demo.IndexedDialog.prototype.initialize = function () {
Demo.IndexedDialog.parent.prototype.initialize.apply( this, arguments );
this.indexLayout = new OO.ui.IndexLayout();
- this.cards = [
- new Demo.SampleCard( 'first', { label: 'One' } ),
- new Demo.SampleCard( 'second', { label: 'Two' } ),
- new Demo.SampleCard( 'third', { label: 'Three' } ),
- new Demo.SampleCard( 'fourth', { label: 'Four' } )
+ this.tabPanels = [
+ new Demo.SampleTabPanel( 'first', { label: 'One' } ),
+ new Demo.SampleTabPanel( 'second', { label: 'Two' } ),
+ new Demo.SampleTabPanel( 'third', { label: 'Three' } ),
+ new Demo.SampleTabPanel( 'fourth', { label: 'Four' } )
];
- this.indexLayout.addCards( this.cards );
+ this.indexLayout.addTabPanels( this.tabPanels );
this.$body.append( this.indexLayout.$element );
this.indexLayout.getTabs().getItemFromData( 'fourth' ).setDisabled(
true );
diff --git a/demos/classes/SampleCard.js b/demos/classes/SampleCard.js
deleted file mode 100644
index c108896..0000000
--- a/demos/classes/SampleCard.js
+++ /dev/null
@@ -1,5 +0,0 @@
-Demo.SampleCard = function DemoSampleCard( name, config ) {
- OO.ui.CardLayout.call( this, name, config );
- this.$element.text( this.label );
-};
-OO.inheritClass( Demo.SampleCard, OO.ui.CardLayout );
diff --git a/demos/classes/SampleTabPanel.js b/demos/classes/SampleTabPanel.js
new file mode 100644
index 0000000..03bce0d
--- /dev/null
+++ b/demos/classes/SampleTabPanel.js
@@ -0,0 +1,5 @@
+Demo.SampleTabPanel = function DemoSampleTabPanel( name, config ) {
+ OO.ui.TabPanelLayout.call( this, name, config );
+ this.$element.text( this.label );
+};
+OO.inheritClass( Demo.SampleTabPanel, OO.ui.TabPanelLayout );
diff --git a/demos/index.html b/demos/index.html
index 4571afe..185be52 100644
--- a/demos/index.html
+++ b/demos/index.html
@@ -36,7 +36,7 @@
<script src="classes/PopupButtonWidgetTest.js"></script>
<script src="classes/PositionSelectWidget.js"></script>
<script src="classes/ProcessDialog.js"></script>
- <script src="classes/SampleCard.js"></script>
+ <script src="classes/SampleTabPanel.js"></script>
<script src="classes/SamplePage.js"></script>
<script src="classes/SearchWidgetDialog.js"></script>
<script src="classes/SimpleDialog.js"></script>
diff --git a/src/layouts/IndexLayout.js b/src/layouts/IndexLayout.js
index bd7ac67..a8ef956 100644
--- a/src/layouts/IndexLayout.js
+++ b/src/layouts/IndexLayout.js
@@ -262,7 +262,7 @@
*
* @param {OO.ui.TabPanelLayout} tabPanel Tab panel to use as a reference point
* @return {OO.ui.TabPanelLayout|null} Tab panel closest to the specified
- * @deprecated since v0.22.0, use `getClosestTabPanel` instead
+ * @deprecated since v0.21.3, use `getClosestTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getClosestCard = function ( tabPanel ) {
OO.ui.warnDeprecation( 'IndexLayout\'s getClosestCard method is
deprecated. Use getClosestTabPanel instead. See T155152' );
@@ -293,7 +293,7 @@
*
* @param {string} name Symbolic name of tab panel
* @return {OO.ui.TabPanelLayout|undefined} Tab panel, if found
- * @deprecated since v0.22.0, use `getTabPanel` instead
+ * @deprecated since v0.21.3, use `getTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getCard = function ( name ) {
OO.ui.warnDeprecation( 'IndexLayout\'s getCard method is deprecated.
Use getTabPanel instead. See T155152' );
@@ -314,7 +314,7 @@
* Get the current tab panel.
*
* @return {OO.ui.TabPanelLayout|undefined} Current tab panel, if found
- * @deprecated since v0.22.0, use `getCurrentTabPanel` instead
+ * @deprecated since v0.21.3, use `getCurrentTabPanel` instead
*/
OO.ui.IndexLayout.prototype.getCurrentCard = function () {
OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCard method is
deprecated. Use getCurrentTabPanel instead. See T155152' );
@@ -334,7 +334,7 @@
* Get the symbolic name of the current tab panel.
*
* @return {string|null} Symbolic name of the current tab panel
- * @deprecated since v0.22.0, use `getCurrentTabPanelName` instead
+ * @deprecated since v0.21.3, use `getCurrentTabPanelName` instead
*/
OO.ui.IndexLayout.prototype.getCurrentCardName = function () {
OO.ui.warnDeprecation( 'IndexLayout\'s getCurrentCardName method is
deprecated. Use getCurrentTabPanelName instead. See T155152' );
@@ -406,7 +406,7 @@
* @param {number} index Index of the insertion point
* @fires add
* @chainable
- * @deprecated since v0.22.0, use `addTabPanels` instead
+ * @deprecated since v0.21.3, use `addTabPanels` instead
*/
OO.ui.IndexLayout.prototype.addCards = function ( tabPanels, index ) {
OO.ui.warnDeprecation( 'IndexLayout\'s addCards method is deprecated.
Use addTabPanels instead. See T155152' );
@@ -451,7 +451,7 @@
* @param {OO.ui.TabPanelLayout[]} tabPanels An array of tab panels to remove
* @fires remove
* @chainable
- * @deprecated since v0.22.0, use `removeTabPanels` instead
+ * @deprecated since v0.21.3, use `removeTabPanels` instead
*/
OO.ui.IndexLayout.prototype.removeCards = function ( tabPanels ) {
OO.ui.warnDeprecation( 'IndexLayout\'s removeCards method is
deprecated. Use removeTabPanels instead. See T155152.' );
@@ -490,7 +490,7 @@
*
* @fires remove
* @chainable
- * @deprecated since v0.22.0, use `clearTabPanels` instead
+ * @deprecated since v0.21.3, use `clearTabPanels` instead
*/
OO.ui.IndexLayout.prototype.clearCards = function () {
OO.ui.warnDeprecation( 'IndexLayout\'s clearCards method is deprecated.
Use clearTabPanels instead. See T155152.' );
@@ -554,7 +554,7 @@
*
* @fires set
* @param {string} name Symbolic name of tab panel
- * @deprecated since v0.22.0, use `setTabPanel` instead
+ * @deprecated since v0.21.3, use `setTabPanel` instead
*/
OO.ui.IndexLayout.prototype.setCard = function ( name ) {
OO.ui.warnDeprecation( 'IndexLayout\'s setCard method is deprecated.
Use setTabPanel instead. See T155152.' );
@@ -578,7 +578,7 @@
* Select the first selectable tab panel.
*
* @chainable
- * @deprecated since v0.22.0, use `selectFirstSelectableTabPanel` instead
+ * @deprecated since v0.21.3, use `selectFirstSelectableTabPanel` instead
*/
OO.ui.IndexLayout.prototype.selectFirstSelectableCard = function () {
OO.ui.warnDeprecation( 'IndexLayout\'s selectFirstSelectableCard method
is deprecated. Use selectFirestSelectableTabPanel instead. See T155152.' );
diff --git a/src/layouts/TabPanelLayout.js b/src/layouts/TabPanelLayout.js
index 475f5c0..cdb81fd 100644
--- a/src/layouts/TabPanelLayout.js
+++ b/src/layouts/TabPanelLayout.js
@@ -151,7 +151,7 @@
* @extends OO.ui.TabPanelLayout
*
* @constructor
- * @deprecated since v0.22.0
+ * @deprecated since v0.21.3
*/
OO.ui.CardLayout = function OoUiCardLayout() {
OO.ui.warnDeprecation( 'CardLayout has been renamed to TabPanel layout.
Use that instead. See T155152' );
--
To view, visit https://gerrit.wikimedia.org/r/353115
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3465389e39fda0a30abb87af4b8917bddb1624d5
Gerrit-PatchSet: 3
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits