Page MenuHomePhabricator

Implement HTMLSelectAndOtherField and HTMLSelectOrOtherField in OOUIHTMLForm
Closed, ResolvedPublic


Implement HTMLSelectAndOtherField and HTMLSelectOrOtherField in OOUIHTMLForm.

Event Timeline

matmarex claimed this task.
matmarex raised the priority of this task from to Medium.
matmarex updated the task description. (Show Details)
matmarex added a project: MediaWiki-HTMLForm.

Does anyone know the current status of this ticket, and how difficult this would be to implement? I'd be interesting in learning more about such a task :-)

Implement HTMLComboboxField. This is meant to be a replacement for HTMLSelectOrOtherField and HTMLAutoCompleteSelectField, but it would have a different interface, so I think it's a better idea to make it separate.

Should we remove HTMLSelectOrOtherField from this task?

Isn't HTMLSelectAndOtherField just two fields?

Yeah, HTMLSelectOrOtherField has low usage and two alternatives, so we could probably get away with skipping it. But I think most of the code will be reused from HTMLSelectAndOtherField.

I think both of these are basically just a dropdown plus a textfield? It shouldn't be difficult to implement. We should just have a OOUI\Widget subclass that would display the two fields side-by-side, similar to e.g. MediaWiki\Widget\ComplexTitleInputWidget / mw.widgets.ComplexTitleInputWidget. This is needed because HTMLFormField uses OOUI\FieldLayout, which expects a single widget (HTMLFormField::getInputOOUI() is technically allowed to return HTML strings, which will be dynamically wrapped in a Widget, but that's hacky and I'm not sure if we actually use it anywhere.)

Change 344121 had a related patch set uploaded (by Prtksxna):
[mediawiki/core@master] mw.widgets: Add SelectWithInputWidget

Change 344121 merged by jenkins-bot:
[mediawiki/core@master] mw.widgets: Add SelectWithInputWidget and its PHP implementation

No. We implemented the mw.widgets.SelectWithInputWidget, but the two HTMLFormField subclasses haven't been updated yet to use it.

Change 357198 had a related patch set uploaded (by Prtksxna; owner: Prtksxna):
[mediawiki/core@master] HTMLSelectAndOtherField/HTMLSelectOrOtherField: Add OOUI implementation

Change 357198 merged by jenkins-bot:
[mediawiki/core@master] HTMLSelectAndOtherField/HTMLSelectOrOtherField: Add OOUI implementation