Wikipedia:Deferred changes/Implementation
The page details the proposed technical implementation of deferred changes.
A hook is added to the updateTags function of the ChangeTags class in core, and FlaggedRevs checks the added tags. If any of the added tags is meant to indicate a problem, 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:ProblemChanges and the edits can be reviewed. If one of the tag is listed as needing 'active' deferral (at MediaWiki:Flaggedrevs-tags-list-defer-active), then the stable version is displayed to readers by default and the page is listed at Special:PendingChanges along with edits to pending changes protected pages.
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. By relying on the already well integrated change tag functionality, this can be easily used from a variety of sources. All AbuseFilter tags are considered to indicate a problem for example, so will always prompt a passive deferral. Problem tags can be selectively prevented from triggering a deferral if listed in MediaWiki:Flaggedrevs-tags-list-defer-exempt.
FlaggedRevs commits
- gerrit:218104 Main implementation
Core commits required
- gerrit:201905 Unify ChangeTags hooks, create ChangeTag and ChangeTagsContext classes
- gerrit:c/190656 Allow patrolling of tagged changes with minimalist RC patrol
- gerrit:218266 Create ChangeTagsUpdate hook and flags describing update method
- gerrit:218267 Add user param to recentchange_save hook
Those depend on other commits at the moment, all of them are available as a single commit in https://gerrit.wikimedia.org/r/#/c/218104/.
AbuseFilter commits for compatibility
- gerrit:206476 Implement ChangeTagsRegister
- gerrit:c/218270 Pass extra params to addTags function
Related commits
- gerrit:213578 Allow extensions to not show RC patrol UI in diff
- gerrit:213582 Don't show RC patrol UI on reviewable diffs
- gerrit:219770 Allow extensions not to show patrol footer on articles
- gerrit:219771 Don't show patrol footer to reviewers on reviewable pages