Page MenuHomePhabricator

Make entity ID fields required on Special:RedirectEntity
Open, Needs TriagePublic

Description

Basically a copy of T347886: Make username "required" on Special:Contributions but for another special page.

Currently, you can open Special:RedirectEntity and use the submit (“redirect”) button, and it’ll effectively reload the page and otherwise do nothing. It would be nicer to indicate to users that the fields are required.

Event Timeline

Just creating the task to track this patch by Dringsim.

Without the patch:

With the patch:

@Arian_Bozorg does that look okay to you? If yes, I think we can directly merge the patch.

Change 965931 had a related patch set uploaded (by 沈澄心; author: 沈澄心):

[mediawiki/extensions/Wikibase@master] SpecialRedirectEntity: Mark fromid and toid as required

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

This seems like a helpful change.

Just the UI could match what we have on Special:NewLexeme?

Moving the asterisk to the line above the entry field:

image.png (476×782 px, 52 KB)

Changing the outline of the input field to red and adding the warning copy "Field cannot be empty" below:

image.png (570×793 px, 67 KB)

cc: @Sarai-WMDE to take a look at this too :)

Moving the asterisk to the line above the entry field

This is not necessary. Unlike, Special:NewLexeme, the Special:RedirectEntity page is (for now) using OOUI components, and this is their intrinsic way of indicating that they are required.

Changing the outline of the input field to red and adding the warning copy "Field cannot be empty"

Agreed. I would recommend adding inline error message widgets under the fields on submit to make explicit what's wrong (i.e. "The ID to redirect from field cannot be empty", "The ID to redirect to field cannot be empty").

Thanks Sarai, then would what is proposed as is be ok to be merged from your perspective?

As mentioned, I would encourage displaying the validation messages on submit to make the system status more apparent for users.

So, just to be clear: we want a different form of validation, and until that is prioritized and implemented (who knows when), we are not going to merge the trivial volunteer patch that already exists?

This solution works for my perspective and we can create a more consistent interaction moving forward.

Change 965931 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] SpecialRedirectEntity: Mark fromid and toid as required

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

Alright, the existing change is merged. Leaving the task open for further improvements then.