Page MenuHomePhabricator

[S] Place user input's error messages closer to their relevant field
Closed, ResolvedPublic

Description

Follow up to T371050: [M] Improve the custom license field for "not own work" in the upload wizard.
Implementation as per T371050#10364255 and T371050#10366336.

Listing all the instances where this needs to be fixed:

  1. Q1 in own work flow
Current error location {F57773116}Update to
Screenshot 2024-12-02 at 4.53.43 PM.png (484×1 px, 58 KB)
✅ Checked on commons wmf.13
Screen Shot 2025-01-24 at 11.27.36 AM.png (728×1 px, 124 KB)
  1. Q1 in not-own work flow - CC license option
Current error location
Screenshot 2024-12-02 at 4.29.07 PM.png (1×2 px, 334 KB)
Update to
Screenshot 2024-12-02 at 4.53.49 PM.png (666×990 px, 103 KB)
✅ Checked on commons wmf.13
Screen Shot 2025-01-24 at 11.33.26 AM.png (1×1 px, 208 KB)
  1. Q1 in not-own work flow - custom cc license
Current error location
Screenshot 2024-12-02 at 4.46.11 PM.png (1×2 px, 366 KB)
Update to
Screenshot 2024-12-02 at 4.54.04 PM.png (778×966 px, 120 KB)
✅ Checked on commons wmf.13
Screen Shot 2025-01-24 at 11.36.54 AM.png (1×1 px, 233 KB)
  1. Q1 in not-own work flow - pd option
Current error location
Screenshot 2024-12-02 at 4.29.23 PM.png (1×1 px, 281 KB)
Update to
Screenshot 2024-12-02 at 4.54.21 PM.png (704×942 px, 97 KB)
Checked on commons wmf.13. Entering a template in the field "Add a specific public domain tag, if applicable" acts as a valid selection. The error message is always displayed at the bottom of the block. Filed as a minor issue - T384761
Screen Shot 2025-01-24 at 11.53.14 AM.png (1×1 px, 238 KB)
  1. Q1 in not-own work flow - on behalf of someone else
Current error text & location
Screenshot 2024-12-03 at 14.05.03.png (423×910 px, 81 KB)
Update to
Screenshot 2024-12-03 at 14.03.46.png (306×652 px, 45 KB)
The phrasing on the error is different - instead of "Selecting this checkbox is required", "Selection is required" is displayed.
Screen Shot 2025-01-24 at 2.48.02 PM.png (626×2 px, 153 KB)

Other fixes:
✅ A note to check that these errors continue to disappear as soon as the user addresses them.

  • Below is one instance where the error does not disappear upon selection and should be fixed.

Screenshot 2024-12-02 at 5.03.55 PM.png (804×2 px, 219 KB)

Event Timeline

MarkTraceur renamed this task from Place user input's error messages closer to their relevant field to [S] Place user input's error messages closer to their relevant field.Dec 2 2024, 5:17 PM

I noticed a few other use-cases in the upload wizard where error messages are far from the content it is referring to. I think we should fix them all in this ticket. Adding to description.

Change #1101084 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/UploadWizard@master] Refactor error handling

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

Change #1102785 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/UploadWizard@master] Move errors deeper down

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

This is *mostly* implemented (well, pending CR), except for the quirks I'll list below.
The reason that these differ is that this whole license selection for is "generic" and customizable in campaigns. I.e. we can't code specific rules for specific selections.

Screenshot 2024-12-02 at 4.54.21 PM.png (704×942 px, 97 KB)

-> The "Selection is required" error message will be displayed below the custom input field rather than below the visible checkboxes.
(the custom input field is essentially also a checkbox just like those others, we've just added some CSS to hide it visually)

Screenshot 2024-12-03 at 14.03.46.png (306×652 px, 45 KB)

-> The error message will be "Selection is required" rather than "Selecting this checkbox is required", just like it does for all other radios/checkboxes.

@matthiasmullie the copy change is fine I will update in figma for the record.

However, in the first case I wonder if having error message under the input field may confuse users in thinking that the input field is required. But since there are no other possibilities right now we can go with your suggestion. Once the user makes the selection the error would disappear which may be enough of an indicator that no more input is required.

Change #1101084 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Refactor error handling

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

@Sneha , @matthiasmullie: both in own work and 3rd party, the custom license text inputs don't display errors as the user types, only when they hit the next button.
I think this should go to a different ticket, though.

@mfossati the error's were not meant to display as the user types for custom license. I think we only do that for date field right now. But are you saying that it would not clear the error as well if the user fixes the error?

I think we only do that for date field right now.

I think we're doing that for pretty much all text inputs in the describe step, so different behavior in the release right step seems odd to me.

But are you saying that it would not clear the error as well if the user fixes the error?

No, errors are correctly cleared.

If we start doing it for release right step then it would become inconsistent within the release right step as I believe we don't do it for other input fields such as Authors, AI, where you found it etc... if these fields also have auto detect behaviour then we should do it for all. But if not, it is okay to leave out auto-detection from release right step. It can also be a bit annoying if the error keeps popping before the user has finished entering necessary characters.

we don't do it for other input fields such as Authors, AI, where you found it etc...

Correct, I can confirm that.

Immediately showing error messages for the template input fields is probably not a great idea, as it involves an API call to parse to wikitext input. Doing so for every change would be needlessly expensive, and the resulting error message would also come (slightly) delayed anyway.

Change #1102785 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Move errors deeper down

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

Checked in commons beta - all cases from the task descriptions have been addressed.

  1. Q1 in own work flow
from the task descriptioncommons beta
Update to
Screenshot 2024-12-02 at 4.53.43 PM.png (484×1 px, 58 KB)
Screen Shot 2024-12-20 at 8.36.40 AM.png (1×1 px, 184 KB)
  1. Q1 in not-own work flow - CC license option
from the task descriptioncommons beta
Update to
Screenshot 2024-12-02 at 4.53.49 PM.png (666×990 px, 103 KB)
Screen Shot 2024-12-20 at 8.38.37 AM.png (1×1 px, 307 KB)
  1. Q1 in not-own work flow - custom cc license
from the task descriptioncommons beta
Update to
Screenshot 2024-12-02 at 4.54.04 PM.png (778×966 px, 120 KB)
Screen Shot 2024-12-20 at 9.04.22 AM.png (1×1 px, 274 KB)
  1. Q1 in not-own work flow - pd option

Note: the difference in the error message placement is ok - see https://phabricator.wikimedia.org/T381286#10409660

from the task descriptioncommons beta
Update to
Screenshot 2024-12-02 at 4.54.21 PM.png (704×942 px, 97 KB)
Screen Shot 2024-12-20 at 8.42.53 AM.png (1×1 px, 292 KB)
  1. Q1 in not-own work flow - on behalf of someone else
from the task descriptioncommons beta
Update to
Screenshot 2024-12-03 at 14.03.46.png (306×652 px, 45 KB)
Screen Shot 2024-12-20 at 8.44.50 AM.png (596×1 px, 118 KB)

@Sneha - regarding the follow:

Other fixes:
A note to check that these errors continue to disappear as soon as the user addresses them.

  • Below is one instance where the error does not disappear upon selection and should be fixed.

Screenshot 2024-12-02 at 5.03.55 PM.png (804×2 px, 219 KB)

Currently the warnings disappear when a users 1) corrects the error And 2) clicks on the Next button. T381333: UploadWizard - improving errors for multiple uploads should address the issue with dynamically updating the error feedback to users.

Moving to Design QA - for @Sneha quick review for #4 and # 5 (the items with in the task description). #5 seems fine to me - the error message looks unambiguous enough.
#4 - is a tricky issue (filed as T384761: Not-own work flow pd option - error label "Selection is required" doesn't represent valid public domain tag input ). Since the text field - pd tag - acts as a stand-alone, self-sufficient option as well as to be an additional field to any other option selected, the error message

  • cannot be displayed under text box options as in the design, only at the bottom of the options block
  • the phrasing of the error message - "Selection is required" - doesn't reflect that adding a valid pd tag is also an acceptable input that enables a user to move on to the next step.

Otherwise, the scope of the task is done - feel free to close it as Resolved.

@Etonkovidova
#5 the current copy is good to go as it is more consistent with other error messages... we can consider that done.
#4 having the error near the checkbox was not feasible at the time based on discussion with @matthiasmullie. However, it seems like right now checkboxes selection is not required if pd-tag is entered which is incorrect behaviour. If the error cannot be moved closer to checkboxes, then it is okay but checkbox selection is still required regardless of whether the pd-tag is entered or not. I see you have already captured this issue in the new ticket.

@Etonkovidova
#5 the current copy is good to go as it is more consistent with other error messages... we can consider that done.

Got it - ok.

#4 having the error near the checkbox was not feasible at the time based on discussion with @matthiasmullie. However, it seems like right now checkboxes selection is not required if pd-tag is entered which is incorrect behaviour. If the error cannot be moved closer to checkboxes, then it is okay but checkbox selection is still required regardless of whether the pd-tag is entered or not. I see you have already captured this issue in the new ticket.

I filed T384761 to address the fact that "Selection is required" phrasing is not correct, since pd tag is not "selected" but it's entered/typed.
However, since selecting radio buttons options should be required, I filed another task T385098: Not-own work flow pd option - checkbox selection is required to address that.

After filing T385098, I was hesitant to keep T38476 since I wasn't sure whether the workflow that allows only entering valid pd tag is allowable. However, let's keep T38476 for now as open, so to check the placement of an error message after the fix for radio button options will be implemented.

Thank you, @Sneha - closing this task as Resolved.