Redesign Application Search

Summary: This moves aphront-side-nav to use same table css display as profile nav. Slightly less code to support. Cleans up AppSearch UI, think I've gotten all the edge cases here, but bang on it, can hold until after release cut.

Test Plan: Config, Maniphest, Differential, Diffusion, Home.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16346
This commit is contained in:
Chad Little
2016-08-01 12:06:35 -07:00
parent 5380d87792
commit 11e84c166a
20 changed files with 271 additions and 166 deletions

View File

@@ -193,10 +193,12 @@ final class PhabricatorApplicationSearchController
}
$header = id(new PHUIHeaderView())
->setHeader($title);
->setHeader($title)
->setProfileHeader(true);
$box = id(new PHUIObjectBoxView())
->setHeader($header);
->setHeader($header)
->addClass('application-search-results');
if ($run_query || $named_query) {
$box->setShowHide(
@@ -281,9 +283,8 @@ final class PhabricatorApplicationSearchController
if ($pager->willShowPagingControls()) {
$pager_box = id(new PHUIBoxView())
->addPadding(PHUI::PADDING_MEDIUM)
->addMargin(PHUI::MARGIN_LARGE)
->setBorder(true)
->setColor(PHUIBoxView::GREY)
->addClass('application-search-pager')
->appendChild($pager);
$body[] = $pager_box;
}
@@ -308,7 +309,8 @@ final class PhabricatorApplicationSearchController
}
$crumbs = $parent
->buildApplicationCrumbs();
->buildApplicationCrumbs()
->setBorder(true);
if ($more_crumbs) {
$query_uri = $engine->getQueryResultsPageURI($saved_query->getQueryKey());
@@ -321,12 +323,15 @@ final class PhabricatorApplicationSearchController
$crumbs->addTextCrumb($title);
}
require_celerity_resource('application-search-view-css');
return $this->newPage()
->setApplicationMenu($this->buildApplicationMenu())
->setTitle(pht('Query: %s', $title))
->setCrumbs($crumbs)
->setNavigation($nav)
->appendChild($body);
->appendChild($body)
->addClass('application-search-view');
}
private function processEditRequest() {
@@ -403,19 +408,28 @@ final class PhabricatorApplicationSearchController
$crumbs = $parent
->buildApplicationCrumbs()
->addTextCrumb(pht('Saved Queries'), $engine->getQueryManagementURI());
->addTextCrumb(pht('Saved Queries'), $engine->getQueryManagementURI())
->setBorder(true);
$nav->selectFilter('query/edit');
$header = id(new PHUIHeaderView())
->setHeader(pht('Saved Queries'))
->setProfileHeader(true);
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Saved Queries'))
->setObjectList($list);
->setHeader($header)
->setObjectList($list)
->addClass('application-search-results');
require_celerity_resource('application-search-view-css');
return $this->newPage()
->setApplicationMenu($this->buildApplicationMenu())
->setTitle(pht('Saved Queries'))
->setCrumbs($crumbs)
->setNavigation($nav)
->addClass('application-search-view')
->appendChild($box);
}