Expand all

ve.ui.GutterSidebarEditCheckDialog

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

Source:
GutterSidebarEditCheckDialog constructor.

Methods

findNearestActions() → {Object} #

Find nearest suggestions above and below user's current position

Returns:

Type
Object
Source:
Find nearest suggestions above and below user's current position

findReusableWidget(oldWidgets, actions) → {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. 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
Source:

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.

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

Source:
Handle updates to the list of edit check actions.

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

Source:
Handle an action that arrives before all checks for its listener finish

onFocusAction(action, index, scrollTo) #

Handle focusAction events from the controller

Parameters:

Name Type Description
action mw.editcheck.EditCheckAction
index number
scrollTo boolean
Source:
Handle focusAction events from the controller

onPosition() #

Handle position events from the controller

Source:
Handle position events from the controller

onScrollIntoViewCloseClick() #

Handle click events from scroll-into-view's close button.

Source:
Handle click events from scroll-into-view's close button.

onScrollIntoViewShowClick() #

Handle click events from scroll-into-view's show button.

Source:
Handle click events from scroll-into-view's show button.

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

Source:
Render the current actions as gutter icons, grouping overlapping actions.

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
Source:

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

Source:
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

Source:
Show the edit check dialog with a specific widget's actions and a specific action focused

whenActionsRendered() → {jQuery.Promise} #

Wait for some actions to have been rendered by this dialog

Returns:

Type
jQuery.Promise
Source:
Wait for some actions to have been rendered by this dialog