Page MenuHomePhabricator

Implement edit check configuration setting to specify categories it'll apply within
Closed, ResolvedPublic

Description

T330112 introduced an initial set of facets volunteers could use to configure Edit Check on a per project basis.

This task involves the work of introducing a new "configurable facet": categories.

Categories could be helpful in the following contexts:

  1. Enabling volunteers to specify the subject areas [i] a particular domain/source is considered reliable/unreliable within. [ii]
  2. Enabling volunteers to specify subject areas [i] where references may not be needed when adding new content
  3. Enabling volunteers to specify Reference Check not activate on disambiguation pages or redirects [iii]

i. Read: categories and sub-categories
ii. Via @Sdkb in T346849#9185418
iii. Via @Thryduulf on en.wiki

Event Timeline

DLynch renamed this task from Implement edit check configuration setting to specify sections it'll apply within to Implement edit check configuration setting to specify categories it'll apply within.Sep 29 2023, 10:24 PM

I said this in a discussion elsewhere, so getting it written down here:

I’d assume we’d want both “is in category” and “isn’t in category” and to allow those in combination with each other, and to act based on the current set of categories in the edited state of the document. The latter would need some minor refactoring of how we test check-visibility, because we currently make some decisions about whether to initially set up edit check based on whether we think it’s possible for any edit check to show, and that’d suddenly be something that could change during editing.

ppelberg added a subscriber: Thryduulf.

Enabling volunteers to specify Reference Check not activate on disambiguation pages or redirects [iii]

@Esanders noting offline, "...it's worth noting that it's very unlikely to trigger on a disambig page as they consist of lists, which are already excluded from the check (e.g. https://en.wikipedia.org/wiki/Set).

Change #1216658 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Edit check: pass a document model to the config checker

https://gerrit.wikimedia.org/r/1216658

Change #1216659 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Edit check: add config to restrict a check to a given category

https://gerrit.wikimedia.org/r/1216659

Change #1216658 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check: pass a document model to the config checker

https://gerrit.wikimedia.org/r/1216658

Change #1216659 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check: add config to restrict a check to a given category

https://gerrit.wikimedia.org/r/1216659

The mwCategory group doesn't contain hidden categories, whereas I think for this usage we do want them.

To see this, open https://en.wikipedia.org/wiki/Happiness_Is_a_Warm_Gun?veaction=edit

> ve.init.target.surface.model.documentModel.getMetaList().getItemsInGroup( 'mwCategory' ).map( item => item.element.attributes.category )

(9) ['Category:1968 songs', 'Category:The Beatles songs', 'Category:Songs written by Lennon–McCartney', 'Category:Song recordings produced by Chris Thomas (record producer)', 'Category:Song recordings produced by George Martin', 'Category:Songs published by Northern Songs', 'Category:Obscenity controversies in music', 'Category:Songs banned by the BBC', 'Category:Songs about Yoko Ono']

Compare this fuller list:

> mw.config.get( 'wgCategories' )
(20) ['Articles with short description', 'Short description is different from Wikidata', 'Use British English from August 2010', 'All Wikipedia articles written in British English', 'Use dmy dates from March 2019', 'Articles with hAudio microformats', 'All articles with specifically marked weasel-worded phrases', 'Articles with specifically marked weasel-worded phrases from January 2023', 'All articles with vague or ambiguous time', 'Vague or ambiguous time from October 2022', 'Webarchive template wayback links', '1968 songs', 'The Beatles songs', 'Songs written by Lennon–McCartney', 'Song recordings produced by Chris Thomas (record producer)', 'Song recordings produced by George Martin', 'Songs published by Northern Songs', 'Obscenity controversies in music', 'Songs banned by the BBC', 'Songs about Yoko Ono']

So I'll write a patch to use this instead

Change #1223681 had a related patch set uploaded (by Divec; author: Divec):

[mediawiki/extensions/VisualEditor@master] Edit Check: Consider hidden categories when restricting checks

https://gerrit.wikimedia.org/r/1223681

Note that wgCategories is populated at load time, so won't reflect changes during the edit session. On the other hand, it does include categories that implicitly apply to the page via a template.

We've also now implemented useTemplate, which is an alternative approach we're using for T413420. Either template or category could be useful, depending on the particular circumstances.

Change #1223681 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit Check: Consider categories added by a template when restricting checks

https://gerrit.wikimedia.org/r/1223681

ppelberg reopened this task as Open.EditedFeb 3 2026, 8:57 PM

@dchan: can you please update https://www.mediawiki.org/wiki/Edit_check/Configuration#Tone_check_configuration to reflect the new type of configuration this ticket enables?