Page MenuHomePhabricator

Make use of Codex within Page Forms
Open, Needs TriagePublic

Description

Now that Codex is considered fully stable, it would be good to move over as much of the functionality within the Page Forms extension to use it as possible.

Here are the form input types that seem like they could be transferred to use Codex, along with their current implementation, and the Codex component they could use:

Input typeCurrent implementationCodex component
textHTMLTextInput
textareaHTMLTextArea
comboboxOOUILookup
tokensSelect2Chips
radiobuttonHTMLRadio
dropdownHTMLSelect
checkboxesOOUICheckbox
checkboxOOUICheckbox
dateHTMLTextInput + Select
datetimeHTMLTextInput + Select
yearHTMLTextInput

(Note that, for most of these input types, the "Current implementation" value should really have a "+ custom JavaScript" after it. Some of this custom JS can also be replaced by Codex, like the textarea input's autogrow handling.)

And here is a similar table for other form elements that could make use of Codex:

Form elementCurrent implementationCodex component
toggle (used in some helper forms)OOUIToggleSwitch
form buttonsOOUIButton

On the other hand, the following input types seem like they could not be converted, because there is not (currently) a Codex component for them:

  • listbox
  • tree
  • datepicker, datetimepicker
  • rating
  • googlemaps, leaflet, openlayers
  • regexp (not a true input type anyway)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 1010985 had a related patch set uploaded (by Techwizzie; author: Techwizzie):

[mediawiki/extensions/PageForms@master] Make use of Codex within Page Forms

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

@Yaron_Koren For some of these components, they can only be used in a Vue based setup (combobox and tokens).

Change 1012646 had a related patch set uploaded (by Techwizzie; author: Techwizzie):

[mediawiki/extensions/PageForms@REL1_41] Make use of Codex within Page Forms

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

Change 1010985 abandoned by Techwizzie:

[mediawiki/extensions/PageForms@master] Make use of Codex within Page Forms

Reason:

Moving to REL1_41 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageForms/+/1012646

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