Page MenuHomePhabricator

Implement edit check configuration setting to restrict sections it'll apply within
Closed, ResolvedPublic

Description

We want to build a denylist for section-titles inside the edit check config JSON that'll allow the projects to list sections that references shouldn't be suggested within. This should be able to include the lead section, which has no title. It could allow more-fancy regular expressions so they can specify common plurals and suchlike, but doesn't have to.

This is likely to be a generally applicable setting to future checks.

Event Timeline

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

[mediawiki/extensions/VisualEditor@master] Edit check config for whether to ignore references in certain sections

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

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

[VisualEditor/VisualEditor@master] Refactor dm.Document getNearestFocusableNode to use a generic helper

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

Change 961855 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Refactor dm.Document getNearestFocusableNode to use a generic helper

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

Change 979443 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (de810d614)

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

Change 979443 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (de810d614)

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

Change 961853 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check config for whether to ignore references in certain sections

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

DLynch added a project: Editing QA.

Testing this will involve editing the MediaWiki:Editcheck-config.json message. It adds support for two new keys:

  • ignoreSections is an array of section names, which will be compared case-insensitively to headings. If a heading matches an item in this array, all content within that section will be ignored for checks
  • ignoreLeadSection is a boolean. If true, the content of the "lead section" will be ignored for checks. A lead section is defined as content in article with at least one heading that precedes the first heading.

e.g.

image.png (510×648 px, 50 KB)

Ryasmeen moved this task from QA to Ready for Sign Off on the Editing-team (Kanban Board) board.
Ryasmeen edited projects, added Verified; removed Editing QA.