Page MenuHomePhabricator

Update AphrontRequestFailure to common display libs
ClosedPublic

Authored by chad on Sep 26 2014, 9:12 PM.
Tags
None
Referenced Files
F13166187: D10578.diff
Tue, May 7, 5:57 AM
Unknown Object (File)
Fri, May 3, 3:36 AM
Unknown Object (File)
Mon, Apr 29, 3:32 PM
Unknown Object (File)
Wed, Apr 24, 11:31 PM
Unknown Object (File)
Fri, Apr 19, 6:12 PM
Unknown Object (File)
Fri, Apr 12, 6:17 AM
Unknown Object (File)
Thu, Apr 11, 10:14 AM
Unknown Object (File)
Thu, Apr 11, 10:14 AM
Subscribers
Tokens
"Pterodactyl" token, awarded by epriestley.

Details

Summary

Moves to PHUIObjectBox, removes old CSS

Test Plan

Pull up 404 page.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Update AphrontRequestFailure to common display libs.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.

Can we get rid of all this stuff and just return a dialog (return $this->newDialog()->...)?

I think the only issue is that dialogs look weird with no buttons, but we could either fix that or add a "Rats!" button that takes you home.

webroot/rsrc/css/aphront/request-failure-view.css
0

I presume then these buttons aren't in use anywhere? I grepped but did come up with anything. If all AphrontFailures are just title/body, I can replace with Dialog.

er, did not come up with anything.

Oh -- it looks like PhabricatorDisabledUserController uses this too. But that should also just return a plain dialog.

Really, we could make 403, 404 and DisabledUser all just return a dialog and then remove this class completely.

(Since some of this stuff isn't in controllers, my advice above is a little off -- you can't use the newDialog() convenience function when not inside a controller, and will have to do it the verbose way: id(new AphrontDialogView())->setUser($user)->...)

chad planned changes to this revision.Sep 26 2014, 9:39 PM
chad edited edge metadata.
  • tweak mobile css
  • Feedback updates.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Sep 26 2014, 11:57 PM

hrm, getting an error when testing disabled users.

>>> UNRECOVERABLE FATAL ERROR <<<

Call to undefined method PhutilSafeHTML::setRequest()

/Users/familyroom/Sites/phabricator/src/applications/base/controller/PhabricatorController.php:318


┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻
src/applications/auth/controller/PhabricatorDisabledUserController.php
16–22

Oh, sorry. For this, just do:

return $this->newDialog()
  ->setTitle(...)
  ->addCancelButton(...)
  ->appendParagraph(...);

You don't need to build a page view or render it here.

This revision was automatically updated to reflect the committed changes.