Page MenuHomePhabricator

Allow target field to be editable on Special:Block if pre-filled with an IP address
Closed, ResolvedPublic

Assigned To
Authored By
Tchanders
Mar 24 2023, 1:49 PM
Referenced Files
F36932677: T332994_IPMasking_IPv6_Within.png
Mar 29 2023, 11:55 PM
F36932675: T332994_IPMasking_IPv6_Outside.png
Mar 29 2023, 11:55 PM
F36932673: T332994_IPMasking_IPv4_Within.png
Mar 29 2023, 11:55 PM
F36932670: T332994_IPMasking_IPv4_Outside.png
Mar 29 2023, 11:55 PM
F36932668: T332994_IPMasking_SB_User.png
Mar 29 2023, 11:55 PM
F36932666: T332994_IPMasking_SB_TempUser.png
Mar 29 2023, 11:55 PM
F36932664: T332994_IPMasking_SB_IPEditable.png
Mar 29 2023, 11:55 PM
F36925688: image.png
Mar 24 2023, 3:00 PM
Tokens
"Burninate" token, awarded by Thibaut120094."Burninate" token, awarded by Jules78120.

Description

Background

Since T324602: SpecialBlock: Once a temporary account is selected, below the username field display IP addresses associated with the account, the target field on Special:Block is not editable if it is pre-filled on page load. It can be deleted and a new target entered, but it can't be edited.

This can be inconvenient if the block page was reached by clicking on a block link next to an IP address, and the blocking admin wants to add a range.

Acceptance criteria
  • When loading Special:Block/<anIPaddress> the target field is pre-filled, but not selected, so the value is editable
  • Loading Special:Block for a named user, temporary user or IP range behaves as before, since there should be no need to edit the field in those cases

Event Timeline

Change 902710 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/core@master] mediawiki.special.block.js: Make target widget editable if pre-filled with IP

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

Attaching for reference in the gerrit patch.

After loading Special:Block/1.2.3.4 on Firefox:

image.png (166×1 px, 9 KB)

Change 902710 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.special.block.js: Make target widget editable if pre-filled with IP

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

@Tchanders The value is now editable when loading Special:Block/<anIPaddress>. The rest are not editable as designed. If the IPv4 and IPv6 outside range text is as expected then we can move this to Done, thanks!

Special:Block/<anIPaddress>Results
IP Address Editable
T332994_IPMasking_SB_IPEditable.png (323×2 px, 115 KB)
Temp User
T332994_IPMasking_SB_TempUser.png (283×1 px, 69 KB)
User
T332994_IPMasking_SB_User.png (463×1 px, 112 KB)
IPv4 Outside Range
T332994_IPMasking_IPv4_Outside.png (380×1 px, 95 KB)
IPv4 Within Range
T332994_IPMasking_IPv4_Within.png (438×1 px, 102 KB)
IPv6 Outside Range
T332994_IPMasking_IPv6_Outside.png (509×1 px, 121 KB)
IPv6 Within Range
T332994_IPMasking_IPv6_Within.png (472×1 px, 112 KB)

Hello @Tchanders and @GMikesell-WMF , in my opinion, the user experience is still bad in comparison to the standard input box. When the widget looses focus, it automatically becomes read only and cannot be used anymore. This is really annoying.

Moreover, in the screenshots you posted above we see a big issue for IP out of range as there is no way to correct the input when you see the message. You see "/18" is too large error but you cannot change your input.

Could you please fix it so we can always change the value or is there something to add in our common.js to replace this widget by the original input box ?

Could you please fix it so we can always change the value or is there something to add in our common.js to replace this widget by the original input box ?

There is an open change to move back to using an "user" input box as was before. I have added your thoughts to said change.

@Shawn Thanks. There's some work in progress to change back to the previous input, and there seems to be an appetite to do so from a few people - see patches on T333359.

Moreover, in the screenshots you posted above we see a big issue for IP out of range as there is no way to correct the input when you see the message. You see "/18" is too large error but you cannot change your input.

I can see how this is frustrating. I've filed a task here, since this isn't intended behaviour: T334711: TagMultiselectWidget value is uneditable once the maximum number of tags are entered


@Dreamy_Jazz @Func @Shawn Is the lack of editability the only problem? If so, we can focus efforts on solving T334711. If not, we can change back to the previous input and focus on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/904602

Hello @Tchanders, for me, as an administrator, in my daily usage of the screen, the main problem is the impossibility to change value once the widget looses focus. The other thing is that the design of the component suggests that we can enter several elements like tags (because of the small cross button), but in fact, you can only enter one element. It is pretty confusing.
As long as one can copy / paste and modify as easily as in a standard input box, any solution should be okay.

Thanks @Shawn, that's very helpful to know. I've filed T334870: Restore user input widget on Special:Block for restoring the previous input since that seems to answer all of the issues that have been raised.