This task involves the work of introducing a new edit suggestion within the VisualEditor Suggestion Mode that makes people aware when an internal link appears >1x time in the same section.
Deployment plan
#TODO. See T413257.
Meta
- Relevant wish, policy, guideline, template, etc.: en:MOS:DUPLINK
- Suggestion scope: Many Wikipedias
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: 1000000
- 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.
- ignoreSections: []
- 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: []
- hasTemplate: []
- An array of templates whose presence should cause this check to be offered.
- lacksTemplate: []
- An array of templates whose absence should cause this check to be offered.
- Account: false
- Detection heuristic:
- An internal link appears >1x in the same == H2 == within a root level paragraph
- NOTE: links to different sections within the same articles should be considered different links. I.e. we’d show a suggestion if Article A#Foo was linked twice, but not show a suggestion if Article A + Article A#Foo were each linked.
- Edit Tag(s): See T413419
User experience
- Card design
- Title: Duplicate links
- Description (≤2 sentences): “This link appears more than once in this section. Help make Wikipedia easier for people to read by removing this link. Learn more.
- Note: the Learn more link ought to be configurable on a per project basis.
- Link to learn more: Local language equivalent of WP:MOSLINK (For Enwiki, use MOS:REPEATLINK)
- Calls to action
- Remove link: When tapped, remove the link
- Dismiss: When tapped, leave the link in question unchanged
- Success toast: Thank you for helping to make this section easier for people to read.
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
References
Checklists
Milestones / Review stages
- Code implemented and on patchdemo
- Code merged
- Code deployed and available as an experimental check on wikis. Expected in deployment on Thursday, January 29th.
- Configuration agreed with community (if necessary)
- Configuration deployed and available as an experimental check
Implementation checklist
- User is shown a duplicate link edit check on the second and subsequent occurrence of an internal link within each section.
- These should be covered ensuring the links are in the fsame h2 at root level:
- Links inside <ref> must not be counted
- Links inside image captions, templates etc should not be captioned
- Links inside templates should be ignored
- Links to the same document but different sections are different
- Instrumentation is included
- Covered by the controller - it doesn't look like we need to do anything special here
- Check user experience against requirements
-
Toast when the action is resolved, not just when the user hits "fix"- Dropping from MVP: it's hard to avoid firing such a toast for a bunch of other stuff, like larger deletions, and it looks like a chunk of work to enable doing so if the user takes positive action from a context panel, which would also be cross-cutting with other edit checks
- See T401941: Consider generic success / dismiss notifications for checks
-
"Learn more" opens in a new window- Having links and internationalisation at the same time are currently mutually exclusive; this is blocked on T415323: Create a community configurable way to include links within Edit Check/Suggestion Cards.
- Define an initial configuration file for enwiki
For further discussion - file a general ticket / file a subtask / it's a checklist item / don't do
- Deployment plan
- Config change will be discussed in meetings or async, otherwise no obvious ambiguity
- Check default configuration / initial config file against requirements
- Rephrasing "Wikipedia" to make it easier for languages with cases
- ignoreSections should be fleshed out with "external links", "related", "see also" etc. Should we start by copying from addReference in https://en.wikipedia.org/wiki/MediaWiki:Editcheck-config.json ? Community feedback?
- We're doing this in configuration
-
Check strings are internationalised- We may be handling this in a different ticket as part of a review of all experimental check internationalisation.
- See T415323: Create a community configurable way to include links within Edit Check/Suggestion Cards for resolving the "learn more" link
- Could there be reasons to match inside templates?
- We'll discuss elsewhere
- To catch lists, do we want to expand ignoreSections with prefixes/regexps? Match article titles?
- Not MVP, and cross-cutting, and in any case bullet lists will not be at root level.
- Highlight visibility / role discussion
- not mvp, but will raise in meeting
- Widgets-as-toast discussion
- not mvp, will raise in meeting
Other notes
- We might want to allow templates in general but exclude specific templates, eg {{term}} and {{defn}} to ignore duplicates in lists
- List articles should be ignored, but we don't have an easy way to detect them.
