Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335647 )

Change subject: Document various overridden inherited properties
......................................................................

Document various overridden inherited properties

When a property is not annotated with /** @inheritdoc */, it will
not be taken into account by JSDuck when generating documentation.
This resulted in some incorrect information, e.g. MessageDialog
documentation mentioned a static 'name' property that defaults to '',
inherited from Dialog, even though MessageDialog sets it to 'message'.

Additionally, we need to specify /** @static */ for inherited static
properties, otherwise JSDuck assumes they are instance properties.

Also added documentation for some static properties of OptionWidget
and ToolGroup.

Change-Id: I8f5420d28f81b78cbfc1eca8cc71eb0755c112cc
---
M src/ToolGroup.js
M src/dialogs/MessageDialog.js
M src/layouts/FieldsetLayout.js
M src/layouts/FormLayout.js
M src/toolgroups/BarToolGroup.js
M src/toolgroups/ListToolGroup.js
M src/toolgroups/MenuToolGroup.js
M src/widgets/ButtonInputWidget.js
M src/widgets/ButtonOptionWidget.js
M src/widgets/ButtonWidget.js
M src/widgets/CheckboxMultioptionWidget.js
M src/widgets/CheckboxMultiselectInputWidget.js
M src/widgets/IconWidget.js
M src/widgets/IndicatorWidget.js
M src/widgets/InputWidget.js
M src/widgets/LabelWidget.js
M src/widgets/MenuOptionWidget.js
M src/widgets/MenuSectionOptionWidget.js
M src/widgets/OptionWidget.js
M src/widgets/OutlineOptionWidget.js
M src/widgets/ProgressBarWidget.js
M src/widgets/RadioOptionWidget.js
M src/widgets/RadioSelectInputWidget.js
M src/widgets/TabOptionWidget.js
24 files changed, 177 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/47/335647/1

diff --git a/src/ToolGroup.js b/src/ToolGroup.js
index 55607a1..bf94098 100644
--- a/src/ToolGroup.js
+++ b/src/ToolGroup.js
@@ -123,6 +123,14 @@
  */
 OO.ui.ToolGroup.static.autoDisable = true;
 
+/**
+ * @abstract
+ * @static
+ * @inheritable
+ * @property {string}
+ */
+OO.ui.ToolGroup.static.name = null;
+
 /* Methods */
 
 /**
diff --git a/src/dialogs/MessageDialog.js b/src/dialogs/MessageDialog.js
index 48a0ea5..c016fe2 100644
--- a/src/dialogs/MessageDialog.js
+++ b/src/dialogs/MessageDialog.js
@@ -56,11 +56,22 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MessageDialog.static.name = 'message';
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MessageDialog.static.size = 'small';
 
-// @deprecated since v0.18.4 as default; TODO: Remove
+/**
+ * @static
+ * @deprecated since v0.18.4 as default; TODO: Remove
+ */
 OO.ui.MessageDialog.static.verbose = true;
 
 /**
@@ -87,8 +98,12 @@
  */
 OO.ui.MessageDialog.static.message = null;
 
-// Note that OO.ui.alert() and OO.ui.confirm() rely on these.
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MessageDialog.static.actions = [
+       // Note that OO.ui.alert() and OO.ui.confirm() rely on these.
        { action: 'accept', label: OO.ui.deferMsg( 'ooui-dialog-message-accept' 
), flags: 'primary' },
        { action: 'reject', label: OO.ui.deferMsg( 'ooui-dialog-message-reject' 
), flags: 'safe' }
 ];
diff --git a/src/layouts/FieldsetLayout.js b/src/layouts/FieldsetLayout.js
index b0b8727..664c3af 100644
--- a/src/layouts/FieldsetLayout.js
+++ b/src/layouts/FieldsetLayout.js
@@ -98,4 +98,8 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.FieldsetLayout.static.tagName = 'fieldset';
diff --git a/src/layouts/FormLayout.js b/src/layouts/FormLayout.js
index c7dee2e..6bbf056 100644
--- a/src/layouts/FormLayout.js
+++ b/src/layouts/FormLayout.js
@@ -109,6 +109,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.FormLayout.static.tagName = 'form';
 
 /* Methods */
diff --git a/src/toolgroups/BarToolGroup.js b/src/toolgroups/BarToolGroup.js
index 4a7ae76..f302546 100644
--- a/src/toolgroups/BarToolGroup.js
+++ b/src/toolgroups/BarToolGroup.js
@@ -116,8 +116,20 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.BarToolGroup.static.titleTooltips = true;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.BarToolGroup.static.accelTooltips = true;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.BarToolGroup.static.name = 'bar';
diff --git a/src/toolgroups/ListToolGroup.js b/src/toolgroups/ListToolGroup.js
index 5161587..adb5d0e 100644
--- a/src/toolgroups/ListToolGroup.js
+++ b/src/toolgroups/ListToolGroup.js
@@ -120,6 +120,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.ListToolGroup.static.name = 'list';
 
 /* Methods */
diff --git a/src/toolgroups/MenuToolGroup.js b/src/toolgroups/MenuToolGroup.js
index 60fc770..57bb038 100644
--- a/src/toolgroups/MenuToolGroup.js
+++ b/src/toolgroups/MenuToolGroup.js
@@ -127,6 +127,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MenuToolGroup.static.name = 'menu';
 
 /* Methods */
diff --git a/src/widgets/ButtonInputWidget.js b/src/widgets/ButtonInputWidget.js
index 5178e2f..c68f3cb 100644
--- a/src/widgets/ButtonInputWidget.js
+++ b/src/widgets/ButtonInputWidget.js
@@ -75,6 +75,9 @@
 /**
  * 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.
+ *
+ * @static
+ * @inheritdoc
  */
 OO.ui.ButtonInputWidget.static.supportsSimpleLabel = false;
 
diff --git a/src/widgets/ButtonOptionWidget.js 
b/src/widgets/ButtonOptionWidget.js
index bfedb67..3d295b9 100644
--- a/src/widgets/ButtonOptionWidget.js
+++ b/src/widgets/ButtonOptionWidget.js
@@ -45,9 +45,18 @@
 
 /* Static Properties */
 
-// Allow button mouse down events to pass through so they can be handled by 
the parent select widget
+/**
+ * Allow button mouse down events to pass through so they can be handled by 
the parent select widget
+ *
+ * @static
+ * @inheritdoc
+ */
 OO.ui.ButtonOptionWidget.static.cancelButtonMouseDownEvents = false;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.ButtonOptionWidget.static.highlightable = false;
 
 /* Methods */
diff --git a/src/widgets/ButtonWidget.js b/src/widgets/ButtonWidget.js
index 1b9d06a..c046f21 100644
--- a/src/widgets/ButtonWidget.js
+++ b/src/widgets/ButtonWidget.js
@@ -86,6 +86,7 @@
 /* Static Properties */
 
 /**
+ * @static
  * @inheritdoc
  */
 OO.ui.ButtonWidget.static.cancelButtonMouseDownEvents = false;
diff --git a/src/widgets/CheckboxMultioptionWidget.js 
b/src/widgets/CheckboxMultioptionWidget.js
index d570476..0ff2d22 100644
--- a/src/widgets/CheckboxMultioptionWidget.js
+++ b/src/widgets/CheckboxMultioptionWidget.js
@@ -37,6 +37,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.CheckboxMultioptionWidget.static.tagName = 'label';
 
 /* Methods */
diff --git a/src/widgets/CheckboxMultiselectInputWidget.js 
b/src/widgets/CheckboxMultiselectInputWidget.js
index f79762f..71db5c4 100644
--- a/src/widgets/CheckboxMultiselectInputWidget.js
+++ b/src/widgets/CheckboxMultiselectInputWidget.js
@@ -55,6 +55,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.CheckboxMultiselectInputWidget.static.supportsSimpleLabel = false;
 
 /* Static Methods */
diff --git a/src/widgets/IconWidget.js b/src/widgets/IconWidget.js
index 2129159..458ee0f 100644
--- a/src/widgets/IconWidget.js
+++ b/src/widgets/IconWidget.js
@@ -51,4 +51,8 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.IconWidget.static.tagName = 'span';
diff --git a/src/widgets/IndicatorWidget.js b/src/widgets/IndicatorWidget.js
index ff0a170..cfe5b7e 100644
--- a/src/widgets/IndicatorWidget.js
+++ b/src/widgets/IndicatorWidget.js
@@ -49,4 +49,8 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.IndicatorWidget.static.tagName = 'span';
diff --git a/src/widgets/InputWidget.js b/src/widgets/InputWidget.js
index bcc5d70..b7e7106 100644
--- a/src/widgets/InputWidget.js
+++ b/src/widgets/InputWidget.js
@@ -68,6 +68,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.InputWidget.static.supportsSimpleLabel = true;
 
 /* Static Methods */
diff --git a/src/widgets/LabelWidget.js b/src/widgets/LabelWidget.js
index 92f593b..f64d970 100644
--- a/src/widgets/LabelWidget.js
+++ b/src/widgets/LabelWidget.js
@@ -68,6 +68,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.LabelWidget.static.tagName = 'span';
 
 /* Methods */
diff --git a/src/widgets/MenuOptionWidget.js b/src/widgets/MenuOptionWidget.js
index f6d22ec..1ee67c6 100644
--- a/src/widgets/MenuOptionWidget.js
+++ b/src/widgets/MenuOptionWidget.js
@@ -30,4 +30,8 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MenuOptionWidget.static.scrollIntoViewOnSelect = true;
diff --git a/src/widgets/MenuSectionOptionWidget.js 
b/src/widgets/MenuSectionOptionWidget.js
index 0e2867e..844b577 100644
--- a/src/widgets/MenuSectionOptionWidget.js
+++ b/src/widgets/MenuSectionOptionWidget.js
@@ -49,6 +49,14 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MenuSectionOptionWidget.static.selectable = false;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.MenuSectionOptionWidget.static.highlightable = false;
diff --git a/src/widgets/OptionWidget.js b/src/widgets/OptionWidget.js
index 0b11517..5c73578 100644
--- a/src/widgets/OptionWidget.js
+++ b/src/widgets/OptionWidget.js
@@ -55,12 +55,40 @@
 
 /* Static Properties */
 
+/**
+ * Whether this option can be selected. See #setSelected.
+ *
+ * @static
+ * @inheritable
+ * @property {boolean}
+ */
 OO.ui.OptionWidget.static.selectable = true;
 
+/**
+ * Whether this option can be highlighted. See #setHighlighted.
+ *
+ * @static
+ * @inheritable
+ * @property {boolean}
+ */
 OO.ui.OptionWidget.static.highlightable = true;
 
+/**
+ * Whether this option can be pressed. See #setPressed.
+ *
+ * @static
+ * @inheritable
+ * @property {boolean}
+ */
 OO.ui.OptionWidget.static.pressable = true;
 
+/**
+ * Whether this option will be scrolled into view when it is selected.
+ *
+ * @static
+ * @inheritable
+ * @property {boolean}
+ */
 OO.ui.OptionWidget.static.scrollIntoViewOnSelect = false;
 
 /* Methods */
diff --git a/src/widgets/OutlineOptionWidget.js 
b/src/widgets/OutlineOptionWidget.js
index 2dbfa7f..4ae9e3c 100644
--- a/src/widgets/OutlineOptionWidget.js
+++ b/src/widgets/OutlineOptionWidget.js
@@ -36,12 +36,30 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.OutlineOptionWidget.static.highlightable = true;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.OutlineOptionWidget.static.scrollIntoViewOnSelect = true;
 
+/**
+ * @static
+ * @inheritable
+ * @property {string}
+ */
 OO.ui.OutlineOptionWidget.static.levelClass = 
'oo-ui-outlineOptionWidget-level-';
 
+/**
+ * @static
+ * @inheritable
+ * @property {number}
+ */
 OO.ui.OutlineOptionWidget.static.levels = 3;
 
 /* Methods */
diff --git a/src/widgets/ProgressBarWidget.js b/src/widgets/ProgressBarWidget.js
index fc1b029..c0b0dc3 100644
--- a/src/widgets/ProgressBarWidget.js
+++ b/src/widgets/ProgressBarWidget.js
@@ -64,6 +64,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.ProgressBarWidget.static.tagName = 'div';
 
 /* Methods */
diff --git a/src/widgets/RadioOptionWidget.js b/src/widgets/RadioOptionWidget.js
index 51fda0e..da1bb30 100644
--- a/src/widgets/RadioOptionWidget.js
+++ b/src/widgets/RadioOptionWidget.js
@@ -38,12 +38,28 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.RadioOptionWidget.static.highlightable = false;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.RadioOptionWidget.static.scrollIntoViewOnSelect = true;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.RadioOptionWidget.static.pressable = false;
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.RadioOptionWidget.static.tagName = 'label';
 
 /* Methods */
diff --git a/src/widgets/RadioSelectInputWidget.js 
b/src/widgets/RadioSelectInputWidget.js
index 8e3b5d0..250d863 100644
--- a/src/widgets/RadioSelectInputWidget.js
+++ b/src/widgets/RadioSelectInputWidget.js
@@ -52,6 +52,10 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.RadioSelectInputWidget.static.supportsSimpleLabel = false;
 
 /* Static Methods */
diff --git a/src/widgets/TabOptionWidget.js b/src/widgets/TabOptionWidget.js
index 99a55af..f0eb96f 100644
--- a/src/widgets/TabOptionWidget.js
+++ b/src/widgets/TabOptionWidget.js
@@ -28,4 +28,8 @@
 
 /* Static Properties */
 
+/**
+ * @static
+ * @inheritdoc
+ */
 OO.ui.TabOptionWidget.static.highlightable = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f5420d28f81b78cbfc1eca8cc71eb0755c112cc
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to