Page MenuHomePhabricator

Disambiguation pages: Move disambiguation page to bottom of search result
Closed, ResolvedPublic3 Estimated Story Points



This is in response to the Warn when linking to disambiguation pages wish from the 2021 Community Wishlist Survey.

The idea is that, at least on content projects like Wikipedia, users almost never want to link to disambiguation pages. The theory is many new users link to i.e. New York when they really meant New York City or New York (state). Thus, when I use VisualEditor's link tool to add insert a link, "New York City" and "New York (state)" should be shown before "New York" in the search results.

Extension:Disambiguator integrates with VisualEditor. For instance the icon shown in the search results (via Extension:PageImages) is the OOUI icon for a disambiguation page. So VE should have prior knowledge that a search result is a disambiguation page. Instead of manipulating the search API backend itself, we can reorder the results on the clientside to show disambiguation pages last since they are rarely desirable.

Acceptance Criteria:

  • Disambiguation pages should show at the bottom of list from top recommendations when linking to a page

Event Timeline

ldelench_wmf set the point value for this task to 3.Jul 15 2021, 5:19 PM

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

[mediawiki/core@master] TitleWidget: add option to show disambiguation pages last in results

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

[mediawiki/extensions/VisualEditor@master] MWInternalLinkAnnotationWidget: show disambiguation pages last

Change 708363 merged by jenkins-bot:

[mediawiki/core@master] TitleWidget: add option to show disambiguation pages last in results

Change 708372 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] MWInternalLinkAnnotationWidget: show disambiguation pages last

QA notes:

  • You can go to Special:DisambiguationPages to see all the disambiguation pages on the beta cluster.
  • If you want to create a new page (disambiguation, or not), be aware that the Beta Cluster's search apparently doesn't immediately know about newly created pages. I ran into this when trying to create New York (state). Both New York City and New York (the disambig page) were already on the beta cluster.
  • Testing should involve adding links to these pages – both via the link icon in VisualEditor toolbar, and same icon as seen in the 2017 wikitext editor.

A big thanks to @Djackson-ctr for testing this task, Below is his testing result:

Compatibility Testing was performed on the following:
Desktop -- Firefox version 90 Windows 10 / Chrome version 92 Windows 10 / Microsoft Edge version 91 Windows 10 / Safari version 14 Mac OS 11 / Internet Explorer version 11 Windows 10

Mobile Devices -- Android version 11 Samsung FE20 phone / Android version 8.1 Galaxy A10 tablet / iOS version 14.5 iPad 5th generation / iOS version 14.5 iPhone 11 Pro Max.

Per the QA Notes in the ticket:
Verified all 17 items (listed on the DisambiguationPages) displayed at the bottom of the Search Results:
Used existing disambiguation pages on beta site.
Verify the Search Results using VisualEditor and the Source Editor (2017 Wikitext Editor).

Sample testing screenshots:

Screen Shot 2021-08-09 at 9.42.17 PM.png (1Γ—892 px, 207 KB)

Screen Shot 2021-08-09 at 9.43.36 PM.png (650Γ—888 px, 86 KB)

Screen Shot 2021-08-09 at 9.44.01 PM.png (1Γ—1 px, 499 KB)

Screen Shot 2021-08-09 at 9.44.35 PM.png (1Γ—842 px, 365 KB)

Two issues where discovered while testing, the other tests result loading appropriately
Possible defect 1:

Notice a minor issue when I did a search using the letters Op I noticed the words Options VisualEditor Test (According to the list of Disambiguation pages the words Options VisualEditor Test is considered as a disambiguation page) was listed in the middle of the search results instead of the bottom of the search results…

Screen Shot 2021-08-09 at 9.52.29 PM.png (692Γ—572 px, 83 KB)

Possible defect 2:
Not sure if this is by design; using an Android phone (Samsung FE20 with Android version 11) or Apple phone (iPhone 11 Pro Max with iOS version 14.5) I have noticed when I select Source Editing (WikiEditor) its not displaying the Add a link feature, instead it just displays the following:

Screen Shot 2021-08-09 at 9.54.50 PM.png (176Γ—1 px, 66 KB)

If you click the pencil icon you will see options for Visual Editing and Source Editing β†’ if you select Visual Editing the page will be modified to display the link icon which will lead you to the Add a Link page β†’ but if you select Source Editing you will not see the link icon for the Add a Link page.

@NRodriguez @MusikAnimal could you confirm if the above 2 issues needs a bug task to track them. Thank you.

amazing work! already starting to see its benefits in the user tests!