Page MenuHomePhabricator

Show the label of the language item on Special:NewLexeme page
Closed, ResolvedPublic

Description

Currently when language item is selected, the language field contains item's Q-ID.
Label of the item should be displayed instead.
ID should be only secondary information shown to the user.

Related Objects

Event Timeline

WMDE-leszek created this task.

Might be mostly a note to myself so I don't forget it over the weekend but in case if it turns out useful: Having a short look at OO's ComboBoxInputWidget I wonder whether it would not fit the needs here just fine. It could be easier to have a custom "label" in the field without hacking TextInputWidget, and I believe the menu functionality is also there out of the box. One thing still needing to be checked is whether it is as easy to use the lookup mixin with this widget as we managed to do with the "plain" Text input widget.

https://gerrit.wikimedia.org/r/#/c/343907/ was the earlier attempt, but there were issues. Please have a look if https://gerrit.wikimedia.org/r/#/c/353102/ makes sense. If so, other patch(es) with different approach will be abandoned.

Change 353102 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Display item label in the ItemSelectorWidget but submit item ID

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

This is done but note that are few improvements needed in the related area: https://phabricator.wikimedia.org/T165597
Leaving the ticket open until it is demoed to PM.

Checked it out. Looks good! Let's figure out the rest in the other ticket.