Page MenuHomePhabricator

Add user mentions to InlineComments
Open, Needs TriagePublic


The InlineComments should support "@"-style user mentions. That means the following:

  • If a user types "@" in a comment (either a new comment or a reply), then an alphanumeric character afterwards, an autocompletion dropdown should appear, letting the user select from the set of usernames on the wiki that match what the user has typed.
  • If the user selects one of those usernames from the dropdown, the username should appear, highlighted or bolded in some way.
  • Once a comment is saved, the username(s) in that comment should still be highlighted or bolded when the comment is displayed.
  • Any users who are "mentioned" in an inline comment should get notified, via the Echo extension.

There seem to be three main ways to do this: an entirely custom solution, a solution involving a 3rd-party autocompletion JS library, or via the "@"-autocompletion feature in the DiscussionTools extension, which in turn relies on VisualEditor. If one were to go with the third approach, it would mean that every textarea in InlineComments would in reality be a VisualEditor input; if that were done, it may make sense to use JS or CSS to hide the VE toolbar from users. (It would also mean that three other MW extensions would be required for the InlineComments user mentions feature to work fully: VisualEditor, DiscussionTools and Echo.)

Event Timeline

@Yaron_Koren May I take up this issue? Can you guide me in locating the codebase where this issue is located? I have previous experience working in React and Django and am learning Rails and have good knowledge of Javascript..

@Sairamnst - just to clarify, this is not a microtask, it's a major task! But if you want to work on this now, feel free. You can find everything about InlineComments, including links to the codebase, here:

Thank you so much! I will start working on this... Can you suggest some microtasks that I can work on too? I would like to contribute any way I can?

Just to clarify - is this for the Google Summer of Code, or unrelated?

This is my first time participating for Google Summer of Code so I am a bit unaware of the process... Where should I start at?

I see - please go to the main task (T356436) and pick one of the micro tasks that are remaining and no one is working on. I think there are two right now - I may add more.

@Yaron_Koren there are multiple approaches for this fix , one such approach is using Discussion Tools extension along with Visual Editor and Echo , I feel using visual editor but hiding the toolbar defeats the purpose of the rich-text editor extension but it is needed for Discussion tools and echo extension is already integrated with it via topic subscriptions feature. Whereas on using a 3rd party autocompletion library like etc we would need to populate the user data. Which approach would you suggest to be more favourable or would you suggest a custom approach?

I think using a 3rd party autocompletion library is the better option, if it's possible - using VisualEditor would be somewhat of a hack.