Page MenuHomePhabricator

Link inspector shows duplicate results for single word articles
Closed, ResolvedPublic

Description

The first result here is redundant:

image.png (377×408 px, 34 KB)

Interestingly this doesn't happen if the match is fuzzier (in this case a capitalisation fix for the second word):

image.png (266×415 px, 23 KB)

Event Timeline

This was deliberately fixed to behave like this in T52452, so that typing "<ctrl>+k, iPhone" didn't result in the text IPhone being inserted. Since then we have fixed the link insertion code to always use the casing in the input field.

This extra result is actually removable by config (addQueryInput) which was added for CX and other use cases.

If we set this to false then the user would no longer be able to type in lower case then select their result from the list and keep casing, however I think that is less of an issue than the current confusing double result. In fact I think the double result is so confusing we should make the addQueryInput default to false, and probably deprecate it.

If we do keep/use addQueryInput, the extra result should at least have the correct metadata:

image.png (377×408 px, 42 KB)

Change 532691 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Use correct metadata when adding exact query match

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

Change 532693 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Link inspector: Turn off 'addQueryInput'

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

Change 532691 merged by jenkins-bot:
[mediawiki/core@master] Use correct metadata when adding exact query match

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

Change 532693 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Link inspector: Turn off 'addQueryInput'

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

ppelberg claimed this task.