Page MenuHomePhabricator

Include users’ “signature name” in @-mention autocomplete
Closed, ResolvedPublic

Description

Users sometimes use a different link label in their signature. E.g. [[User:Jdforrester|James F.]]. It is also used when users want to transliterate their name into a different script, e.g. [[User:קיפודנחש| קיפודנחש (aka kipod)]] (https://en.wikipedia.org/wiki/Talk:Hewlett-Packard_9100A?dtenable=1)

As the link label is the only thing that is shown on the page, this should be included in the list of autocomplete suggestions.

Event Timeline

As the link label is the only thing that is shown on the page, this should be included in the list of autocomplete suggestions.

@Esanders can you please confirm the below is accurate/exhaustive? I'm wanting to make sure I am understanding what this task is asking for.

Behavior

  1. Visit a page that contain comments written by someone (call them Person A) whose signatures contain link labels that are different from their username. E.g. https://en.wikipedia.org/wiki/Talk:Hewlett-Packard_9100A?dtenable=1
  2. Open the Reply Tool in a section where Person A has posted a comment. E.g. https://en.wikipedia.org/wiki/Talk:Hewlett-Packard_9100A#False_claim:_first_scientific_calculator
  3. Type @ to open the username suggestion list.

Current

  1. Notice the username suggestion list is populated with Person A's "given" username (read: Jdforrester)

Desired

  1. ✅ Notice the username suggestion list is populated with Person A's "customized" username link label (read: James F.)

Notice the username suggestion list is populated with Person A's "customized" username link label (read: James F.)

I'm not expressing an opinion on which name we show in the initial suggestion list when no search text has been entered, but it should at least be possible to search for both.

An example of where we do auto-complete based on multiple fields is our language selector.

I can search for "Spanish" or "español":

image.png (140×492 px, 6 KB)

image.png (138×494 px, 7 KB)

Testing extracting display names against our test corpus (which isn't very representative: it include a Village Pump (technical) snapshot, and some other talk pages from fr/ar/pl), I've tried to categorise the results so we can what type of things we would get by pulling in display names. I've excluded any results where the display name is a substring of the username.
Transliteration - these are "good" results and one of the big reasons we should try to support this

"Adil Faouzi -> عادل فوزي"
"Arvedui89 -> Aʀvєδuι"
"Azoee -> Azoée"
"Azoee -> azoée"
"Bander7799 -> بندر"
"Daxipedia -> Daxipedia - 達克斯百科"
"FShbib -> شبيب.."
"Mustafa -> مصطفى"
"Þjarkur -> Thjarkur"
"קיפודנחש -> קיפודנחש (aka kipod)"
// Removing some diacritics?
"شيماء -> شَيْمَاء"

Adding real name, or stripping numbers - also a really useful case, you may not know the user's technical username

"Beetstra -> Dirk Beetstra"
"LoreMariano -> Lore E. Mariano"
"Masumrezarock100 -> Masum Reza"
"Pigsonthewing -> Andy Mabbett"

Abbreviations/Handles - also useful

"Pawnkingthree -> P-K3"
"Winged Blades of Godric -> ∯WBG"
"Digging.holes -> DH"
"Maile66 -> — Maile"
"Idraulico liquido -> --1dr4uI1c0"
"Lorenzo Longo -> Lollo"
"Wugapodes -> Wug·"

Fixing spaces, spelling or punctuation - probably less useful as an autocomplete will likely lead you to the proper username, but ok to include. Could also probably be ignored if we wanted.

"Roxy the dog -> Roxy, the dog."
"Girth Summit -> GirthSummit"
"Michalwadas -> Michał Wadas"
"Pawelmhm -> pawelmxm"

Everything below here are display names it would be nice to ignore, if possible

Stylistic - Could be ignored if we ignore non-letters, although harder with the small uppercase example ("cmɢʟee")

"Cmglee -> cmɢʟee"
"Oshwah -> ~Oshwah~"
"Pppery -> * Pppery *"
"ToBeFree -> ~ ToBeFree"

Bad interpretations:

// Displays as "older ≠ wiser" with each word linking to user and user talk respectively
"Bkonrad -> older"
// Displays as "Étienne" with "É" linking user user and "tienne" linking to user talk
"Etienne -> É"
// User signs their name unliked, then "// W A K E U P //" linked to user page
"Bilorv -> // W A K E U P //"

Pleasantries

"Humorous1234 -> Sincerely, Humorous."

Normalisations we should be able to ignore:

// Non-breaking space
"Matma Rex -> Matma Rex"
"Writ Keeper -> Writ Keeper"
// Other
"El C -> El_C"
"Épine -> épine"

Decided with @ppelberg:

  • Not to display any display names in the default list when you first press '@'
  • If a search string matches a display name, then show any matches, example from task description: Search for "jame" would show "Jdforrester" as a match

As a result we will only ever increase the number of local search results, but never decrease.

Change 830183 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Show usernames when display names are matched

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

Change 830183 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Show usernames when display names are matched

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

matmarex assigned this task to Esanders.