Class DeputyContributionSurveyRow

A UI element used for denoting the following aspects of a page in the contribution survey: (a) the current status of the page (violations found, no violations found, unchecked, etc.) (b) the name of the page (c) special page tags (d) the number of edits within that specific row (e) the byte size of the largest-change diff (f) a list of revisions related to this page (as DeputyContributionSurveyRowRevision classes) (g) closing comments

Hierarchy

Implements

Constructors

Properties

additionalComments: Element[]

Additional comments that may have been left by other editors.

checkAllButton: ButtonWidget

Button that checks all revisions of this row

commentsField: FieldLayout<Widget>

FieldLayout for commentsTextInput. If not set, this field is not rendered.

commentsTextInput: TextInputWidget

TextInputWidget for closing comments. Used by both renderFinished and renderUnfinished.

disabled: boolean
element: HTMLElement

This row's content element. Gets swapped when loaded.

DeputyUnfinishedContributionSurveyRow, if rendered. Only rendered if this row was already finished.

nextRevisionRequestResponder: any = ...
originalElement?: HTMLLIElement

The "LI" element that this row was rendered into by MediaWiki.

originalWikitext: string

Original wikitext of this element.

The revisions associated with this element. Only populated by renderUnfinished.

rootElement: HTMLElement

This row's main root element. Does not get swapped.

The contribution survey row data

The section that this row belongs to

Sort order of this row. Automatically guessed when loaded.

state: DeputyContributionSurveyRowState = DeputyContributionSurveyRowState.Loading

The state of this element.

statusAutosaveFunction: (() => void)

A function (throttled with mw.util.throttle) that saves the current row's status and comments to DeputyStorage to recover unsaved data or data that could not be saved (e.g. status when some revisions remain unassessed).

statusDropdown: DeputyCCIStatusDropdown

OOUI DropdownWidget for the current row status

statusRequestResponder: any = ...

Responder for session requests.

unfinishedMessageBox: MessageWidget

Message box displayed when a user has set a status but not yet cleared all diffs.

wasFinished: boolean

Whether this row was originally finished upon loading.

menuOptionIcon: Record<ContributionSurveyRowStatus, string | false> = ...

Accessors

  • get statusModified(): boolean
  • Returns boolean

    true if: (a) this row's status changed OR (b) this row's comment changed

    This does not check if the revisions themselves were modified.

Methods

  • Extracts HTML elements which may be additional comments left by others. The general qualification for this is that it has to be a list block element that comes after the main line (in this case, it's detected after the last . This appears in the following form in wikitext:

    * [[Page]] (...) [[Special:Diff/...|...]]
    *: Hello! <-- definition list block
    ** What!? <-- sub ul
    *# Yes. <-- sub ol
    * [[Page]] (...) [[Special:Diff/...|...]]<div>...</div> <-- inline div

    Everything else (*<div>..., *'''..., *<span>, etc.) is considered not to be an additional comment.

    If no elements were found, this returns an empty array.

    Returns Element[]

    An array of HTMLElements

  • Renders the commentsTextInput variable (closing comments OOUI TextInputWidget)

    Parameters

    • Optionalvalue: string

    Returns TextInputWidget

    The OOUI TextInputWidget