Page MenuHomePhabricator

[XL] Improve the file name, caption, and description fields
Closed, ResolvedPublic

Description

This task is part of improving the describe step of the Upload Wizard on Commons T358765. Refer to overall design discovery and design goals in this ticket T358614

In order to simplify the information that users need to fill out describe step, the following changes to the UI are proposed

  • Visual improvements: Improve the overall layout by following new styling and spacing for the form and its fields
  • Copy improvements: Changing headers and helper text for each of the field
  • Required field: Making caption a required field
  • Changes to description field: Adding an option for users to copy their caption to description

Title
Link to UI

  • Update the label for the title field from image title to title
  • Remove the label description from the title field
  • Show a single line input box
  • Do not show any error message on load of the page. Error messages will only be shown when the user proceeds without entering required input.
  • Update the copy for the current error message for when the title is not unique as show here
  • If the user proceeds without a title show the error as shown here
  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank
  • Update the copy for the current error message for when the user has not entered a descriptive title as show here.
    • Update the copy on the "view example" dialog as shown here (pending community review see discussion below)

Caption
Link to UI

  • Make the caption field a required field. Remove the optional label
  • Update the label description to the following copy: "One-line explanation"
  • Have the language selector take the full width of the input box
  • Remove the delete icon for the first caption
  • Show the delete icon for all the subsequent language captions that users adds as shown here
  • Show a single line caption input box
  • If the user proceeds without entering a caption show an error message as shown here

Description
Link to UI

  • Description remains a required field
  • Update the label description to the following copy: "We recommend providing detailed information on this work if you can"
  • Automatically copy caption to description by default unless the "same as caption" box is unchecked
  • Hide the description input box and show "same as caption" checkbox selected by default as shown here
  • When the "same as caption" checkbox is unselected, reveal the description blank input box as shown here
  • Remove the delete icon for the first caption
  • Show the delete icon for all the subsequent language descriptions that users adds as shown here
  • Show a multi line description input box with the ability for the user to expand the input box using a corner handle. Keep the current functionality of it auto expanding as one needs more space.
  • If the user proceeds without entering a description show an error message as shown here

Event Timeline

Sneha renamed this task from Redesign the describe step in the upload wizard to Improve the file name, caption, and description fields.Mar 26 2024, 8:11 PM
Sneha updated the task description. (Show Details)
MarkTraceur renamed this task from Improve the file name, caption, and description fields to [XL] Improve the file name, caption, and description fields.Apr 4 2024, 8:53 PM
mfossati changed the task status from Open to In Progress.Apr 9 2024, 10:41 AM
mfossati claimed this task.

Change #1020880 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[mediawiki/extensions/UploadWizard@master] Upload Wizard Describe step: improve title, caption, and description

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

mfossati added a subscriber: AUgolnikova-WMF.

Submitted a draft patch that needs extra pairs of eyes. Moving to code review.

I think that we should first discuss the following ACs, CC @Sneha @AUgolnikova-WMF :

  • Do not show any error message on load of the page. Error messages will only be shown when the user proceeds without entering required input.
  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank

I'd love to hear the rationale behind these ones, as I'm inclined towards the opposite.

  • Show a multi line description input box with the ability for the user to expand the input box using a corner handle. Keep the current functionality of it auto expanding as one needs more space.

The built-in corner handle also allows to expand horizontally, which breaks the UI. I suggest to keep the current behavior, instead.

@mfossati

  • Do not show any error message on load of the page. Error messages will only be shown when the user proceeds without entering required input.

Rational for above AC: As best practice we should not show error message before the user has taken any action or has a chance to review what we are asking from them. Seeing error message as a default state when ones lands on a new page can be confusing.

  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank

Rational for above AC: If the user's file name matches our title criteria it is good that we pre-fill it for the user. However, if the file name does not match our criteria it is best to leave it blank so that users can come up with a good title right at the start rather than them correcting it after we trigger an error message.

  • Show a multi line description input box with the ability for the user to expand the input box using a corner handle. Keep the current functionality of it auto expanding as one needs more space.

For the above AC: If the corner handle breaks the UI then we can leave it out, especially if it is auto-expanding as one types, the corner handle feature may not be needed.

  • Update the copy on the "view example" dialog as shown here

@Sneha, I think we need a Commons admin to update https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist-custom-filename. The patch has a temporary workaround so that we can test it, but I suggest to remove it before merging.
FYI the following custom messages also exist:

Everything else is done, moving to code review again.

@mfossati If I understood this correctly, it seem currently the dialog is pulling text from that first link and any changes on that page would be reflected in our dialog?

Could we have a custom dialog with only example text that is not linked to any of these pages. It seems there are a lot of variation of these pages so we can't confidently rely on one. We are not showing any links or additional text. We are only showing examples (which are unlikely to change.)

@mfossati If I understood this correctly, it seem currently the dialog is pulling text from that first link and any changes on that page would be reflected in our dialog?

Correct. It's an on-wiki system message.

Could we have a custom dialog with only example text that is not linked to any of these pages. It seems there are a lot of variation of these pages so we can't confidently rely on one. We are not showing any links or additional text. We are only showing examples (which are unlikely to change.)

Yes, we could, but those messages seem to come from the community (e.g., https://commons.wikimedia.org/w/index.php?title=MediaWiki:Titleblacklist-custom-filename&action=history), so I'd opt for keeping the process intact, i.e., propose the updates on wiki. @Sannita, what do you think?

@Sneha , please also note that the other messages are actually triggered in other circumstances, e.g., something'' would trigger https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist-custom-double-apostrophe, so I suggest to review them.

@mfossati is it possible to see when these messages appear? Are their multiple error messages that show up? Because in my workflow I have only seen one that leads to this message.

Yes, we could, but those messages seem to come from the community (e.g., https://commons.wikimedia.org/w/index.php?title=MediaWiki:Titleblacklist-custom-filename&action=history), so I'd opt for keeping the process intact, i.e., propose the updates on wiki. @Sannita, what do you think?

If it is needed to change system messages that are defined locally on Commons, we need to ask an interface administrator to intervene and change them. It's highly preferable to do this, instead of intervening ourselves without asking. Then, if we're in a hurry and/or nobody answers us in a week, we could go on our own, but I don't think this will be the case.

Those (and many more) messages are the result of an upload being rejected because the title violates the TitleBlacklist.
TitleBlacklist is a separate extension used to prevent spam and otherwise bad pages from being created on all wikis - it lets admins define patterns, and if a page name matches it, it'll be rejected.

That full list: https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist

AFAICT, that's these messages:

  • titleblacklist-custom-hidden-char
  • titleblacklist-custom-filename
  • titleblacklist-custom-SVG-thumbnail
  • titleblacklist-custom-thumbnail
  • titleblacklist-custom-double-apostrophe
  • titleblacklist-custom-space
  • titleblacklist-custom-no-fileextension
  • titleblacklist-custom-double-category-prefix
  • titleblacklist-custom-editnotice
  • Semiprotectedpagewarning
  • Protectedpagetext/PageProtected
  • Protectedpagetext

The vast majority of these seems to be "titleblacklist-custom-filename" - the one we're looking to alter.

FYI: many of the others will simply never be hit through UploadWizard (e.g. titleblacklist-custom-no-fileextension is irrelevant as UploadWizard will automatically add the extension, titleblacklist-custom-space won't trigger because UploadWizard automatically trims excess whitespace, and stuff like Protectedpagetext are irrelevant because UW doesn't submit in those namespaces)

We're limited in what we can do to change this, because this is not under our control. The community maintains this, and it is not limited to UploadWizard.

Options I can think of:

  1. we duplicate the message(s) in UploadWizard and show our own version(s)
    • I would strongly advise against that because they could grow out of sync; if things end up being added/deleted/changed in the blacklist, the error message we'd be showing might be wrong
  2. we show the original text, but trim the first and last paragraph
  3. We propose certain changes to the community and hope that they agree and integrate them
    • Note: this may not work out, because this blacklist is not UploadWizard-specific; because it shows in many contexts (e.g. Special:Upload, article creation, ...), they may feel that the verbosity is needed
  4. (variant on #1) if we really want to keep things simple and can't obtain it through #3, we could simply decide to not show that TitleBlacklist message at all, but some generic text (e.g. those examples) with a link to the TitleBlacklist message (so they are still able to learn exactly what rule they violated in case the examples didn't help)

Note: the temporary workaround Marco had in the code won't work in production (on-wiki messages override codebase messages)

Change #1020880 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Upload Wizard Describe step: improve title, caption, and description

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

@Sneha - just double checking
(1) the scope of re-designing Describe step presently doesn't include Additional information from the figma mockup

Screen Shot 2024-05-09 at 3.24.56 PM.png (920×890 px, 81 KB)
Screen Shot 2024-05-09 at 3.24.47 PM.png (900×1 px, 195 KB)

(2) I have some problems testing these two AC:

  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank
  • Update the copy for the current error message for when the user has not entered a descriptive title as show here.

On commons beta the Title field is pre-filled with the automatically assigned unique name and there will be no warnings. In production, such pre-filled file name immediately triggers the user warning:

Screen Shot 2024-05-09 at 4.01.10 PM.png (625×918 px, 186 KB)

If in production I change that file name to some other common name, I'll see the warning again:
Screen Shot 2024-05-09 at 3.54.18 PM.png (451×899 px, 159 KB)

There is no validation for a title to be actually descriptive - if I delete portion of that automatic title, the file name would be accepted.

On commons beta I was not able trigger that warning. Although black-listed titles pages are present (e.g MediaWiki:Titleblacklist-custom-SVG-thumbnail), but the warning doesn't appear when I try to use black-listed titles. Two questions

  • Is this a known deficiency of beta?
  • the initial automatic title is considered to be descriptive enough?

(1) the scope of re-designing Describe step presently doesn't include Additional information from the figma mockup

Chiming in: this will be done in T361061: [M] Update the 'other information' field in upload wizard.

(2) I have some problems testing these two AC:

  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank
  • Update the copy for the current error message for when the user has not entered a descriptive title as show here.

There is no validation for a title to be actually descriptive - if I delete portion of that automatic title, the file name would be accepted.

I think that matches the descriptive criteria can be rephrased to validates against Titleblacklist rules: it's not really about being descriptive.

On commons beta I was not able trigger that warning. Although black-listed titles pages are present (e.g MediaWiki:Titleblacklist-custom-SVG-thumbnail),

These are Titleblacklist's custom system messages, which are different from the corresponding rules.

but the warning doesn't appear when I try to use black-listed titles. Two questions

  • Is this a known deficiency of beta?

Yes, It seems so: there's no Titleblacklist rule on beta, see https://commons.wikimedia.beta.wmflabs.org/wiki/MediaWiki:Titleblacklist VS https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist.

@Etonkovidova

On commons beta the Title field is pre-filled with the automatically assigned unique name and there will be no warnings. In production, such pre-filled file name immediately triggers the user warning:

This is working as intended in commons beta. The error (if any) should appear when user hits next.

(2) I have some problems testing these two AC:

  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank
  • Update the copy for the current error message for when the user has not entered a descriptive title as show here.

There is no validation for a title to be actually descriptive - if I delete portion of that automatic title, the file name would be accepted.

I think that matches the descriptive criteria can be rephrased to validates against Titleblacklist rules: it's not really about being descriptive.

On commons beta I was not able trigger that warning. Although black-listed titles pages are present (e.g MediaWiki:Titleblacklist-custom-SVG-thumbnail),

These are Titleblacklist's custom system messages, which are different from the corresponding rules.

but the warning doesn't appear when I try to use black-listed titles. Two questions

  • Is this a known deficiency of beta?

Yes, It seems so: there's no Titleblacklist rule on beta, see https://commons.wikimedia.beta.wmflabs.org/wiki/MediaWiki:Titleblacklist VS https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist.

@mfossati for clarification! I'm trying to get this type of warning:

Screen Shot 2024-05-09 at 3.47.55 PM.png (760×916 px, 88 KB)

What I did:

Screen Shot 2024-05-10 at 5.19.17 PM.png (1×1 px, 372 KB)
Screen Shot 2024-05-10 at 5.19.31 PM.png (1×2 px, 712 KB)

What steps are needed for getting a new warning popup? Should be the message on commons beta MediaWiki:Titleblacklist-custom-filename changed?

@Etonkovidova

On commons beta the Title field is pre-filled with the automatically assigned unique name and there will be no warnings. In production, such pre-filled file name immediately triggers the user warning:

This is working as intended in commons beta. The error (if any) should appear when user hits next.

@Sneha, @mfossati - the user warning about a title not being descriptive nevers appears in commons beta. There is an interesting double reload action in the field when the page loads, but no warning.

@Etonkovidova The copy in the old warning about needs to be revised by the community. @Sannita is going to reach out to community to create a new message with just examples. Until then we ware using the old message which is why I strikethrough one of the AC related to it.

@Etonkovidova for the recording you sent you above, do you get the error after you hit next? None of the errors should appear right away as they are in the video. Errors should only appear if the user tries to proceed without filling the form properly.

@Etonkovidova The copy in the old warning about needs to be revised by the community. @Sannita is going to reach out to community to create a new message with just examples. Until then we ware using the old message which is why I strikethrough one of the AC related to it.

thx, @Sneha for clarification!

@Etonkovidova for the recording you sent you above, do you get the error after you hit next? None of the errors should appear right away as they are in the video. Errors should only appear if the user tries to proceed without filling the form properly.

I double-checked: the error messages work as expected - they appear after a user click on the Publish files. Or, if a user hits the Back button and then returns to the Describe step. I think it's an acceptable error messages behavior. Or the error messages should appear only after clicking on the Publish files button?

@Etonkovidova The error messages should only appear after clicking on Publish. However, if one goes back after the errors were triggered, then those errors can stay on the page upon return. However, if errors were never triggered/shown then they should not appear even if one goes back one step and come back to the describe step.

However, my assumption is that users going back may not be a very common scenario and so if its not working as stated above we can consider it as a low priority issue.

@Etonkovidova I also noticed that the "description is required" error appears as soon as you uncheck the box that says "same as caption". In this case also the error should not appear until the user hits publish.

Also I think we should also file a bug for errors appearing after going back and coming to the describe page. Some appear and others don't so it is a bit inconsistent. If no errors were triggered before they should not appear.

@Sneha - thank you for the comments above. I filed T365067: UploadWizard - Describe step: message "Caption/Description is required" should appear only upon submitting - added those two cases to, i.e. the Back button case and unchecking "Same as caption" checkbox.

Re-checked on commons wmf. 5 - seems to be working according to the specs

The following AC work on commons wmf.5 (which makes T364794 only commons beta issue)

  • Pre-fill the title using file name if it matches the descriptive criteria, if not leave it blank
  • Update the copy for the current error message for when the user has not entered a descriptive title as show here.

The current behavior in commons wmf..5

  • Upload step: a file is assigned an automatically generated name
  • Describe step: the automatically generated title is not displayed - no warning or user message to provide descriptive title

Some non-descriptive titles will trigger "Please write a more informative title (see examples)" message. The examples of such titles - TTTT, Image123, and test12321321 454 .