Page MenuHomePhabricator

Refactor Codex HTMLForm fields to use a separate method instead of $isCodexForm
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently, the Codex implementations of each HTMLFormField subclass have a getInputHtml() method that checks whether the parent form is a CodexHTMLForm, and generates either the Codex version or the plain HTML version of the field based on that.

Instead, we should structure this more like how OOUIHTMLForm works, where there's a separate method in HTMLFormField (getInputOOUI()) that OOUIHTMLForm calls instead of getInputHtml().

This new method should be properly documented and should be covered by PHPUnit tests.

Event Timeline

Change 1008569 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] HTMLFormField: Add getInputCodex() method for Codex output

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

Change 1009271 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] HTMLFormField: Refactor Button, Check, and Text handling of Codex

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

Change 1008569 merged by jenkins-bot:

[mediawiki/core@master] HTMLFormField: Add getInputCodex() method for Codex output

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

Change 1009271 merged by jenkins-bot:

[mediawiki/core@master] HTMLFormField: Refactor Button, Check, and Text handling of Codex

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