This task involves the work of introducing a new edit suggestion within the VisualEditor Suggestion Mode that makes people aware when a variety of English is being used within an article that does not align with the tag/template associated with said article.
Deployment plan
In technical terms, this can be deployed by adding it to the existing configuration on enwiki.
- enwiki already has a configuration for textmatch, so the british-english section of the configuration file below should be added to textMatch.matchItems.
- A user with permission to edit the configuration must make the change.
- To repeat: do not replace the existing configuration wholesale.
- Ensure it's not enabled by default
Process-wise, the fact that this was implemented with TextMatchEditCheck as a pure configuration change has surfaced that we do not yet have a decided process around deployments of this type; see comment section for discussion of how we're going forward with this.
Meta
- Relevant wish, policy, guideline, template, etc.: en:MOS:ENGVAR
- Suggestion scope: en.wiki
Requirements
Meta
- Configuration
- Account: false
- Specify which account state the edit check should apply to. Valid values are "loggedin", "loggedout", false. The default false results in the edit check applying to all users.
- maximumEditcount: 100000
- Specify a threshold for the number of changes at which Edit Check is activated. The default 100 means that the edit check will only be shown to users with 100 edits or fewer. If this value is not defined, the default value is used. The number of edits is based on user edit count, edits from all namespaces are taken into account.
- ignoreSectionsminimumEditcount: []
- An array of section titles, 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: false
- If true, the content of the lead section will be ignored for checks. A lead section is defined as content in an article with at least one heading that precedes the first heading.
- Enabled: true
- If true, the check will be enabled, assuming all other configuration allows it to be shown. If false, the check will not be shown.
- Type Suggestion
- inCategory: #TODO
- hasTemplate: #TODO
- An array of templates whose presence should cause this check to be offered.
- lacksTemplate: #TODO
- An array of templates whose absence should cause this check to be offered.
- Account: false
- Detection heuristic: #TODO
- Edit Tag(s): See T413419
User experience
- Card design
- Title: British/American English detected
- Description (≤2 sentences): Consider adjusting this word to American English/British English so that it is consistent with how the rest of the article is written. Learn more.
- Link to learn more: MOS:ENGVAR
- Calls to action
- Switch: When tapped, automatically adjust the word in question to use the British/American English equivalent
- Note: the above assumes communities will have configured these mappings.
- Dismiss: When tapped, leave the word in question unchanged
- Switch: When tapped, automatically adjust the word in question to use the British/American English equivalent
- Success toast: Thank you for helping to make this article easier for people to read and follow.
Instrumentation
As with all Edit Checks and Suggestions, we will want to know...
- Any time a Suggestion of this type is activated within an edit session
- Any time someone views a Suggestion of this type within an edit session
- Any time someone engages with a Suggestion and how they engage with it
See also
Artifacts
Checklists
Milestones / Review steps
- Patchdemo
- Deployed to enwiki for experimental mode
- Done?
Head of queue
- File ticket to add toast for TextMatchEditCheck
- Kinda. We're doing T415185
- Identify if we can include internal links in TextMatchEditCheck for the "learn more" link; file ticket if not
- This is somewhat cross-cutting with internationalisation. This is still somewhat in discussion but we're likely to add i18n strings as we move checks out of experimental, so that translators do not get extra unnecessary work before we're ready to go.
Any time
- Discuss bringing toasts to the config level for all checks
- Will be filing a ticket. Won't block here, instead considering the toast as part of the toast implementation task
- Word list community feedback
- Discuss T415181: [Spike] TextMatchEditCheck: allow exclusion of certain node types
- We're implementing ignoreQuotes
Before deploy
-
Agree a word list with community feedback - Agree when to deploy this config change
- Engineering/PM happy going to go ahead, but not enabled by default
- Checking in with community liaison first
- Check TextMatchEditCheck has instrumentation (probably); file ticket if not
- Yup, we've got the built-in ones for all checks
- Update description text to match current description
- Decide if excluding blockquotes etc is blocking (see T415181). Block or file follow up ticket as appropriate.
- Yes, and
- Block on ignoreQuotes being available and add ignoreQuotes to the config
Once ready
- Deploy the config change
- Add a note to the core template that if you're redirecting a template to it, also add to the edit check
