Page MenuHomePhabricator

Pass the username associated with a reported comment to the username input component
Closed, ResolvedPublic

Assigned To
Authored By
JKieserman
Jun 12 2023, 4:07 PM
Referenced Files
F41413710: image.png
Nov 1 2023, 10:23 PM
F41413684: image.png
Nov 1 2023, 10:23 PM
F41413588: image.png
Nov 1 2023, 10:23 PM
F41407894: image.png
Nov 1 2023, 10:23 PM
F41413706: image.png
Nov 1 2023, 10:23 PM
F41413679: image.png
Nov 1 2023, 10:23 PM
F41413540: image.png
Nov 1 2023, 10:23 PM
F41413702: image.png
Nov 1 2023, 10:23 PM

Description

As a user, if I report a specific topic or comment, the username of the person associated with that content should autopopulate to the data collection component.

Note that this depends on DiscussionTools integration in T340138

Acceptance criteria
  • When clicking on the DiscussionTools Report menu option, the username that made the comment should be pre-filled into the reported username field.
  • The field should be disabled if:
    • the username is prefilled, and
    • the username is either an IP or is the username for an existing user
  • The prefilled username should change if a different DiscussionTools Report link is used.
  • The prefilled username should be removed if the user uses the Report link in the Tools menu

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! :)

kostajh renamed this task from Pass the username associated with a reported comment to the textinput component to Pass the username associated with a reported comment to the username input component.Sep 22 2023, 8:43 AM
kostajh updated the task description. (Show Details)
kostajh updated the task description. (Show Details)
kostajh removed a subscriber: JKieserman.

We might want to do T347171: Username input field should allow auto-completion of usernames first, to have the component in place for the username assignment.

We might want to do T347171: Username input field should allow auto-completion of usernames first, to have the component in place for the username assignment.

Yes, we should do T347171 first, because we'll set the lookup component to a disabled state, with an initial menu item (the username).

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

[mediawiki/extensions/ReportIncident@master] [WIP] Pre-fill username component from DiscussionTools menu data

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

Change 968698 merged by jenkins-bot:

[mediawiki/extensions/ReportIncident@master] Pre-fill username component from DiscussionTools menu data

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

Suggested QA steps (using patchdemo):

  1. Install ReportIncident and DiscussionTools (skip this if testing on betawikis as unnecessary)
  2. Log into an account
  3. To to a user talk page
  4. Use DiscussionTools to make several comments
  5. Edit the page using the source editor
  6. Add the following text to the bottom of the user talk page on a new line:
testing-using-the-separator-character [[User:user-test-separator-non-existent-account|user-test-separator-non-existent-account]] ([[User talk:user-test-separator-non-existent-account|talk]]) 14:08, 25 October 2023 (UTC)
::testing using an IP address [[User:1.2.3.4|1.2.3.4]] ([[User talk:1.2.3.4|talk]]) 14:06, 25 October 2023 (UTC)
  1. Open the DevTools console
  2. Click Report in the menu next to a signature of comment added in step 4
  3. Proceed to the second step of the dialog
  4. Verification step 1: Verify that the reported username field is disabled and contains the username of the user who made the comment
  5. Fill out the form and submit it
  6. Verification step 2: Verify that the email printed to the browser console contains a link to the comment that you reported
  7. Click on the Report link next to the signature for the comment made by an IP address
  8. Proceed to the second step of the dialog
  9. Verification step 3: Verify that the reported username field is disabled and contains the IP address 1.2.3.4
  10. Close the dialog
  11. Click on the Report link next to the signature for the comment made by the user with username user-test-separator-non-existent-account
  12. Proceed to the second step of the dialog
  13. Verification step 4: Verify that the reported username field is enabled and contains the username user-test-separator-non-existent-account
  14. Close the dialog by pressing the escape key
  15. Click on the Report link in the Tools menu
  16. Proceed to the second step of the dialog
  17. Verification step 5: Verify that the reported username field is empty

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

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

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 thank you for the great work and the detailed QA Steps.


Testing was executed at the following urls:
https://ko.wikipedia.beta.wmflabs.org/wiki/사용자토론:SMTFiveE
https://patchdemo.wmflabs.org/wikis/3bd06730af/wiki/User_talk:Patch_Demo#


screenshot below is the User Talk page that I am using as a guideline for testing this specific ticket in Patch Demo, you will see in the screenshot the Report option listed under More option:

image.png (796×1 px, 88 KB)


screenshot below is the User Talk page that I am using as a guideline for testing this specific ticket in Korean Beta Wiki...
You will see in the screenshot the Report option in the Tools menu, and the Report option for one of the Comments:

image.png (641×1 px, 85 KB)


screenshots below is the DevTools-Console email contents when using Patch Demo (this is for Step 12 of the QA steps for this ticket)

image.png (855×1 px, 72 KB)

image.png (325×1 px, 119 KB)


screenshots below shows the non-logged in user's IP address in the User You Would Like To Report field, and also shows pre-filled username that I am reporting, this is for Steps 10 and 15 of the QA Steps for this ticket

image.png (871×1 px, 85 KB)

image.png (853×1 px, 82 KB)

image.png (775×1 px, 92 KB)

image.png (824×1 px, 68 KB)

image.png (917×473 px, 241 KB)

image.png (921×750 px, 196 KB)


screenshot below shows the User You Would Like To Report field enabled and contains the username user-test-separator-non-existent-account, this is for Step 19 of the QA Steps for this ticket

image.png (858×1 px, 86 KB)

image.png (920×482 px, 209 KB)

image.png (906×721 px, 196 KB)


screenshots below shows the User You Would Like To Report field empty and enabled because I used the Report option in the Tools menu, this is for Step 23 of the QA Steps for this ticket

image.png (792×1 px, 71 KB)

image.png (838×1 px, 83 KB)

image.png (924×478 px, 228 KB)

image.png (908×717 px, 195 KB)

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

https://patchdemo.wmflabs.org/wikis/3bd06730af/w/

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

https://patchdemo.wmflabs.org/wikis/fb27d4dfac/w/