Page MenuHomePhabricator

TemplateWizard: Only fallback to focus on 'add all' button if it actually exists
Closed, ResolvedPublic0.5 Story Points

Description

(Followup to the bug found in https://phabricator.wikimedia.org/T203052#4564464)

We have a focus method by which we try to set the focus initially, and later when fields are added/removed based on either the first available field or the 'add/remove all' button.

The problem, is that the add/remove button can be missing if the template has no fields or if all fields are mandatory.

In that case, we have nothing to focus on, and the focus method should bail.

To test this:

  1. Try to load an empty template into TemplateWizard

Example TemplateData:

<templatedata>
{
	"params": {},
	"description": "An empty template without parameters"
}
</templatedata>

Expected: No crash :)

Related Objects

Event Timeline

Mooeypoo created this task.Sep 6 2018, 10:28 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptSep 6 2018, 10:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 458606 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/extensions/TemplateWizard@master] Only focus on 'add/remove all' if it actually exists

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

Mooeypoo claimed this task.Sep 6 2018, 10:33 PM
Mooeypoo set the point value for this task to 0.5.
Mooeypoo moved this task from Ready to Needs Review/Feedback on the Community-Tech-Sprint board.

Change 458606 merged by jenkins-bot:
[mediawiki/extensions/TemplateWizard@master] Only focus on 'add/remove all' if it actually exists

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

Niharika closed this task as Resolved.Oct 12 2018, 11:12 PM
Niharika moved this task from QA to Q2 2018-19 on the Community-Tech-Sprint board.