Config re-design
Summary:
This is a full UI pass at a cleaner "Config" application. The main idea is to simplify the UI, center it, and have a different feel than other UI, a sort of "manage" UI theme for objects with loads of settings. Also adds a new minimalistic "WHITE_CONFIG" box type which may get re-used in Diffusion settings. This is a 90% pass, I'll have a few follow up diffs. Specifically:
- Build breadcrumbs as a flexible UI to go into headers.
- One click ObjectItemView option, for hover states.
- Sidenav doesn't always select (AphrontFilter issue)
- Mobile touchups, though it's pretty reasonable.
Test Plan:
Click through every page here, edit options, see new navigation UI. Test a few various setup issue layouts including fatals.
{F5163228}
{F5163229}
{F5163230}
{F5163231}
{F5163232}
{F5163233}
{F5163234}
Reviewers: epriestley
Reviewed By: epriestley
Spies: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D18519
This commit is contained in:
@@ -9,16 +9,15 @@ final class PhabricatorConfigCacheController
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cache/');
|
||||
|
||||
$purge_button = id(new PHUIButtonView())
|
||||
->setText(pht('Purge Caches'))
|
||||
->setHref('/config/cache/purge/')
|
||||
->setTag('a')
|
||||
->setWorkflow(true)
|
||||
->setIcon('fa-exclamation-triangle');
|
||||
|
||||
$title = pht('Cache Status');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Cache Status'))
|
||||
->setBorder(true);
|
||||
$header = $this->buildHeaderView($title, $purge_button);
|
||||
|
||||
$code_box = $this->renderCodeBox();
|
||||
$data_box = $this->renderDataBox();
|
||||
@@ -28,40 +27,27 @@ final class PhabricatorConfigCacheController
|
||||
$data_box,
|
||||
);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($page);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($page);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function renderCodeBox() {
|
||||
$cache = PhabricatorOpcodeCacheSpec::getActiveCacheSpec();
|
||||
|
||||
$properties = id(new PHUIPropertyListView());
|
||||
|
||||
$this->renderCommonProperties($properties, $cache);
|
||||
|
||||
$purge_button = id(new PHUIButtonView())
|
||||
->setText(pht('Purge Caches'))
|
||||
->setHref('/config/cache/purge/')
|
||||
->setTag('a')
|
||||
->setWorkflow(true)
|
||||
->setIcon('fa-exclamation-triangle');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Opcode Cache'))
|
||||
->addActionLink($purge_button);
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($properties);
|
||||
return $this->buildConfigBoxView(pht('Opcode Cache'), $properties);
|
||||
}
|
||||
|
||||
private function renderDataBox() {
|
||||
@@ -109,11 +95,9 @@ final class PhabricatorConfigCacheController
|
||||
));
|
||||
}
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Data Cache'))
|
||||
->addPropertyList($properties)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
$properties = $this->buildConfigBoxView(pht('Data Cache'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Cache Storage'), $table);
|
||||
return array($properties, $table);
|
||||
}
|
||||
|
||||
private function renderCommonProperties(
|
||||
|
||||
Reference in New Issue
Block a user