Page MenuHomePhabricator

Explore enabling wikis to customize what syntax is used for @ mentions
Closed, ResolvedPublic

Description

T232601 implements @ mentions in such a way that when someone selects "UsernameA" from the username completion list, a link to "UsernameA's" user page (e.g. [[User:UsernameA]]) is inserted into the Reply text input area.

This task is about exploring the tradeoffs of enabling wikis to customize what template is inserted into the Reply text input area when someone selects a username from the username completion list.

e.g. a wiki might choose to have {{Notify|UsernameA}} as their completion.

Constraints

Certain aspects of @ mentions should not be configurable:

  • The username suggestion list trigger sequence: @
  • Depending on the inspector interaction (T252083), the mention syntax (e.g. link or template)

Dependencies

Our ability to customize how the user page link inspector looks and behaves (see T252083) depends on the @ mention autocomplete (see T232601) outputting certain syntax.

  • As such, the @ mention syntax should not be made configurable until after T252083 is resolved.

Open questions

  • What value is there in encouraging the use of localized templates when [[User:UsernameA]] will cause a notification to be sent?

Done

  • Determine whether to make the @ mention syntax configurable on a per-wiki basis.

Event Timeline

Given the open question, should this be an "Explore..." task?

Given the open question, should this be an "Explore..." task?

You beat me to it. Task title updated.

ppelberg renamed this task from Enable wikis to customize what syntax is used for @ mentions to Explore enabling wikis to customize what syntax is used for @ mentions.Apr 16 2020, 10:42 PM
ppelberg claimed this task.
ppelberg updated the task description. (Show Details)

For RTL wikis, is it possible to use the symbol instead of the @? So {{ping|مستخدم}} will display مستخدم◀ ! (USER=مستخدم)

Thank you for raising this point, @Dyolf77_WMF.

Note from this week's team meeting

  • Our ability to customize how the user page link inspector looks and behaves (see T252083) depends on the @ mention autocomplete (see T232601) outputting certain syntax.
    • As such, the @ mention syntax should not be made configurable until after T252083 is resolved.
  • Certain aspects of @ mentions should not be configurable:
    • The username suggestion list trigger sequence: @
    • Depending on the inspector interaction (T252083), the mention syntax (e.g. link or template)

The above has been added to the task description.

For RTL wikis, is it possible to use the symbol instead of the @? So {{ping|مستخدم}} will display مستخدم◀ ! (USER=مستخدم)

Depending on the approach we settling on for inserting pings, having the '@' character which is used to trigger the interface get replaced with a different one could cause problems if the user tries to edit the mention. Again this depends on how we finally implement mention editing.

It also may be confusing in general for the character typed to not be the one that is shown, although I appreciate in RTL there are other concerns.

Change 617805 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Allow the mention prefix to be configured via a message

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

As @Dyolf77_WMF noted offline and captured in this video [i], after selecting someone from the username suggestion list using the Patch demo linked above, the @, rather than the character is being prepended to user-to-be-pinged's username.

Next steps

  • Editing Engineering to investigate why the above is happening

i. https://youtu.be/Tvc5DV5CDVw

We weren't using the content language for the prefix message, this should be fixed at http://patchdemo.wmflabs.org/wikis/03cf1da7dd9d63e9e8bb70b558d6086b/w/index.php/Talk:Main_Page

Great – thank you, Ed. I've added the above patch demo link to the testing instructions in T258743#6358018 and made Habib aware of this offline.

We weren't using the content language for the prefix message, this should be fixed at http://patchdemo.wmflabs.org/wikis/03cf1da7dd9d63e9e8bb70b558d6086b/w/index.php/Talk:Main_Page

Great – thank you, Ed. I've added the above patch demo link to the testing instructions in T258743#6358018 and made Habib aware of this offline.

Per T258743#6380422, volunteers at ar.wiki have confirmed the pinging feature is working as they expected.

Next steps

  • Code review and deploy

Change 617805 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Allow the mention prefix to be configured via a message

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