Page MenuHomePhabricator

Username suggestions/autocompletion for edit summaries
Open, Needs TriagePublicFeature

Description

Feature summary:
Suggest usernames of users that have been part of the page history and more after pressing @ at edit summaries and autocomplete their pinging/mentioning.

Use case(s):
Sometimes when reverting you want to be able to mention in the summary the user whose edits you just reverted and explain the reason why you did so and offer some suggestions for improvements. Sometimes you want to mention multiple users in creating help pages to divide work. In all those cases it would be fruitful if we could have the autocompletion features that Discussion tools provide for mentioning users. The suggestions should start with the names of the users who have been part of the page history in chronological order, showing a limited number for pages with a long history, and be able to expand in all possible users if you so wish.

Benefits:
Summary mentioning is already a thing you can do manually. Providing automatic help on it would benefit everyone who's already using such a function.

Link to a discussion about this in EnWiki

Event Timeline

It's technically doable but has a few dependencies:

  • the @mention stuff in DT uses the VE / 2017 wikitext editor framework, which is currently not used in edit summaries; we'd either need to drop it in there or reimplement the completion widget to not depend on anything VE-related
  • I'm not sure an API exists for fetching users who're involved in the page history (the one in DT uses a combination of gathering usernames that're on the current discussion and the query:allusers API)

It's technically doable but has a few dependencies:

  • the @mention stuff in DT uses the VE / 2017 wikitext editor framework, which is currently not used in edit summaries; we'd either need to drop it in there or reimplement the completion widget to not depend on anything VE-related
  • I'm not sure an API exists for fetching users who're involved in the page history (the one in DT uses a combination of gathering usernames that're on the current discussion and the query:allusers API)

I'd wish for the "implement VE / 2017 wikitext editor framework" solution personally because that would hopefully also come with extra features such as text formatting in summaries etc. Many times in the past I've tried bolding a part of the summary text only to have that part just come out surrounded by many apostrophes or <b> tags, with no way to re-edit it (maybe that's another detail that should be discussed). Although summaries do come preformatted in italics so that would also require some minor discussion on its own I believe.

As for the API part, that was what made me afraid it would make the work stalled and why I was also considering going the user script way in the original discussion.

Tacsipacsi subscribed.
  • I'm not sure an API exists for fetching users who're involved in the page history (the one in DT uses a combination of gathering usernames that're on the current discussion and the query:allusers API)

Yes: action=query&prop=contributors.

I'd wish for the "implement VE / 2017 wikitext editor framework" solution personally because that would hopefully also come with extra features such as text formatting in summaries etc.

No, it probably wouldn’t. Summaries are used at a lot of places, and lifting a 18-year-old restriction (7c1b75d, although Phabricator refuses to show the diff for the interesting part, Skin.php, probably just because the author is written as Erik M�ller instead of Erik Möller) needs much more discussion than just this ticket. Exactly because edit summaries can’t be edited afterwards, letting users use various formatting would make it possible to create a hard-to-read edit histories (colors, font sizes, maybe even images) without a way to moderate them except for the total removal.

I'd wish for the "implement VE / 2017 wikitext editor framework" solution personally because that would hopefully also come with extra features such as text formatting in summaries etc.

No, it probably wouldn’t. Summaries are used at a lot of places, and lifting a 18-year-old restriction (7c1b75d, although Phabricator refuses to show the diff for the interesting part, Skin.php, probably just because the author is written as Erik M�ller instead of Erik Möller) needs much more discussion than just this ticket. Exactly because edit summaries can’t be edited afterwards, letting users use various formatting would make it possible to create a hard-to-read edit histories (colors, font sizes, maybe even images) without a way to moderate them except for the total removal.

I was thinking precisely scenarios like that when I said that it required more discussion but I do believe summaries can use some enrichment in features. For example, text formatting starting from small changes like bolding to bigger ones like subsections or even minor listing abilities if we would want that or re-edit features similar to .JS pages where they can be re-edited only by their creator or admins. This would probably also have to come with some enrichment in features in the way we showcase summaries in page histories, recent changes and user contributors BUT this is all a different story. I'm glad we have an existing API for the contributors part though. :)

Oh, yeah, if we were to do that it'd just be to make it a fancier textbox, one which can reuse the tools we've made elsewhere for more full-featured wikitext environments. I doubt we'd turn on VE itself, we'd just have the framework that's needed to include things like @mentions or other link dialogs.