Page MenuHomePhabricator

[Story] Custom edit summaries
Open, NormalPublic

Description

Some edits require a bit of explanation. Our automatic edit summaries don't cover this completely. Therefore we should offer a way for experienced editors to provide more insight into edits.

Constraints:

  • It needs to be unobtrusive
  • It needs to give about 5 to 7 default explanations to chose from so they're still translatable. This list should depend on edit context - so for example be specific to edits in sitelinks.

TODO:

  • Get the list of default explanations.

Notes:

  • Bene's UI concept for surfacing the edit summaries is very good. It does not cover the selection part yet but instead lets the user enter free form text. This should only be a last resort for us as it can't be translated.
  • Bene's code is at User:Bene*/statementfilter.js and should be built upon.

Details

Reference
bz45224

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:14 AM
bzimport set Reference to bz45224.
bzimport added a subscriber: Unknown Object (MLST).

In my opinion this is a wrong approach, the user should never write edit summaries manually.

Maybe a drop-down menu with predefinite reasons. In this way is also translatable.

pinkampersand.wikimedia wrote:

(In reply to comment #1)

In my opinion this is a wrong approach, the user should never write edit
summaries manually.

Well, users already do, when using the "undo" and "restore" features. The reason for that is presumably that when reverting someone else, you should generally give an explanation. Well I'd say that the same goes for removing a link.

Still, if people are really opposed to allowing custom summaries, can we at least implement the drop-down part?

It is currently possible to add custom summaries when using the API.
Not possible in the UI currently.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

If this task is going to remain open it should likely cover adding summaries when making any changes in the UI..

Bugreporter renamed this task from Allow detailed summaries for link removals to Allow detailed summaries in GUI.Feb 11 2015, 6:52 AM
Bugreporter set Security to None.
MGChecker added a subscriber: MGChecker.
jayvdb added a subscriber: jayvdb.Jul 30 2015, 11:13 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 30 2015, 11:13 AM
Lydia_Pintscher renamed this task from Allow detailed summaries in GUI to [Story] Allow detailed summaries in GUI.Aug 18 2015, 10:32 AM
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher added a subscriber: Bene.

Ricordisamoa: I looked at your solution as well and I first didn't see it at all. It is disconnected from the actual task the editor is doing. I also believe storing the edit summary across edits will lead to many wrong edit summaries. I don't think this is the UI concept we can go with for the final solution unfortunately.

Nikki added a subscriber: Nikki.Feb 24 2016, 9:12 PM
Bugreporter renamed this task from [Story] Allow detailed summaries in GUI to [Story] Allow detailed summaries.Jul 8 2016, 3:44 PM
Bugreporter updated the task description. (Show Details)
Bugreporter added subscribers: YFdyh000, Zppix.
Sjoerddebruin raised the priority of this task from Normal to Needs Triage.Jul 12 2016, 3:50 PM
Sjoerddebruin triaged this task as Normal priority.

If my edit is simple enough that "5 to 7 default explanations" cover it, it's probably obvious enough it could be without a summary. I guess that might cover specifically "why I am removing this link", but I'd like to explain, for example, why I'm changing a label. That's something I can't do at all presently from the UI AFAICT - no reference fields (why? some labels can most definitely be referenced) and no way to explain why I think label X is better than label Y, so people just need to trust me.

ElanHR added a subscriber: ElanHR.Aug 10 2018, 1:20 AM
CatCat added a subscriber: CatCat.Aug 11 2018, 2:25 PM
Lydia_Pintscher renamed this task from [Story] Allow detailed summaries to [Story] Custom edit summaries.Mar 8 2019, 10:48 AM
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher added a subscriber: Yurik.
Yurik added a comment.Mar 8 2019, 5:53 PM

This feature has been requested several times when adding Wikibase to OpenStreetMap wiki. I think the very first step we can already do is to make it possible for gadgets to add edit summary string during the "save" command. This way we can experiment with the UI implementation.

What is the recommended way for gadgets to dynamically modify POST parameters?

mxn added a subscriber: mxn.Mar 9 2019, 2:20 AM
Yurik added a comment.Mar 16 2019, 9:23 PM

Here's a working implementation using the browser's prompt text box, based on the original idea by @Ricordisamoa. Copy it into your https://wiki.openstreetmap.org/wiki/User:___username___/common.js page. Note that the save will happen even if the user clicks Cancel because there is no good way to abort saving without crashing. This code can be directly used as a gadget.

/*
 * EditWikidataSummary.js
 * @author [[User:Yurik]] based on code by [[User:Ricordisamoa]]
 */
( function( $, mw, window ) {
  $( function () {
    if( !mw.config.exists( 'wbEntityId' ) ) {
      return;
    }
    mw.hook('wikibase.entityPage.entityView.rendered').add(function () {
      oldPost = wb.api.RepoApi.prototype._post;
  
      wb.api.RepoApi.prototype._post = function ( params ) {
        if ( params.summary === undefined ) {
          var summary = window.prompt('Enter edit summary (optional):', '');
          if ( summary ) {
            params.summary = summary;
          }
        }
        return oldPost.call( this, params );
      };
    } );
  } );
} )( jQuery, mediaWiki, window );
abian added a subscriber: abian.Mar 20 2019, 7:28 PM