Jump to content

Wikipedia:Deferred changes/Implementation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cenarium (talk | contribs) at 15:07, 9 October 2016 (AbuseFilter commits for compatibility: not required). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Editing of a page where a revision was recently actively deferred due to it being tagged as a redirect to a nonexistent page from mediawiki core.

The page details the proposed technical implementation of deferred changes.

For tags added in core or by extensions like AbuseFilter, FlaggedRevs checks the added tags with the ChangeTagsUpdate hook. If any of the added tags is meant to indicate a problem, it defers the edit. By relying on the already well integrated change tag functionality, this can be easily used from a variety of sources. Problem tags are specified by tag managers, they trigger a deferral by default, but can be selectively prevented from doing so.

Bots can directly defer an edit with the API. Extensions may also choose to directly defer an edit rather than using tags as user-controlled intermediaries.

To defer an edit, flagged revisions is enabled on the page and the latest edit prior to the latest user is marked as reviewed. The page appears at Special:PendingChanges and the edits can be reviewed. If one of the tag is listed as needing 'active' deferral, then the stable version is displayed to readers by default.

A deferred page is recorded in the database with a "defer" level, and whenever an edit to a page with "defer" level is reviewed, the config is reset. So this implements the "defer until reviewed" concept. No change in the db schema is needed.

FlaggedRevs commits

Core commits required

  • gerrit:201905 Unify ChangeTags hooks, create ChangeTag and ChangeTagsContext classes
  • gerrit:218265 Overhaul caching of tag usage statistics
  • gerrit:211497 Drop down menu for selecting tags
  • gerrit:190656 Allow patrolling of tagged changes with minimalist RC patrol (this adds 'problem' tags)