Page MenuHomePhabricator

Allow users to use @Mention Functionality to Ping users
Open, MediumPublic

Assigned To
None
Authored By
JTannerWMF
Feb 16 2023, 4:30 PM
Referenced Files
F36931829: Reply to comment-1.png
Mar 29 2023, 11:49 AM
F36931831: Reply to comment.png
Mar 29 2023, 11:49 AM
F36926031: Reply to comment-1.png
Mar 24 2023, 6:08 PM
F36926029: Typing name.png
Mar 24 2023, 6:08 PM
F36926027: @mentions no recent searches.png
Mar 24 2023, 6:08 PM
F36926025: @mention recently searched.png
Mar 24 2023, 6:08 PM
F36926023: Reply to comment.png
Mar 24 2023, 6:08 PM
F36926021: Reply to comment-2.png
Mar 24 2023, 6:08 PM

Description

Background:
Based on the research and work of the Editing team, new users that have traditionally used Talk Pages with VisualEditor have a growing expectation to use @ to mention and ping other users. The iOS app is the last remaining platform to use [[User:Username]], or {{ping|Username}} as the only way to mention a user on a talk page.

The Task:

  • Allow users to use @ Mention to ping a user.
  • After a user types @ to mention a user and starts typing their name, show search of user names
  • When a user presses @ symbol before typing names they see user names of people that have commented in the thread

Additional Considerations
Consider the following scenarios:

  • @ mentioning someone that has a space in their user name
Designs

Link to Figma file

@ mention workflow

  • The design iteration below stems from the iOS teams discussion that suggested to borrow the search overlay from the 'Add link' workflow to use in the @ mention workflow.

Workflow:

  1. The @ button is located in the styling toolbar above the keyboard (or the @ in the keyboard)
  2. Once the contributor taps on the @ button a @ Mention search overlay appear (this can also be triggered if the contributor taps the @ button in their keyboard).
  3. Contributor can search for contributor in the search field, suggestions appear below the search field
  4. Once the contributor taps on a name the overlay gets closed down and the contributors name is added in the comment/topic with @[username]. The entry is highlighted blue.
Empty replyConstructing reply@ mention with previous searches@ mention with no previous searchestyping contributors namename chosen from list
Reply to comment-2.png (667×376 px, 38 KB)
Reply to comment.png (667×376 px, 31 KB)
@mention recently searched.png (667×384 px, 28 KB)
@mentions no recent searches.png (667×384 px, 23 KB)
Typing name.png (667×384 px, 28 KB)
Reply to comment-1.png (667×376 px, 32 KB)

Open questions:

  1. Do we keep the behavior that they have on Android and automatically pre-fill the @[username] when someone replies to a comment?
    • With the addition of the subscribe feature I don't think there is a need for the additional action on iOS because editors get automatically subscribed to topics they author (and therefore receive notifications about and additional comments in the discussion) & editors are able to choose which topics they want to subscribe to and get notified about.

Some past use cases are revised in this sheet:
@mentions: Use cases for iOS

Reference
Android implementation T297912
Android designs on Figma
Use the interaction represented in the Editing Team's deck on slide 16.

Event Timeline

JTannerWMF triaged this task as Medium priority.Feb 16 2023, 4:30 PM

Notes from sync, here's Android's implementation:

  1. When tapping a reply button, the text field immediately starts with @Username (the person they are replying to), colored with blue text.
  2. If a user types another @ symbol, an autocomplete list of usernames appear beneath the text field, that the user can then tap on as a shortcut to entering the user's full name.

The autocomplete list is populated with both user names from an API call (tbd, we will need to Proxyman the Android app to see the call), and the local usernames that are already on the talk page. The local usernames are listed first in the list.

@OTichonova in case it's helpful here are some ways that other apps are handling @ mentions on iOS. The Notion approach might be the most promising for us.

NotioniMessageNotesReminders
IMG_DC43D8AD1565-1.jpeg (2×1 px, 436 KB)
IMG_2CC2FA03E84B-1.jpeg (2×1 px, 882 KB)
IMG_7534.PNG (2×1 px, 3 MB)
IMG_7532.PNG (2×1 px, 886 KB)
JTannerWMF renamed this task from Allow users to use @Mention Functionality to Ping users and autopopulate usernames to Allow users to use @Mention Functionality to Ping users .Mar 29 2023, 4:44 PM
JTannerWMF updated the task description. (Show Details)

More notes from eng sync on Android's implementation:

  • Tokens: hitting backspace on a mention "token" should clear the token and take you back to the search username workflow
  • Deleting one character of the token should delete the entire token for a better experience
  • Hitting space twice in a row should exit the search flow. Using one space is allowed, and usernames can only have one consecutive space character
  • Apple's example of a search token, can be a design alternative https://developer.apple.com/documentation/uikit/uisearchtoken (this element itself only works on search bars and not on text fields, but it can be a useful native reference)