Page MenuHomePhabricator

Automatic upload comments by Upload Wizard are unhelpful, make them more informative
Closed, ResolvedPublic

Description

Currently all uploads made by UploadWizard have the same revision comment: "User created page with UploadWizard". Let's make this slightly more informative...

The code that sets the comment can be found in mw.UploadWizardDetails.submitWikiText().

  • For uploads with an "ownwork" deed (i.e. uploaded by the creator), please set the comment to 'Uploaded own work with UploadWizard'.
  • For uploads that are not ownwork, please set the comment to 'Uploaded a work by ' + author + ' from ' + source + ' with UploadWizard'.

To get the author and source, you can do something similar to:

deed = this.upload.deedChooser.deed;
author = deed.getAuthorWikiText( this.upload );
source = deed.getSourceWikiText( this.upload );
NOTE: Related discussion on Village pump proposals (VPP) of Wikimedia Commons.

Event Timeline

Aklapper renamed this task from Make upload comments more informative to "User created page with UploadWizard" upload comments are unhelpful, make them more informative.Sep 30 2019, 10:01 AM
AlexisJazz renamed this task from "User created page with UploadWizard" upload comments are unhelpful, make them more informative to Make upload comments more informative.Sep 30 2019, 10:01 AM
AlexisJazz renamed this task from Make upload comments more informative to User created page with UploadWizard" upload comments are unhelpful, make them more informative..
AlexisJazz updated the task description. (Show Details)
AlexisJazz updated the task description. (Show Details)
AlexisJazz updated the task description. (Show Details)
AlexisJazz renamed this task from User created page with UploadWizard" upload comments are unhelpful, make them more informative. to "User created page with UploadWizard" upload comments are unhelpful, make them more informative..Sep 30 2019, 10:03 AM

I did not say that "community consensus is required". I referred to some consensus / feedback which specific changes make sense and should be made. :)

I did not say that "community consensus is required". I referred to some consensus / feedback which specific changes make sense and should be made. :)

Oh, I interpreted "once there is agreement" as a need for community consensus. Well, doesn't hurt to get some more people involved to craft the most optimal message. I'm not a programmer, so this may not work but I hope it gives you the idea:

if ( information.source === {{own}} ) {
uploadcomment = 'Uploaded own work by ' + information.author + ' licensed ' + deed.getLicenseWikiText( this.upload ) + ' with ' + mw.UploadWizard.userAgent;
} else {
uploadcomment = 'Uploaded a work by ' + information.author + ' from ' + information.source + ' licensed ' + deed.getLicenseWikiText( this.upload ) + ' with ' + mw.UploadWizard.userAgent;
}

if ( the var that holds the url for upload_by_url !== undefined ) {
uploadcomment = uploadcomment + ' (direct link: ' + the var that holds the url for upload_by_url + ')';
}

I hereby release this little doodad as CC0. (if it's not PD-ineligible anyway..)

@DannyS712 perhaps you could make the example above into something that would actually work? (not sure who to ask..) Also, @Fae asked if it would be possible to add information from the EXIF.

It's been a while since this task was opened. I think volunteer developers could work with this task so I am adding patch-welcome.

@Masumrezarock100: I don't see general agreement yet how exactly to fix this task (there are several suggestions in the task description), so I don't think this task is ready to receive a patch yet...? I might misinterpret though.

Ok. Let's continue the discussion on Commons village pump and see what community wants and what kind of decision they will make in the end.

@Masumrezarock100: I don't see general agreement yet how exactly to fix this task (there are several suggestions in the task description), so I don't think this task is ready to receive a patch yet...? I might misinterpret though.

None of those suggestions are incompatible with each other, are they? Ideally we do them all?

One minor thing to note, that sometimes this description is used to run stats on how popular different upload methods are. However, that would be a silly reason to keep it the way it is. I've always been kind of annoyed by the lack of descriptive description.

One minor thing to note, that sometimes this description is used to run stats on how popular different upload methods are. However, that would be a silly reason to keep it the way it is. I've always been kind of annoyed by the lack of descriptive description.

Shouldn't that be resolved by using the tag instead? This tag is hidden from the file history, unlike these:

But it's there.

I'd rather wait until the proposal on Commons VPP reaches consensus. Otherwise we may need to work on it more than one time.

Masumrezarock100 renamed this task from "User created page with UploadWizard" upload comments are unhelpful, make them more informative. to Automatic upload comments by Upload Wizard are unhelpful, make them more informative.Oct 17 2019, 3:05 PM
Masumrezarock100 updated the task description. (Show Details)

@Bawolff What would it take to move this forward?

@Bawolff What would it take to move this forward?

Someone to write a patch to upload wizard. If you want to convince someone from a WMF team to do it, Multimedia would be the obvious candidate. Otherwise anyone familar with javascript can submit one. Possibly me if i have some time over the weekend.

@Bawolff What would it take to move this forward?

Someone to write a patch to upload wizard. If you want to convince someone from a WMF team to do it, Multimedia would be the obvious candidate. Otherwise anyone familar with javascript can submit one. Possibly me if i have some time over the weekend.

I suppose my little doodad is unsalvageable? (I can't be offended, JS is not my thing) In that case, yes please, a patch is much appreciated.

@Masumrezarock100: It's up to teams what they plan to work on and want to see on their work, hence I'm removing Multimedia from this task.

I wonder if we can get a Google-Code-in-2019 participant to work on this. But this seems to be a complicated change. 🤔. @Aklapper thoughts?

@Masumrezarock100: Feel very free to mentor if you know the UploadWizard code base well enough: https://www.mediawiki.org/wiki/Google_Code-in/Mentors

@Masumrezarock100: Feel very free to mentor if you know the UploadWizard code base well enough: https://www.mediawiki.org/wiki/Google_Code-in/Mentors

Finding mentors is difficult. I don't know the code well enough. So I can not mentor this task. Which is why I didn't add the project tag.

Hmm, then I'm not sure why you the previous comment was added. Maybe it wasn't clear that before could get a "participant", you'd need a mentor? :)

I can mentor this but until concerns of T234192#5567124 are cleared. That's by making clear explanation of what's needed and step-by-step description. I don't know who is to actually finally approve this too, but it would be good to get that approval beforehand. The task currently seems just a like a suggestion to me.

Clarification : this task is not only about making upload comments by Upload wizard more informative but also other upload tools.

For UploadWizard

  • Change UploadWizard comment for {{own}} to "Uploaded own work by $author licensed $license with UploadWizard"
    • Change UploadWizard comment for other works to: "Uploaded a work by $author from $source licensed $license with UploadWizard"

Automatic upload summary by Upload wizard should include at least these following informations. Author, license, and also source (in case the file isn't an own work)

For Special:Upload

  • Empty/truncate the description in the upload comment when using Special:Upload to increase the odds of the author/source being included

Currently if someone uploads a file using Special:Upload. MediaWiki puts whatever is in the description field to the upload comments. This puts unnecessary information to the upload comment. It should not happen. There should be a "summary" textbox.

  • When using upload_by_url, include the URL (goes for both UploadWizard and Special:Upload)

When uploading a file via URL, automatically include the URL in the upload comment. Something like "Imported from https://example.com/example.jpg".

For VisualEditor (crosswiki upload)

"Crosswiki upload" is an upload method of the visual editor if I am not mistaken. "Cross-wiki upload from fr.wikipedia.org" comments is not helpful for patrollers. It should include at least author, license, and source information. Same suggestions as upload wizard should be followed. Also I've seen files uploaded using VisualEditor from Commons. For those cases, the upload comment becomes "Cross-wiki upload from commons.wikimedia.org", certainly they are not "cross-wiki" uploads. This task looks like a suggestion, and it kind of is.

Developers are free to amend these suggestions if they wish. I am not the proposer but I tried best of my abilities to answer your question. If something is still unclear, @AlexisJazz might be able to answer your question more clearly than anyone else. While we have acquired community consensus, we'd need support and definitely approval (as Ammarpad mentioned) from the current maintainers of the extensions (Upload Wizard and Visual editor). Special:Upload is a generic mediawiki core special page, so I am tagging Platform Engineering for review. Feel free to remove these tags if they are wrong.

Clarification : this task is not only about making upload comments by Upload wizard more informative but also other upload tools.
Developers are free to amend these suggestions if they wish. I am not the proposer but I tried best of my abilities to answer your question.

Thanks. You tried. But I am even more convinced now that this task needs clear approval from the product owners on whether they approve these several changes. Any patch for a task like this is destined to linger on Gerrit or vetoed before going anywhere.

Thanks for looping us in @Masumrezarock100 . According to the maintainers list the stewards of the upload code are Multimedia, and @kaldari is the maintainer. I've changed the tags and backed us out, but let us know if we can be helpful.

@eprodromou: That would require WMF teams to maintain and clean up their docs. See T240281#5748875.

If it makes any difference, I endorse this change (as one of the original authors of UploadWizard). Note that no one really owns UploadWizard currently (as we don't actually have a multimedia team at the moment), so it's basically just in maintenance mode, i.e. bug fixes. If you want to get a feature change like this done, you'll either need to convince one of the people who is familiar with the extension to work on this in their spare time or have a volunteer developer work on it. I imagine the WMF will re-convene a multimedia team at some point, so worst case scenario would be to wait until then.

srishakatux subscribed.

Removing good first task tag as this task doesn't seem to have clear instructions for a new contributor to get started unless someone who knows what exactly needs to be done & how can edit the task description.

kaldari added a project: good first task.

@srishakatux - I fixed up the task description to make it specific and give some pointers. Hope that helps!

JTannerWMF subscribed.

This falls outside the scope of our team at this time.

For VisualEditor (crosswiki upload)

"Crosswiki upload" is an upload method of the visual editor if I am not mistaken.

The upload dialog is available from both editors, not only VE. https://www.mediawiki.org/wiki/Upload_dialog

Also I've seen files uploaded using VisualEditor from Commons. For those cases, the upload comment becomes "Cross-wiki upload from commons.wikimedia.org", certainly they are not "cross-wiki" uploads.

Known issue: T137269

The description of this bug originally included a hodge-podge of several different issues in different interfaces (all related to revision comments for uploads). In order to make the task more actionable, I've narrowed it specifically to address the issues with UploadWizard. Any remaining issues (such as with the upload dialog in the editor), should be filed as separate bugs. Thanks.

Soda subscribed.

@kaldari Should I hard code the text or should I throw them on the messages API? The original text for the comment was hardcoded but like the manuals ask you to put almost all UI text via the messages API so don't know which one I should be doing...

@Soda - That's a great question. I believe the reason the text was hard-coded is that revision comments on Commons should ideally be in English rather than in the uploader's language. I would suggest keeping the messages hard-coded for now. We can always migrate them to the messages API later if needed.

Change 575310 had a related patch set uploaded (by Sohom Datta; owner: Sohom Datta):
[mediawiki/extensions/UploadWizard@master] Made upload comment more informative

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

@kaldari That clears up my confusion. Thanks for the help :)

Change 575310 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Made upload comment more informative

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