[MediaWiki-commits] [Gerrit] ButtonInputWidget: Disable generating `label` elements - change (oojs/ui)

2015-07-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ButtonInputWidget: Disable generating `label` elements
..


ButtonInputWidget: Disable generating `label` elements

One would very rarely need additional label for a button, and it's
already a big clickable target, and it causes unexpected rendering.

Bug: T103848
Change-Id: I38a3af6925db5d4ce6ace3e905cd88b9aba504eb
---
M php/widgets/ButtonInputWidget.php
M src/widgets/ButtonInputWidget.js
2 files changed, 17 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/php/widgets/ButtonInputWidget.php 
b/php/widgets/ButtonInputWidget.php
index 0db90a0..1bf5a33 100644
--- a/php/widgets/ButtonInputWidget.php
+++ b/php/widgets/ButtonInputWidget.php
@@ -6,6 +6,15 @@
  * A button that is an input widget. Intended to be used within a FormLayout.
  */
 class ButtonInputWidget extends InputWidget {
+
+   /* Static properties */
+
+   /**
+* Disable generating `label` elements for buttons. One would very 
rarely need additional label
+* for a button, and it's already a big clickable target, and it causes 
unexpected rendering.
+*/
+   public static $supportsSimpleLabel = false;
+
/* Properties */
 
/**
diff --git a/src/widgets/ButtonInputWidget.js b/src/widgets/ButtonInputWidget.js
index 9d5685b..06cfa3d 100644
--- a/src/widgets/ButtonInputWidget.js
+++ b/src/widgets/ButtonInputWidget.js
@@ -65,6 +65,14 @@
 OO.mixinClass( OO.ui.ButtonInputWidget, OO.ui.mixin.LabelElement );
 OO.mixinClass( OO.ui.ButtonInputWidget, OO.ui.mixin.TitledElement );
 
+/* Static Properties */
+
+/**
+ * Disable generating `label` elements for buttons. One would very rarely 
need additional label
+ * for a button, and it's already a big clickable target, and it causes 
unexpected rendering.
+ */
+OO.ui.ButtonInputWidget.static.supportsSimpleLabel = false;
+
 /* Methods */
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/223821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I38a3af6925db5d4ce6ace3e905cd88b9aba504eb
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] ButtonInputWidget: Disable generating `label` elements - change (oojs/ui)

2015-07-09 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/223821

Change subject: ButtonInputWidget: Disable generating `label` elements
..

ButtonInputWidget: Disable generating `label` elements

One would very rarely need additional label for a button, and it's
already a big clickable target, and it causes unexpected rendering.

Bug: T103848
Change-Id: I38a3af6925db5d4ce6ace3e905cd88b9aba504eb
---
M php/widgets/ButtonInputWidget.php
M src/widgets/ButtonInputWidget.js
2 files changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/21/223821/1

diff --git a/php/widgets/ButtonInputWidget.php 
b/php/widgets/ButtonInputWidget.php
index 0db90a0..1bf5a33 100644
--- a/php/widgets/ButtonInputWidget.php
+++ b/php/widgets/ButtonInputWidget.php
@@ -6,6 +6,15 @@
  * A button that is an input widget. Intended to be used within a FormLayout.
  */
 class ButtonInputWidget extends InputWidget {
+
+   /* Static properties */
+
+   /**
+* Disable generating `label` elements for buttons. One would very 
rarely need additional label
+* for a button, and it's already a big clickable target, and it causes 
unexpected rendering.
+*/
+   public static $supportsSimpleLabel = false;
+
/* Properties */
 
/**
diff --git a/src/widgets/ButtonInputWidget.js b/src/widgets/ButtonInputWidget.js
index 9d5685b..06cfa3d 100644
--- a/src/widgets/ButtonInputWidget.js
+++ b/src/widgets/ButtonInputWidget.js
@@ -65,6 +65,14 @@
 OO.mixinClass( OO.ui.ButtonInputWidget, OO.ui.mixin.LabelElement );
 OO.mixinClass( OO.ui.ButtonInputWidget, OO.ui.mixin.TitledElement );
 
+/* Static Properties */
+
+/**
+ * Disable generating `label` elements for buttons. One would very rarely 
need additional label
+ * for a button, and it's already a big clickable target, and it causes 
unexpected rendering.
+ */
+OO.ui.ButtonInputWidget.static.supportsSimpleLabel = false;
+
 /* Methods */
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/223821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38a3af6925db5d4ce6ace3e905cd88b9aba504eb
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits