Page MenuHomePhabricator

Disambiguation notifications: Add support for CodeMirror
Closed, ResolvedPublic3 Estimated Story Points

Description

This is an extension to T285508: Show notification when users type a link to a disambiguation page, which adds a feature that notifies the user after they type a link to a disambiguation page. This works only in the native MediaWiki editor. This task is about making it also work when MediaWiki-extensions-CodeMirror is enabled. Will live entirely in the Disambiguator.

Acceptance Criteria:

  • Same as T285508, except it should also work with syntax highlighting (aka CodeMirror) is turned on. You can turn this on by clicking on the highlighter icon in the toolbar (see F34663240 for a visual reference of what that button looks like)

Event Timeline

ldelench_wmf set the point value for this task to 3.

Change 737998 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Disambiguator@master] Add CodeMirror compatibility to DisambiguatorNotifications

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

Change 737998 merged by jenkins-bot:

[mediawiki/extensions/Disambiguator@master] Add CodeMirror compatibility to DisambiguatorNotifications

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

For some reason source editing seems to be missing here: https://en.wikipedia.beta.wmflabs.org/wiki/Conflict-title-0.5849369982825903-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n?action=edit
I'm not able to test this now on beta πŸ˜’, will need to investigate whats up

Screen Shot 2021-11-12 at 5.14.31 PM.png (1Γ—2 px, 546 KB)

For some reason source editing seems to be missing here: https://en.wikipedia.beta.wmflabs.org/wiki/Conflict-title-0.5849369982825903-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n?action=edit
I'm not able to test this now on beta πŸ˜’, will need to investigate whats up

The Code Mirror extension is in the 2010(?) wikitext editor. These instructions should tell you how to access it on beta: https://www.mediawiki.org/wiki/User:DWalden_(WMF)/Code_Mirror. Let me know if that helps.

I tested this a little bit on Friday. What I haven't tested so far is how the notification handles different ways of writing links in wikitext (see examples here: https://www.mediawiki.org/wiki/Help:Links)

Thanks @dom_walden that was helpful! My preference was set to show only one editor type. Will take a look at the different ways of writing links.

I have confirmed that disambiguation notification shows when highlighter is on and user types a disambiguation link
Note: Notification does not show when user inserts a disambiguation link
Test url: https://en.wikipedia.beta.wmflabs.org/wiki/BeforeEach-name-0.5880059578787176-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n
Note: The notification does not show on IE 11 browser only. It shows on other supported browsers.
Screen shot:

Screen Shot 2021-11-16 at 4.19.32 PM.png (1Γ—2 px, 378 KB)

NRodriguez added a subscriber: NRodriguez.

Works great πŸŽ‰