Make it harder to miss errors and warnings while developing Phabricator
Summary: If a page generates warnings or errors, you only get a little red dot in DarkConsole which is hard to see. DarkConsole is also fairly big and there are plenty of reasons not to leave it open all the time. Instead, unconditionally show a big message to developers if there are errors or warnings. We could make this more sophisticated eventually, but the value is just that you see it. Test Plan: Browsed pages with and without warnings, got the right banner state. Reviewers: nh, btrahan, jungejason Reviewed By: btrahan CC: aran, btrahan Maniphest Tasks: T734 Differential Revision: https://secure.phabricator.com/D1307
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -364,8 +364,19 @@ class PhabricatorStandardPageView extends AphrontPageView {
|
||||
'</div>';
|
||||
}
|
||||
|
||||
$developer_warning = null;
|
||||
if (PhabricatorEnv::getEnvConfig('phabricator.show-error-callout') &&
|
||||
DarkConsoleErrorLogPluginAPI::getErrors()) {
|
||||
$developer_warning =
|
||||
'<div class="aphront-developer-error-callout">'.
|
||||
'This page raised PHP errors. Find them in DarkConsole '.
|
||||
'or the error log.'.
|
||||
'</div>';
|
||||
}
|
||||
|
||||
return
|
||||
($console ? '<darkconsole />' : null).
|
||||
$developer_warning.
|
||||
'<div class="phabricator-standard-page '.$admin_class.'">'.
|
||||
$header_chrome.
|
||||
$this->bodyContent.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
|
||||
phutil_require_module('phabricator', 'aphront/console/plugin/errorlog/api');
|
||||
phutil_require_module('phabricator', 'aphront/request');
|
||||
phutil_require_module('phabricator', 'applications/people/storage/preferences');
|
||||
phutil_require_module('phabricator', 'infrastructure/celerity/api');
|
||||
|
||||
Reference in New Issue
Block a user