Kmenger has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196719
Change subject: MenuSelectWidget: Clarify description
......................................................................
MenuSelectWidget: Clarify description
Change-Id: I67a6f17572d3c3a7211bb25a697aea99465fd5d2
---
M src/widgets/MenuSelectWidget.js
1 file changed, 13 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/19/196719/1
diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 24d7e97..a1755ed 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -1,8 +1,9 @@
/**
* MenuSelectWidget is a {@link OO.ui.SelectWidget select widget} that
contains options and
- * is used together with OO.ui.MenuOptionWidget. See {@link
OO.ui.DropdownWidget DropdownWidget} and
- * {@link OO.ui.ComboBoxWidget ComboBoxWidget} for examples of interfaces that
contain menus.
- * MenuSelectWidgets themselves are not designed to be instantiated directly,
rather subclassed
+ * is used together with OO.ui.MenuOptionWidget. It is designed be used as
part of another widget.
+ * See {@link OO.ui.DropdownWidget DropdownWidget}, {@link
OO.ui.ComboBoxWidget ComboBoxWidget},
+ * and {@link OO.ui.LookupElement LookupElement} for examples of widgets that
contain menus.
+ * MenuSelectWidgets themselves are not instantiated directly, rather
subclassed
* and customized to be opened, closed, and displayed as needed.
*
* By default, menus are clipped to the visible viewport and are not visible
when a user presses the
@@ -24,9 +25,12 @@
*
* @constructor
* @param {Object} [config] Configuration options
- * @cfg {OO.ui.TextInputWidget} [input] Input to bind keyboard handlers to
- * @cfg {OO.ui.Widget} [widget] Widget to bind mouse handlers to
- * @cfg {boolean} [autoHide=true] Hide the menu when the mouse is pressed
outside the menu
+ * @cfg {OO.ui.TextInputWidget} [input] Text input used to implement option
highlighting for menu items that match
+ * the text the user types. This config is used by {@link
OO.ui.ComboBoxWidget ComboBoxWidget}
+ * and {@link OO.ui.LookupElement LookupElement}
+ * @cfg {OO.ui.Widget} [widget] Widget associated with the menu’s active
state. If the user clicks the mouse
+ * anywhere on the page outside of this widget, the menu is hidden.
+ * @cfg {boolean} [autoHide=true] Hide the menu when the mouse is pressed
outside the menu.
*/
OO.ui.MenuSelectWidget = function OoUiMenuSelectWidget( config ) {
// Configuration initialization
@@ -138,8 +142,10 @@
/**
* Choose an item.
*
- * This will close the menu, unlike #selectItem which only changes selection.
+ * When a user chooses an item, the menu is closed.
*
+ * Note that ‘choose’ should never be modified programmatically. A user can
choose an option with the keyboard
+ * or mouse and it becomes selected. To select an item programmatically, use
the #selectItem method.
* @param {OO.ui.OptionWidget} item Item to choose
* @chainable
*/
--
To view, visit https://gerrit.wikimedia.org/r/196719
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I67a6f17572d3c3a7211bb25a697aea99465fd5d2
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Kmenger <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits