This removes the bulk of the "Form Errors" text, some variations likely exists. These are a bit redundant and space consuming. I'd also like to back ErrorView more into PHUIObjectBox.
Details
Details
- Reviewers
epriestley btrahan - Commits
- Restricted Diffusion Commit
rPb74c7a3d371a: Simplify PHUIObjectBoxViews handling of Save and Error states
Test out the forms, see errors without the text.
Diff Detail
Diff Detail
- Branch
- form-title
- Lint
Lint Errors Severity Location Code Message Error src/applications/people/controller/PhabricatorPeopleEditController.php:228 XHP5 Use of Undeclared Variable - Unit
Tests Passed
Event Timeline
Comment Actions
Looks like a regexp went crazy, but the other changes look good.
One thing I think we should do is put a new:
public function setFormErrors($errors) {
if ($errors) {
$this->setFormError(id(new ErrorView())->setErrors($errors);
}
return $this;
}...method on ObjectBoxView, and then simplify all the similar constructs that exist elsewhere. Feeling ambitious?
| src/applications/people/controller/PhabricatorPeopleEditController.php | ||
|---|---|---|
| 220 | hahaha | |
Comment Actions
I think if we do setFormErrors and setFormWarnings, then that would be cool, and I could do header treatments on the whole box accordingly. Right now you can just dump any AphrontErrorBox in there.
Comment Actions
setFormErrors is a convenience method for viewing an array of errors
setFormSaved is a convenience method for setting a success state
setErrorView lets you dump any ErrorView into the box.