From b75cea55a782d6a9d9969c82027731f7fe88b1b9 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 29 Aug 2016 20:09:43 -0700 Subject: [PATCH] Fix search results with tables, fatals in Phortune Summary: Previously we collapsed all table search results, but the new UI doesn't need it. Remove unused methods and fix CSS. Test Plan: Legalpad Signatures, Phortune Accounts. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D16469 --- resources/celerity/map.php | 4 ++-- .../controller/PhortuneAccountListController.php | 4 ++-- .../controller/PhortuneProductListController.php | 2 +- .../phortune/query/PhortuneMerchantSearchEngine.php | 2 +- .../PhabricatorApplicationSearchController.php | 3 --- .../view/PhabricatorApplicationSearchResultView.php | 10 ---------- .../css/application/search/application-search-view.css | 5 +++++ 7 files changed, 11 insertions(+), 19 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 5597ea303d..98cf103b11 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -100,7 +100,7 @@ return array( 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', 'rsrc/css/application/releeph/releeph-request-typeahead.css' => '667a48ae', - 'rsrc/css/application/search/application-search-view.css' => 'b3e0e5ef', + 'rsrc/css/application/search/application-search-view.css' => 'be6454ec', 'rsrc/css/application/search/search-results.css' => '7dea472c', 'rsrc/css/application/slowvote/slowvote.css' => 'a94b7230', 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', @@ -542,7 +542,7 @@ return array( 'aphront-tokenizer-control-css' => '056da01b', 'aphront-tooltip-css' => '1a07aea8', 'aphront-typeahead-control-css' => 'd4f16145', - 'application-search-view-css' => 'b3e0e5ef', + 'application-search-view-css' => 'be6454ec', 'auth-css' => '0877ed6e', 'bulk-job-css' => 'df9c1d4a', 'changeset-view-manager' => 'a2828756', diff --git a/src/applications/phortune/controller/PhortuneAccountListController.php b/src/applications/phortune/controller/PhortuneAccountListController.php index 4b7521ceaa..d95fd709d5 100644 --- a/src/applications/phortune/controller/PhortuneAccountListController.php +++ b/src/applications/phortune/controller/PhortuneAccountListController.php @@ -39,7 +39,7 @@ final class PhortuneAccountListController extends PhortuneController { ->setHeader($account->getName()) ->setHref($this->getApplicationURI($account->getID().'/')) ->setObject($account) - ->setIcon('fa-credit-card'); + ->setImageIcon('fa-credit-card'); $payment_list->addItem($item); } @@ -71,7 +71,7 @@ final class PhortuneAccountListController extends PhortuneController { ->setHeader($merchant->getName()) ->setHref($this->getApplicationURI('/merchant/'.$merchant->getID().'/')) ->setObject($merchant) - ->setIcon('fa-bank'); + ->setImageIcon('fa-bank'); $merchant_list->addItem($item); } diff --git a/src/applications/phortune/controller/PhortuneProductListController.php b/src/applications/phortune/controller/PhortuneProductListController.php index eeb594d650..ee84581ae1 100644 --- a/src/applications/phortune/controller/PhortuneProductListController.php +++ b/src/applications/phortune/controller/PhortuneProductListController.php @@ -41,7 +41,7 @@ final class PhortuneProductListController extends PhabricatorController { ->setHeader($product->getProductName()) ->setHref($view_uri) ->addAttribute($price->formatForDisplay()) - ->setIcon('fa-gift'); + ->setImageIcon('fa-gift'); $product_list->addItem($item); } diff --git a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php index 1806af371e..d37c1455b3 100644 --- a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php +++ b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php @@ -74,7 +74,7 @@ final class PhortuneMerchantSearchEngine ->setHeader($merchant->getName()) ->setHref('/phortune/merchant/'.$merchant->getID().'/') ->setObject($merchant) - ->setIcon('fa-bank'); + ->setImageIcon('fa-bank'); $list->addItem($item); } diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php index 164e9aabbc..a463e50471 100644 --- a/src/applications/search/controller/PhabricatorApplicationSearchController.php +++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php @@ -270,9 +270,6 @@ final class PhabricatorApplicationSearchController if ($list->getContent()) { $box->appendChild($list->getContent()); } - if ($list->getCollapsed()) { - $box->setCollapsed(true); - } $result_header = $list->getHeader(); if ($result_header) { diff --git a/src/applications/search/view/PhabricatorApplicationSearchResultView.php b/src/applications/search/view/PhabricatorApplicationSearchResultView.php index 5bcfdcf675..1c3f4aad65 100644 --- a/src/applications/search/view/PhabricatorApplicationSearchResultView.php +++ b/src/applications/search/view/PhabricatorApplicationSearchResultView.php @@ -12,7 +12,6 @@ final class PhabricatorApplicationSearchResultView extends Phobject { private $content = null; private $infoView = null; private $actions = array(); - private $collapsed = null; private $noDataString; private $crumbs = array(); private $header; @@ -70,15 +69,6 @@ final class PhabricatorApplicationSearchResultView extends Phobject { return $this->actions; } - public function setCollapsed($collapsed) { - $this->collapsed = $collapsed; - return $this; - } - - public function getCollapsed() { - return $this->collapsed; - } - public function setNoDataString($nodata) { $this->noDataString = $nodata; return $this; diff --git a/webroot/rsrc/css/application/search/application-search-view.css b/webroot/rsrc/css/application/search/application-search-view.css index 24ee18c847..4a573f5111 100644 --- a/webroot/rsrc/css/application/search/application-search-view.css +++ b/webroot/rsrc/css/application/search/application-search-view.css @@ -16,6 +16,11 @@ border-bottom: 1px solid {$thinblueborder}; } +.application-search-view .phui-object-box.phui-object-box-collapsed + .phui-header-shell { + padding: 20px 8px; +} + .application-search-results .phui-profile-header.phui-header-shell .phui-header-header { font-size: 20px;