Page MenuHomePhabricator

Implement multilingual captions in UploadWizard
Closed, ResolvedPublic

Event Timeline

Restricted Application added projects: Wikidata, Multimedia. · View Herald TranscriptFeb 28 2018, 1:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

A few questions:

  • What is the minimum & maximum length for caption input? (descriptions, right now, are expected to be between 5 and 10000 characters)
  • Is a caption required? (a description, right now, is required)
    • If required: are there cases where it may not be (descriptions right now are not required for certain campaigns)
  • Metadata descriptions or Flickr descriptions are currently being pulled into the descriptions input - do we want to move any of those to captions?

Change 415331 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Make uw.Description(s)DetailsWidget.js more generic

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

Change 415332 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] [WIP] Add caption input fields

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

A few questions:

  • What is the minimum & maximum length for caption input? (descriptions, right now, are expected to be between 5 and 10000 characters)
  • Is a caption required? (a description, right now, is required)
    • If required: are there cases where it may not be (descriptions right now are not required for certain campaigns)
  • Metadata descriptions or Flickr descriptions are currently being pulled into the descriptions input - do we want to move any of those to captions?

Answers:

  • We've been looking into the max length issue for a while. Because we're supporting different languages, a simple character limit may not be what we'll use. Instead, it may be an indicator based on byte count. Regardless, captions will be short. Like, old Twitter short. I'll let @PDrouin-WMF chime in more
  • We're not yet sure if caption will be required, may depend on if we keep filename/title, and some community input. I'm leaning towards saying it's not required for the first release (this June/July), but will be a required field later.
  • Currently, no, we won't pull in Flickr or other metadata descriptions into captions. Flickr descriptions especially can include markup and this is supposed to be a markup-free field. *If*, in this first release, we include a multilingual details/description field in addition to the caption, we might consider pulling some stuff into there but again markup becomes an issue.
Ramsey-WMF triaged this task as High priority.Feb 28 2018, 6:34 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

@matthiasmullie in my research, I've had people share this info:

In MediaWiki there is module to enforce limits on text fields that are limited to certain number of bytes in the database: https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/jQuery.plugin.byteLimit

I've heard that Twitter uses code points, and that might be better than bytes?

Here are some Twitter-related links:
https://developer.twitter.com/en/docs/basics/counting-characters
https://medium.com/twitter-design-research/looking-after-number-one-forty-20da627e1f2e https://blog.twitter.com/engineering/en_us/topics/insights/2017/Our-Discovery-of-Cramming.html

As I understand it, Twitter currently:

  • has a fixed limit of 280 (most languages) or 140 (Chinese, Japanese, and Korean)
    • that limit is the amount of characters, not the amount of bytes (so characters requiring more bytes only count 1 towards the total allowed length)
  • shows a vague indicator (circular progress bar)
  • shows the exact amount of remaining characters when there are only 20 left

Counting bytes instead of characters makes no sense except for hard storage constraints, which is not the case here. The current length validation for descriptions (5 <= input <= 10000) just tests .length, which is character length (not byte count) already.

As I understand it, we want to encourage short captions.
Does that mean we need to enforce them even if there are no technical reasons for doing so? Or do we just want to nudge people towards writing succinct descriptions, without forcing them to? (accurately describing something that has a really long name might get annoying)

Assuming we don't want to enforce that limit, I'm thinking we could add some progress bar towards some ideal length & warn users once they're over, but still allow them to submit it.
Kind of like how we warn when a user attempts to submit something without categories, but still allow them to submit it. Or maybe not even warn at all: progress bar might suffice to nudge people towards the desirable length.
I don't think we need to display an exact "x characters remaining" count if we don't really enforce it.

As for support in different languages: assuming we have no other research, we could start out with Twitter's findings of nudging people towards <some limit> in most languages, and <some limit / 2> in Chinese, Japanese & Korean?

Thoughts?

Lydia_Pintscher moved this task from incoming to monitoring on the Wikidata board.Mar 5 2018, 4:11 PM

Change 416466 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Improve what details step looks like

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

Does that mean we need to enforce them even if there are no technical reasons for doing so?

Yes. Caption is a short field. We'll have a multilingual "description" field as well, for the longer summaries.

Pam: does this look alright?

So.. how do we proceed wrt the character count?
Does anyone have a suggestion for length and how we convey it? :)

Cparle added a subscriber: Cparle.Mar 7 2018, 3:46 PM

As for support in different languages: assuming we have no other research, we could start out with Twitter's findings of nudging people towards <some limit> in most languages, and <some limit / 2> in Chinese, Japanese & Korean?

This sounds reasonable to me

A hard limit based on a javascript character count is probably the simplest approach - perhaps that's adequate for the first iteration, then we adjust based on feedback?

PDrouin-WMF added a comment.EditedMar 7 2018, 5:55 PM

@matthiasmullie - it's looking good! Two things.

First, Caption. It should look just like Description (language dropdown field and text box for caption). Below the caption's input fields, the call to action should be "Add a caption in another language." Wireframe:


Second, should Caption be required, not optional -- @Ramsey-WMF? I'd like to see it be required.

Second, Character Count. I am not sure how to proceed with determining character count. Who can we reach out to?

Also related: I started a google doc for the help text copy, I will finish it up and share it out for feedback.

@matthiasmullie you said above:

As I understand it, we want to encourage short captions.
Does that mean we need to enforce them even if there are no technical reasons for doing so? Or do we just want to nudge people towards writing succinct descriptions, without forcing them to? (accurately describing something that has a really long name might get annoying)

Assuming we don't want to enforce that limit, I'm thinking we could add some progress bar towards some ideal length & warn users once they're over, but still allow them to submit it.
Kind of like how we warn when a user attempts to submit something without categories, but still allow them to submit it. Or maybe not even warn at all: progress bar might suffice to nudge people towards the desirable length.
I don't think we need to display an exact "x characters remaining" count if we don't really enforce it.

As for support in different languages: assuming we have no other research, we could start out with Twitter's findings of nudging people towards <some limit> in most languages, and <some limit / 2> in Chinese, Japanese & Korean?

I am definitely leaning towards encouraging, not enforcing. I can take a look at some ways to do a progress part towards some ideal length and a warning for it, but I don't know what that length/limit should be (not in English, nor in other languages).

Base added a subscriber: Base.Mar 11 2018, 8:45 PM

See https://docs.google.com/presentation/d/1ACN_ZRPbHVah5lwPBdeYLoHheiHtQ2gK4_lGhnLEVcQ/edit#slide=id.g2efa5e495e_0_14

Is there a version of description of this task that does not require logging into a Google account?

@Base that google presentation was the rough draft which became this design consultation with the community: https://commons.wikimedia.org/wiki/Commons:Structured_data/Get_involved/Feedback_requests/Multilingual_Captions#Discussion

@Ramsey-WMF it's still unresolved in my mind whether a caption character limit must be enforced or not. Should there be a hard limit? If so, how much? It's out of my wheelhouse to determine how much, especially given the plethora of languages. Can we treat the character count like the existing description field is currently handled?

Also @matthiasmullie - the button that takes users to the next step needs to be changed to "Published" per: https://phabricator.wikimedia.org/T182307

The caption was not displayed on that screenshot since it's currently implemented as optional - that's how the description widget already worked.
I've just changed it now so it always show an input, even if not required - empty input will just be ignored.

Few more things we need to figure out:

  • Caption length, how it'll work and what it'll look like
  • Caption required or optional? (and, like descriptions, can campaigns change this?)
    • Description field right now counts characters (not bytes) and needs to be within 5 & 10000 (I assume we want a different number for captions). There is no countdown or indicator you're getting close, but as soon as you hit the limit, an error message will be displayed just below input field (and it's a hard limit: it's not possible to submit once the length is exceeded - that would be easy to change to a "warning", though)
  • Error handling: if captions (or one of them) fail to submit, do we proceed without, or attempt to roll back everything?

Responses to @matthiasmullie

  • I'd like to see caption length mirror file name uses cases (with the addition of being more mutable and multilingual). 255 characters seems good to me as a max length.
  • I think, for the summer launch, it may be most prudent to have the Caption as optional so it initially disrupts as little as possible. Then we would make it a required field later. There is, of course, an argument to be made for making it required from the beginning but that may be met with user resistance.
  • If captions fail, the bigger issue is capturing why they failed. Since this is an important feature I'd want to make every attempt to get it entered correctly, so a roll back/retry on failure is my preference.

Change 419403 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Improve upload error handling

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

I've given the error handling some more thought and am not convinced we need to (attempt to) roll back the upload, should submitting captions fail.
Here's what could go wrong submitting captions:

  • invalid user input: we should validate this before submitting, so this shouldn't be cause for errors
  • upload processing taking too long (assembly & addition of page_prop is deferred...) and we fail to retrieve mediainfo entity id: this is kind of expected to fail immediately after upload so this is attempted 10 times, with increasing intervals (1s, 2s, 3s, ...) but it'll cause failure eventually (after 9 retries, or 45 seconds)
  • fail to submit to wikibase (e.g. it's down): this is not expected to fail, so it'll only be attempted 3 times (with 1s & 2s intervals), mainly to deal with dropped API calls on a flaky connection
  • continued network connectivity issues after the upload did get through already

#4 would make reverting impossible anyway
#2 & #3 would usually be issues on WMF's end - not sure we'd want to throw away users' uploads because our tools broke
#1 if this happens, we should tighten our pre-submit validation...

I suggest that, instead of attempting to roll back & after having automatically retried the calls a few times, we just display an informative error message that explains what happened (file was uploaded, captions weren't), why (the exact error message) and suggest they go to the file page & add the caption there.

Something along these lines:

What do you think?
Also, suggestions for the wording are welcome :)

Something along these lines:

Please also display the caption that we failed to submit, so that the user can copy-paste it.

A few small items for fixes/changes:

  • existing bug: the down arrows on the language selector buttons for Caption and Description don't show up on PC (this has been there for...a long time. would be nice to get it fixed finally :) )
  • When adding captions in both English and Gaelic, only the English one shows up on the file.
  • I think we should limit the UI to only allow one caption per language (i.e. if English is selected in the first box, it should not be available in the other boxes).

Displaying caption(s) in error messages: done
Missing 2nd language caption: that was a problem with the labs instance not showing it - fixed now.
Missing down arrow: T190806: UploadWizard ULS element doesn't show down arrow
Repeating languages in dropdown: T190807: UploadWizard multi-language fields repeat languages across inputs

Nice to see the OOUI icons! The trash icon looks a little large - what are the dimensions?

I'd like to see a little more spacing between the text field instructions and the fields themselves, right now they look a little tight.

Not sure about the trash icon dimensions. The element it is 24px wide (default OOUI icon min width), but part of that is white edges. I'd guess the icon itself is about 18x20 or so.
Which would you like to make smaller? The one on the right of the textareas, the one below the thumbnail image, or both?

Text field/instructions spacing: just added 10px padding.

I double-checked the design style guide (https://wikimedia.github.io/WikimediaUI-Style-Guide/visual-style_icons.html) and if the icon is 18x20, that should be fine.

From the guide:
"Icons follow a template. The default canvas is 20 x 20 dp. In order to allow for optical adjustments, a different margin is applied depending on the shape of the icon. Different shapes have a different perceived size. A 1 dp margin for square-shaped icon is used whilst a circle uses the full 20 x 20 dp canvas available to reach a similar perceived size."

Thanks for adding padding!

kaldari added a subscriber: kaldari.Apr 4 2018, 7:13 PM

Here are my impressions as a Beta Tester...

Personal background for context: Long-time Commons user and administrator (over 2,000 file uploads and 17,000 edits on Commons), also helped write the UploadWizard (sorry!)

The UI looks good and seems to work great (I tried adding multiple languages and copying them).

I was totally confused though as to what a "caption" was. In Wikipedia, a caption is always a description of an image in the context of an article. Since there is no article context in the Upload Wizard, I had no idea what to actually write as a caption. The instructions offered, "Add a brief caption of the file.", don't help to explain it. Once the uploading process was complete, I didn't see the captions that I wrote anywhere, which was also confusing. After a bit of clicking around, I figured out that the captions were actually used as Wikibase labels. I'm wondering if "caption" is the word we actually want to use here. Maybe "label" or "short description" would be better? Since I'm not sure what the actual intended purpose of these Wikibase labels is, I'm not sure what suggestion would be best.

Another thing that was slightly confusing was the instructions for the description field: "Describe what is notable about the file." I realize this is just a shortened version of the old help text ("Briefly describe everything notable about the work. For a photo, mention the main things that are depicted, the occasion, or the place."), but I feel like the overall gist of the instructions has been lost.

Keep up the great work!

Thanks for the detailed feedback @kaldari . We're in the process of researching how to improve wording for the instructional text, and JMo is helping us run a study/survey that you can track here (https://phabricator.wikimedia.org/T190428)

Here are my impressions as a Beta Tester...
Personal background for context: Long-time Commons user and administrator (over 2,000 file uploads and 17,000 edits on Commons), also helped write the UploadWizard (sorry!)
The UI looks good and seems to work great (I tried adding multiple languages and copying them).
I was totally confused though as to what a "caption" was. In Wikipedia, a caption is always a description of an image in the context of an article. Since there is no article context in the Upload Wizard, I had no idea what to actually write as a caption. The instructions offered, "Add a brief caption of the file.", don't help to explain it. Once the uploading process was complete, I didn't see the captions that I wrote anywhere, which was also confusing. After a bit of clicking around, I figured out that the captions were actually used as Wikibase labels. I'm wondering if "caption" is the word we actually want to use here. Maybe "label" or "short description" would be better? Since I'm not sure what the actual intended purpose of these Wikibase labels is, I'm not sure what suggestion would be best.
Another thing that was slightly confusing was the instructions for the description field: "Describe what is notable about the file." I realize this is just a shortened version of the old help text ("Briefly describe everything notable about the work. For a photo, mention the main things that are depicted, the occasion, or the place."), but I feel like the overall gist of the instructions has been lost.
Keep up the great work!

Change 419403 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Improve upload error handling

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

Change 415331 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Make uw.Description(s)DetailsWidget.js more generic

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

Change 415332 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Add caption input fields

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

Note: We'll leave this ticket in until UI copy work is complete and we're ready to move to prod.

Change 434652 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Redesign arrow steps

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

It looks like my June 11th comment (https://phabricator.wikimedia.org/T189145) got lost in the shuffle. UI copy will be complete when Description is updated to: “Provide all information that will help others understand what this file represents.” See below for more detail:

Caption UI copy

Caption copy on labs is accurate:
“Add a one-line explanation of what this file represents, including only the most relevant information.”

Description UI copy

UW currently displays:
“Provide all information that will help others understand what this file represents.”

Labs currently displays:
“Describe what is notable about the file.”

Description *should* be updated to:
“Provide all information that will help others understand what this file represents.”

matthiasmullie closed this task as Resolved.Aug 28 2018, 10:46 AM

Description copy was updated already. I guess I just hadn't gotten around to updating it up labs - done now!