Extends
Constructor
new ve.ui.GutterSidebarEditCheckDialog(config)
#
GutterSidebarEditCheckDialog constructor.
The edit check dialog which is created when the user is on mobile. It adds a narrow gutter wide enough to show an icon. When clicked, we create (or reuse) a ve.ui.FixedEditCheckDialog instance to show the check details.
Parameters:
| Name | Type | Description |
|---|---|---|
config |
Object | Configuration options |
Methods
findNearestActions() → {Object}
#
findReusableWidget(oldWidgets, actions) → {mw.editcheck.EditCheckGutterSectionWidget|null}
#
null}
#
Find an old widget that can show a section
A widget can show the section if the section has all of the widget's actions. Then an icon stays in place when a new action joins its section. An acting widget is preferred, so that it is not removed while its action runs.
Parameters:
| Name | Type | Description |
|---|---|---|
oldWidgets |
Array.<mw.editcheck.EditCheckGutterSectionWidget> | |
actions |
Array.<mw.editcheck.EditCheckAction> | Actions of the section |
Returns:
- Type
-
mw.editcheck.EditCheckGutterSectionWidget
|
null
Find an old widget that can show a section
A widget can show the section if the section has all of the widget's actions.
getSetupProcess()
#
getTeardownProcess()
#
initialize()
#
onActionsUpdated(listener, actions, newActions, discardedActions, rejected)
#
Handle updates to the list of edit check actions.
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
string | Check listener |
actions |
Array.<mw.editcheck.EditCheckAction> | All current actions |
newActions |
Array.<mw.editcheck.EditCheckAction> | Newly added actions |
discardedActions |
Array.<mw.editcheck.EditCheckAction> | Newly removed actions |
rejected |
boolean | The last action was rejected/dismissed |
onActionsUpdatedProgress(listener, action, oldAction)
#
Handle an action that arrives before all checks for its listener finish
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
string | Check listener |
action |
mw.editcheck.EditCheckAction | |
oldAction |
mw.editcheck.EditCheckAction
|
null
|
Previously present equal action |
onAttentionActiveChange(active)
#
Handle attentionActiveChange events from the controller
Parameters:
| Name | Type | Description |
|---|---|---|
active |
boolean |
onFocusAction(action, index, scrollTo)
#
Handle focusAction events from the controller
Parameters:
| Name | Type | Description |
|---|---|---|
action |
mw.editcheck.EditCheckAction | |
index |
number | |
scrollTo |
boolean |
onIconAttentionActiveChange(active)
#
Handle iconAttentionActiveChange events from the controller
Parameters:
| Name | Type | Description |
|---|---|---|
active |
boolean |
onPosition()
#
Handle position events from the controller
onScrollIntoViewCloseClick()
#
Handle click events from scroll-into-view's close button.
onScrollIntoViewShowClick()
#
Handle click events from scroll-into-view's show button.
onScrollIntoViewSuppressedChange(suppressed)
#
Handle scrollIntoViewSuppressedChange events from the controller
Parameters:
| Name | Type | Description |
|---|---|---|
suppressed |
boolean |
onScrollIntoViewVisibilityChange()
#
Handle visibilityChange events from scrollIntoView widget
An icon's attention state isn't reset by scrolling once initially triggered (unlike the button's attention state), so it needs to be updated as what's visible changes instead. scrollIntoView already computes this so we'll reuse that.
Handle visibilityChange events from scrollIntoView widget
An icon's attention state isn't reset by scrolling once initially triggered (unlike the button's attention state), so it needs to be updated as what's visible changes instead.
renderActions([newActions])
#
Render the current actions as gutter icons, grouping overlapping actions.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
newActions |
Array.<mw.editcheck.EditCheckAction> |
optional |
Newly found actions, which could takeFocus |
scrollToNearestAction([direction]) → {boolean}
#
Scroll to the action nearest the user's current position
If actions exist both above and below, it will default to scrolling to the action above, unless the direction parameter is passed.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
direction |
string |
optional |
Direction to scroll if actions exist both above and below |
Returns:
An action was found and focused
- Type
- boolean
Scroll to the action nearest the user's current position
If actions exist both above and below, it will default to scrolling to the action above, unless the direction parameter is passed.
setOutsideSectionState()
#
Notify the scroll-into-view widget of the state of suggestions around this section
showDialogWithAction(action, [scrollConfig])
#
Show the edit check dialog with a specific widget's actions and a specific action focused
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
mw.editcheck.EditCheckAction | Action to focus |
|
scrollConfig |
Object |
optional |
Configuration for scrolling |
updateAttentionTargets(active)
#
Toggle the attention effect on whichever section is closest to the user's current position
If suggestions are already visible, arbitrarily pick one; otherwise use the nearest suggestions both above and below
Parameters:
| Name | Type | Description |
|---|---|---|
active |
boolean |
Toggle the attention effect on whichever section is closest to the user's current position
If suggestions are already visible, arbitrarily pick one; otherwise use the nearest suggestions both above and below