Page MenuHomePhabricator

CheckUser 2.0: Input form
Open, MediumPublic3 Story Points

Description

Goal

We want to allow users to be able to input usernames, IP addresses and IP ranges in order to look up information about them. The input form will support the above three main input types. There will also be an input box to include a reason for the check (mandatory). This is only a UI ticket and there will be a follow-up ticket for the functionality after the information is submitted.

Mock

https://prtksxna.github.io/wmf-cu-prototype/index.html

Acceptance criteria

  • Form header: Search for usernames, IP addresses or IP ranges
    • All three types will be added in a single text field. We should auto-complete the usernames and still allow IPs/ranges that become "capsules" once they are valid by regex. We did this with Interaction Timeline and should be able to do it here as well.
  • Input box for usernames. Limit on number of users accepted is 2 (for first iteration).
    • Placeholder: UserName or 1.1.1.1
    • Help text: Not required
    • Usernames and IPs auto-complete
  • Input box for the reason for the check.
    • This a mandatory before the Submit button becomes active.
    • Placeholder text: Not required
    • Help text: Not required
  • Submit button for submitting the info for performing the check.

Details

Related Gerrit Patches:
mediawiki/extensions/CheckUser : masterAdd search form fields to Special:Investigate

Related Objects

Event Timeline

Niharika triaged this task as Medium priority.Oct 31 2019, 3:45 PM
Niharika created this task.
Niharika created this object in space Restricted Space.
Niharika updated the task description. (Show Details)Oct 31 2019, 3:53 PM
aezell updated the task description. (Show Details)Oct 31 2019, 6:39 PM
Niharika updated the task description. (Show Details)Oct 31 2019, 6:41 PM
Niharika set the point value for this task to 3.
Niharika shifted this object from the Restricted Space space to the S1 Public space.Nov 5 2019, 7:54 PM
Restricted Application added a subscriber: MGChecker. · View Herald TranscriptNov 5 2019, 7:54 PM
Tchanders moved this task from Ready to In Progress on the Anti-Harassment (The Letter Song) board.

@Niharika @Prtksxna A few questions about the acceptance criteria:

  • Input box for usernames. [...]
    • Placeholder: Add users

Should the placeholder be the default "Add more..." instead? Might make more sense since this is not just for adding users.

  • Input box for the reason for the check.
    • [...]
    • Placeholder text: Example: Investigating Apples for suspected sockpuppetry

Are we OK with the fact that Apples can be a real username?

Finally, just wanted to ask whether we should make the help text inline? It's the default and recommended for accessibility, though it does make the page a bit busier:

inline: trueinline: false

@Niharika @Prtksxna Sorry, another question!

  • Input box for the reason for the check.
    • This a mandatory before the Submit button becomes active.

Is this suggesting that the Submit button be disabled until the required fields are filled, and if so how important is this? Unlike the current Special:CheckUser form, Special:Investigate can use required fields so won't submit anyway if they are empty.

Most other special pages that extend FormSpecialPage rely on required fields and so don't disable the submit (examples: Special:Block, Special:BotPasswords, Special:ChangeContentModel, Special:RandomInCategory). Special:Mute and Special:Preferences do disable the submit, but for these forms the submit needs to enable according to whether values have changed, rather than whether certain fields are filled.

@Niharika @Prtksxna A few questions about the acceptance criteria:

  • Input box for usernames. [...]
    • Placeholder: Add users

Should the placeholder be the default "Add more..." instead? Might make more sense since this is not just for adding users.

Yeah, it can be a user or IP address. I'm a bit iffy about Add more... as it kinda means they already added something. How about Add username or IP address instead?

  • Input box for the reason for the check.
    • [...]
    • Placeholder text: Example: Investigating Apples for suspected sockpuppetry

Are we OK with the fact that Apples can be a real username?

Ooh, good catch! It could be Investigating User:... for suspected sockpuppetry. @Prtksxna thoughts?

Finally, just wanted to ask whether we should make the help text inline? It's the default and recommended for accessibility, though it does make the page a bit busier:

inline: trueinline: false

Should be @Prtksxna's call.

@Niharika @Prtksxna Sorry, another question!

  • Input box for the reason for the check.
    • This a mandatory before the Submit button becomes active.

Is this suggesting that the Submit button be disabled until the required fields are filled, and if so how important is this? Unlike the current Special:CheckUser form, Special:Investigate can use required fields so won't submit anyway if they are empty.
Most other special pages that extend FormSpecialPage rely on required fields and so don't disable the submit (examples: Special:Block, Special:BotPasswords, Special:ChangeContentModel, Special:RandomInCategory). Special:Mute and Special:Preferences do disable the submit, but for these forms the submit needs to enable according to whether values have changed, rather than whether certain fields are filled.

I see. So the alternative would be to keep the button always active but return with an error message if the reason field is not populated? That works for me. We should have a mock for how the error would display. Ping @Prtksxna.

Change 550912 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/CheckUser@master] Add search form fields to Special:Investigate

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

Tchanders added a comment.EditedThu, Nov 14, 8:50 PM

Thanks @Niharika. Placeholder has been updated; will await @Prtksxna's thoughts on the other questions too.

When an attempt is made to submit a form with an empty required field, the browser complains:

Should the placeholder be the default "Add more..." instead? Might make more sense since this is not just for adding users.

Like you've done with the reason field, we'll put examples in the user/ip input field as well. I was thinking something like 'JohnSmith or 1.1.1.42'. I've updated the prototype to reflect this.

Are we OK with the fact that Apples can be a real username?

I am not sure about this one. We'll need a placeholder username for the user/ip input too. Jane/JohnSmith might be recognizable as placeholders but only in certain cultures and translation might be a concern too. How about UserName? Or would that be too generic? Thoughts @Tchanders @Niharika?

Finally, just wanted to ask whether we should make the help text inline? It's the default and recommended for accessibility, though it does make the page a bit busier:

Thanks for the side-by-side comparison @Tchanders 😊Really helpful!

I am quite sure that the user/ip field doesn't need help text, nor does the reason field. What do you think?

The checkbox will definitely need some help text and I think its best if it is visible all the time.


I see. So the alternative would be to keep the button always active but return with an error message if the reason field is not populated? That works for me. We should have a mock for how the error would display. Ping @Prtksxna.

We can have keep the Submit active all the time like other Special pages. @Tchanders, I see that some browsers will prevent you from submitting the form if the inputs aren't valid, but, if IIRC some don't and Special pages have a default way of showing the error — just red colored text in a larger font. Could you confirm if this is the case, and if we're able to change the design of this for our form?

How about UserName? Or would that be too generic? Thoughts @Tchanders @Niharika?

That name is in use https://meta.wikimedia.org/wiki/Special:CentralAuth?target=UserName

I am quite sure that the user/ip field doesn't need help text, nor does the reason field. What do you think?
The checkbox will definitely need some help text and I think its best if it is visible all the time.

This makes sense to me.

I see that some browsers will prevent you from submitting the form if the inputs aren't valid, but, if IIRC some don't and Special pages have a default way of showing the error — just red colored text in a larger font. Could you confirm if this is the case, and if we're able to change the design of this for our form?

Support for the required attribute seems good: https://caniuse.com/#search=required - and if it's not supported, the submitted form will error as you say:

Literally we are able override these designs, but it would be an extra thing to maintain and potentially extra modules to load so I'd advise against it. Other special pages seem to keep consistent with the default design.

@Tchanders, the default error state looks good, per your suggestion, let's keep it as is.

@dbarratt Thanks for checking! Yeah, in use and blocked for being a misleading username 😅According to me, it is okay if what we choose is an existing user, as long as it is clear by our usage that we are only using it as an example.

@Prtksxna This seems really busy to me...


the placeholder text seems unnecessary.... do we even need it at all?

@dbarratt See screenshots in T237034#5661181 and @Prtksxna's reply in T237034#5670732 - we've removed the help text for the User and Reason widgets to make it less busy, and made the placeholder text more informative instead

@dbarratt See screenshots in T237034#5661181 and @Prtksxna's reply in T237034#5670732 - we've removed the help text for the User and Reason widgets to make it less busy, and made the placeholder text more informative instead

I think it should be taken further and the placeholder text removed.... I'm not sure an example is necessary and it increases the cognitive load without a lot of benefit (that I can see?).

@Prtksxna This seems really busy to me...


the placeholder text seems unnecessary.... do we even need it at all?

I'm considering moving that checkbox down next to individual records in the table. That will allow gradual addition of users to the table, if warranted, instead of flooding it with all available accounts from same IPs. Might make things a bit easier technically too. This is on my to-discuss list with @Prtksxna tomorrow.

The cause of doing CU is often an SPI or a user request or suspicious edit. In any case, the reason should link to this cause and the form should require this link for the reason.
Would a separate field for the link be better or a two-line reason field?
With two separate fields I think it would be cleaner:

Change 550912 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add search form fields to Special:Investigate

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

The cause of doing CU is often an SPI or a user request or suspicious edit. In any case, the reason should link to this cause and the form should require this link for the reason.
Would a separate field for the link be better or a two-line reason field?
With two separate fields I think it would be cleaner:

I see that right now there is one field and a convention to supply a link in that field. Is that not good enough?

@Niharika the field is short for a textual description and a link. Either a longer 2-line textfield or 2 fields would be enough.
In any case, the comments should instruct to paste the link to the cause and form validation should check its presence.
The check is a bit simpler with a separate field, but it is less busy with one longer field.

@Niharika the field is short for a textual description and a link. Either a longer 2-line textfield or 2 fields would be enough.
In any case, the comments should instruct to paste the link to the cause and form validation should check its presence.
The check is a bit simpler with a separate field, but it is less busy with one longer field.

We can make it a longer field for sure. For form validation to check for the presence of a link - I think we would need the Checkusers to explicitly agree to that being okay. Let's start with the status quo for now. :)

JJMC89 added a subscriber: JJMC89.Wed, Nov 20, 8:29 PM

@Niharika the field is short for a textual description and a link. Either a longer 2-line textfield or 2 fields would be enough.
In any case, the comments should instruct to paste the link to the cause and form validation should check its presence.
The check is a bit simpler with a separate field, but it is less busy with one longer field.

We can make it a longer field for sure. For form validation to check for the presence of a link - I think we would need the Checkusers to explicitly agree to that being okay. Let's start with the status quo for now. :)

Please don't require a link. As a CU on a non-WMF wiki, I almost never put a link in the reason field.

Thanks for that information, @JJMC89. As I mentioned, we have no intention of doing that. :)

@JJMC89 Yes, requiring a link to the cause is unnecessary for private/small wikis. Thanks for mentioning this.
It only matters on wikimedia wikis, where there are strong guarantees of privacy.
@Niharika It can be enabled with a flag in the configuration.

Prtksxna updated the task description. (Show Details)Thu, Nov 21, 1:05 PM
dom_walden added a subscriber: dom_walden.

Acceptance criteria

  • Form header: Search for usernames, IP addresses or IP ranges
    • All three types will be added in a single text field. We should auto-complete the usernames and still allow IPs/ranges that become "capsules" once they are valid by regex. We did this with Interaction Timeline and should be able to do it here as well.

Currently, we allow arbitrary input (T238318).

  • Input box for usernames. Limit on number of users accepted is 2 (for first iteration).

This will only be true after T237298#5681606 is merged. Currently, can enter any number of users/IPs.

  • Placeholder: UserName or 1.1.1.1

Placeholder text is: UserName or 1.1.1.42

  • Help text: Not required

No help.

  • Usernames and IPs auto-complete

You get a drop down menu of usernames that match the prefix. Clicking on them puts them in a capsule/tags them.

  • Input box for the reason for the check.
    • This a mandatory before the Submit button becomes active.

"Please fill out this field" message appears if you leave input empty.

  • Placeholder text: Not required

Placeholder text is: Example: Investigating UserName for suspected sockpuppetry

  • Help text: Not required

No help.

@Prtksxna I notice the requirements have been updated since the patch, hence the discrepancies in some of the placeholder text found by @dom_walden in T237034#5696564. Should we correct these?

@Prtksxna I notice the requirements have been updated since the patch, hence the discrepancies in some of the placeholder text found by @dom_walden in T237034#5696564. Should we correct these?

Sorry about the confusion around this. Yes, let us remove the placeholder text for Reason (per T238603#5674993) but keep it for the user name/IP input.