Page MenuHomePhabricator

MUL - Make Special:SetLabelDescriptionAliases ready for `mul` language code
Closed, ResolvedPublic5 Estimated Story Points

Description

Problem:
Users can select mul as a language on the Special:SetLabelDescriptionAliases page. If they fill out the description field and send the form, they will receive an error message, that says mul is not allowed for descriptions. We need to make this more intuitive.

Notes:

  • The task T329626 does the same for Special:NewItem.
  • Please also look at T165870 while working on this.

Mockup:

Frame 35.png (764×1 px, 139 KB)

BDD:
If an editor selects mul on Special:SetLabelDescriptionAliases then we deactivate the description field.

GIVEN an editor has opened Special:SetLabelDescriptionAliases
WHEN the editor selects the language code mul
THEN the description field is disabled
AND the explanatory text (see "Copy") is shown below the disabled field (inline message)

Copy:

Descriptions are not supported for this language.

Acceptance criteria:

  • If an editor selects mul on Special:SetLabelDescriptionAliases then we deactivate the description field.

Event Timeline

Lydia_Pintscher changed the task status from Open to Stalled.Mar 1 2023, 1:07 PM

@Sarai-WMDE @Manuel Can you please change the copy? The current copy does not seem correct. We are not letting people enter several descriptions in several languages as this currently implies. This special page is also not about creating new Items but about editing existing ones.

Setting to stalled until the copy is updated.

Manuel changed the task status from Stalled to Open.Mar 8 2023, 8:39 PM
Manuel updated the task description. (Show Details)
Manuel updated the task description. (Show Details)
Manuel removed the point value for this task.

There are at least two other special pages that allow defining descriptions and thus would need to be adjusted to accommodate mul: 1. Special:SetEntitySchemaLabelDescriptionAliases and 2.Special:SetDescription.

  1. The first page would follow the same flow shared in this task's description, but probably requires its own ticket.
  2. The second page is slightly different: users can input the language code and right away provide a description in the field below. This means that we'd have to disable the Description field based on the immediate user input (e.g. when the input loses focus). I'm not sure this can be done in not a hacky way, or even is a great solution (using a combobox to select the language in all these pages – like we do in Special:NewItem – might be a better idea. This way we could disable on select). At the same time, Special:SetDescription also presents a second, redundant step: users need to confirm their submission of a description after having provided it in the first form. This seems to be an exception (the individual changes to Aliases and Labels made in their dedicated pages are published from the first step). We might want to look into this also in a separate task?

Thank you for checking, @Sarai-WMDE!

  1. Special:SetEntitySchemaLabelDescriptionAliases

Based on conversations my assumption was that mul will not be supported for EntitySchemas. But this is ultimately @Arian_Bozorg's call.

  1. Special:SetDescription

I considered modifying that page, but decided against it (see also the "not done" section of the epic): The reason was that I assumed this case is not so relevant, and, as you described, the way the page works makes it difficult to intervene before an error message is raised. All in all it seems to be working well enough as is for now.

I hope this helps!

hoo moved this task from Parents/Waiting to Doing on the Wikidata Dev Team (Sprint-∞) board.
hoo subscribed.

Claiming this also, as the javascript for Special:NewItem and Special:SetLabelDescriptionAliases seems to be shared.

Claiming this also, as the javascript for Special:NewItem and Special:SetLabelDescriptionAliases seems to be shared.

This is entirely untrue, the front end code for Special:NewItem and Special:NewProperty are shared. Nevertheless, I'll keep this task.

Change 917344 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/core@master] Allow setting "notices" for OOUI form fields

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

Change 917349 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] Make Special:SetLabelDescriptionAliases ready for "mul"

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

Change 917344 merged by jenkins-bot:

[mediawiki/core@master] Allow setting "notices" for OOUI form fields

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

Change 917349 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Make Special:SetLabelDescriptionAliases ready for "mul"

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

Just tagging @Manuel for verification on this one

Thank you for pinging me, @Arian_Bozorg: It's looking and working great, thank you @hoo and @Sarai-WMDE! \o/