Page MenuHomePhabricator

[S] Inform the user about the success or failure of submitting a report
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
JKieserman
Jun 12 2023, 3:03 PM
Referenced Files
F41428736: image.png
Nov 2 2023, 11:08 PM
F41428717: image.png
Nov 2 2023, 11:08 PM
F41428324: image.png
Nov 2 2023, 11:08 PM
F41428628: image.png
Nov 2 2023, 11:08 PM
F41428609: image.png
Nov 2 2023, 11:08 PM
F41428231: image.png
Nov 2 2023, 11:08 PM
F41428651: image.png
Nov 2 2023, 11:08 PM
F41428588: image.png
Nov 2 2023, 11:08 PM

Description

As a user, I should get an indication that my report has been submitted.

Acceptance criteria:

  • After clicking submit, the codex dialog should close
  • After the dialog closes, a codex message component should appear at the top of the page
  • We display an error message to the user if the REST endpoint returns an error
NOTE: although there is an auto-dismiss option we will not be using it. The message will remain present until the user actively dismisses it.

To be determined:

  • What message do we show to a user who is blocked from editing?
  • What message do we show to a user who has gone over the rate limit for submissions per day?

Latest design spec:
https://www.figma.com/file/a1qk95sTQyVFDACoQfBsne/MTP?type=design&node-id=0%3A1&mode=design&t=QrcabweoiGRNeW50-1

Event Timeline

Assuming this task is about the Incident-Reporting-System code project, hence adding that project tag so other people who don't know or don't care about team tags can also find this task when searching per codebase. Please set appropriate project tags when possible. Thanks! :)

JKieserman renamed this task from Creating a toast to indicate a report has been submitted to Create a toast to indicate a report has been submitted.Jun 13 2023, 10:23 PM

for the language deficient like me:
Toast
A small informational message that pops up like toast.
http://en.wikipedia.org/wiki/Toast_(computing)

not sure why a pop up message wouldn't work, but OK

for the language deficient like me:
Toast
A small informational message that pops up like toast.
http://en.wikipedia.org/wiki/Toast_(computing)

not sure why a pop up message wouldn't work, but OK

@JKieserman did you have in mind to use mw.notify(), or something else?

JKieserman renamed this task from Create a toast to indicate a report has been submitted to Create a message to indicate a report has been submitted.Aug 2 2023, 1:07 PM
JKieserman set the point value for this task to 2.Aug 2 2023, 1:10 PM
kostajh renamed this task from Create a message to indicate a report has been submitted to Inform the user about the success or failure of submitting a report.Sep 19 2023, 6:29 PM
kostajh updated the task description. (Show Details)
kostajh removed a subscriber: JKieserman.

A couple of questions/comments for @JSengupta-WMF & @Madalina about the proposed success and error notifications:

  1. "Your report did not go through. Please try again." The phrase "did not go through" might be tricky to translate and is not a typical one we use in error messages in MediaWiki I would propose error text that is aligned with other error messages we use in MediaWiki and will thus be easier for translators
  2. "Report successfully filed. We will review it and determine whether the incident violates our policies. Thanks for helping us keep Wikipedia safe." Should we consider replacing "we" with the value of $wgReportIncidentAdministratorsPage configuration variable? We have that set to Wikipedia:Administrators. So the message could be something like "Someone from Wikipedia:Administrators will review the report [...]". Otherwise, it feels to me like the "we" is unclear in this message.
  3. Presentation: the success/error notices are currently shown outside the form, and both are shown after the form has been closed. As an alternative, do we want to consider a "Step 3" of the form? That could show:
    1. a more detailed success message if the report went through; in the future, this could also show e.g. a report ID if we assign one to the report
    2. if the user is blocked from submitting a report or gone over their rate limit for the day, we can show a detailed explanation for why
  4. If there is an error with the API interaction, we would keep the user on step 2, and show a brief error message (e.g. "An error occurred. Please try again.") and allow the user to submit the form again, without having to fill it in again. (Similar to how the VisualEditor publish dialog works, if an API error occurs.)
  1. Need more context. The text can be simplified based on what could be the causes of this kind of error. Ideally which side the error is from (network/server/user) should be highlighted.
  2. Let's make it "Report successfully filed. An administrator will review and determine whether the incident violates our policies. Thanks for helping us keep Wikipedia safe."
  3. Agree with A. Regarding B. is there any way we can check if the user is blocked as soon as they click on "report" link and show it in the first place to spare them from filling up the form and finding it out after submission
  4. Sounds great!

We discussed this in the BXT meeting on Sept 20. Agreed on the following:

  • Design will create all the error messages in alignment with other MediaWiki messages. We need specific error messages for different scenarios as well as a more general one.
  • The success message will be changed to: "Report successfully filed. An administrator will review it and determine whether the incident violates our policies. Thanks for helping us keep Wikipedia safe."
  • The error messages will be shown on the form
  • If there is an error with the API interaction, we will keep the user on the form, show an error message and allow the user to submit the form again, without having to fill it in again.

Thanks for helping us keep Wikipedia safe.

I assume "Wikipedia" comes from a sitename variable here. (Just pointing it out to be absolutely sure.)

Thanks for helping us keep Wikipedia safe.

I assume "Wikipedia" comes from a sitename variable here. (Just pointing it out to be absolutely sure.)

Yes, we will use {{SITENAME}}. Thanks for checking :)

Possible error cases to handle.

  1. Network error: user lost their internet connection <Looks like you don't have internet connection. Please try re-submitting when your connection is back.>
  2. Server error: wikimedia server unavailable <Sorry, looks like our server is not responding. Please try re-submitting.>
  3. General error: anything else we can't determine <Your request could not be submitted due to an error. Please try re-submitting.>

IRS Step 2 (Error message MTP).png (812×375 px, 47 KB)

IRS Step 2 (Error message).png (840×1 px, 115 KB)

@JSengupta-WMF I cannot see the files

IRS Step 2 (Error message MTP).png (812×375 px, 47 KB)
and
IRS Step 2 (Error message).png (840×1 px, 115 KB)
. Could you attach them to the task (the option to do this should be present in the top right under "Referenced files")?

@Dreamy_Jazz and I discussed today the scenarios when a user tries to submit the form but doesn't succeed. For the MTP we will be using the general error message.

Change 969399 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ReportIncident@master] [Very WIP] Inform user about success or failure to submit report

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

Dreamy_Jazz renamed this task from Inform the user about the success or failure of submitting a report to [S] Inform the user about the success or failure of submitting a report.Oct 30 2023, 4:37 PM

Change 969399 merged by jenkins-bot:

[mediawiki/extensions/ReportIncident@master] Inform user about success or failure to submit report

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

Tchanders subscribed.

Assuming this is meant to be in QA on the TSP sprint board

Suggested QA steps for betawikis and/or patchdemo:

  1. Use Google Chrome to test
  2. Log into an account with a confirmed email address
  3. Go to an existing user talk page
  4. Open DevTools network tab and use the steps at https://superuser.com/a/1014698 to use the Offline preset for network throttling.
  5. Use the report form on any comment, define valid data and click submit
  6. Verification step 1: Verify that an error message appears at the bottom of the form which says Looks like you don't have internet connection. Please try re-submitting when your connection is back.
  7. Change the network throttling preset back from Offline to No Throttling
  8. Open the Report link from the Tools menu
  9. Enter a username that doesn't exist, but specify all other valid data. Then click submit.
  10. Verification step 2: Verify that an error message is shown next to the reported user field with the text You must provide an existing username to report.
  11. Fix the username to be an existing username
  12. Submit the form
  13. Verification step 3: Verify that a banner is shown at the top of the page that indicates the form has been submitted.
  14. Open a user talk page that does not exist
  15. Fill out the reporting form on that page with valid data and click submit
  16. Verification step 4: Verify that an error message appears at the bottom of the form which says Your request could not be submitted due to an error. Please try re-submitting.

Next steps require patchdemo and you must include the patch with ID 970818:

  1. Open an existing user talk page
  2. Open the reporting dialog, fill out with valid data and click submit
  3. Verification step 5: Verify an error message is shown at the bottom of the form with the text Sorry, looks like our server is not responding. Please try re-submitting.

Test wiki created on Patch demo by DJacksonA using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/7f22497b31/w

Djackson-ctr subscribed.

Per the ticket Description and QA Steps, I have verified the new code has been implemented and is functioning and displaying as expected...
@Dreamy_Jazz great work once again!!! Appreciate the detailed QA Steps, Thank you sir.


Testing was executed at the following urls:
https://patchdemo.wmflabs.org/wikis/7f22497b31/w
https://ko.wikipedia.beta.wmflabs.org/wiki/사용자토론:SMTFiveE


Verification step 1: Verify that an error message appears at the bottom of the form which says Looks like you don't have internet connection. Please try re-submitting when your connection is back.

image.png (868×435 px, 268 KB)
image.png (863×596 px, 182 KB)
image.png (890×1 px, 280 KB)


Verification step 2: Verify that an error message is shown next to the reported user field with the text You must provide an existing username to report.

image.png (864×1 px, 166 KB)
image.png (864×445 px, 251 KB)
image.png (875×719 px, 163 KB)


Verification step 3: Verify that a banner is shown at the top of the page that indicates the form has been submitted.

image.png (745×1 px, 96 KB)
image.png (894×483 px, 297 KB)
image.png (897×729 px, 190 KB)


Verification step 4: Verify that an error message appears at the bottom of the form which says Your request could not be submitted due to an error. Please try re-submitting.

image.png (881×1 px, 159 KB)
image.png (904×486 px, 255 KB)
image.png (883×680 px, 178 KB)


Verification step 5: Verify an error message is shown at the bottom of the form with the text Sorry, looks like our server is not responding. Please try re-submitting.

image.png (928×1 px, 187 KB)
image.png (876×606 px, 163 KB)
image.png (888×488 px, 199 KB)


Dreamy_Jazz updated the task description. (Show Details)

Test wiki on Patch demo by DJacksonA using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/7f22497b31/w/