Page MenuHomePhabricator

Update Ballot::getQuestionForm documentation to return an \OOUI\FieldsetLayout
Closed, ResolvedPublic

Description

Ballot::getQuestionForm is documented to return a string. Following the subtasks of T273044, it will now return an OOUI FieldsetLayout, which is cast to a string during Ballot::getForm.

We should document that it returns an OOUI FieldsetLayout once these tasks are complete, so that callers know they do not need to treat the return value as a string.

The documentation shouldn't be changed until the subtasks are all complete, because until then, some subclasses still return a string for getQuestionForm.

Event Timeline

With https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/676086 having been merged, I think we can go one further and say that getQuestionForm can be documented to return a OOUI\FieldsetLayout.

Tchanders renamed this task from Update Ballot::getQuestionForm documentation to return an \OOUI\Element to Update Ballot::getQuestionForm documentation to return an \OOUI\FieldsetLayout.Apr 1 2021, 11:16 AM
Tchanders updated the task description. (Show Details)

Change 676331 had a related patch set uploaded (by Wikitrent; author: Wikitrent):

[mediawiki/extensions/SecurePoll@master] Update Ballot::getQuestionForm documentation

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

Change 676331 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Update Ballot::getQuestionForm documentation

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