Page MenuHomePhabricator

Implement HTMLSelectAndOtherField and HTMLSelectOrOtherField in OOUIHTMLForm
Closed, ResolvedPublic

Description

Implement HTMLSelectAndOtherField and HTMLSelectOrOtherField in OOUIHTMLForm.

Event Timeline

matmarex claimed this task.
matmarex raised the priority of this task from to Normal.
matmarex updated the task description. (Show Details)
matmarex added a project: MediaWiki-HTMLForm.
matmarex removed matmarex as the assignee of this task.Aug 24 2015, 4:19 PM

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

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

Prtksxna claimed this task.Mar 29 2017, 5:46 AM

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

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

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

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

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

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

Prtksxna closed this task as Resolved.Jul 18 2017, 4:28 PM