mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
[Redesign] Put all ApplicationSearch results in an ObjectBox
Summary: Ref T8099. In most cases we return either an ObjectList or AphrontTable, and can pretty up the UI in ApplicationSearch. There are a few edge cases, like PeopleUserLog, that can be cleanup up individually in the future, but look fine for now. Also added 'setNotice' for AphrontTable for a few cases where we want to convey addtional information. TODO: Seems we always pass a Pager Object, which tries to get displayed, I'll redesign that interaction in the future, probably by passing the Pager to the ObjectBox Test Plan: Went throught most/all ApplicationSearch panels I could find, even edge cases look better. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8099 Differential Revision: https://secure.phabricator.com/D12989
This commit is contained in:
parent
c371077bbe
commit
3d407732d6
13 changed files with 88 additions and 84 deletions
|
@ -7,14 +7,14 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '341abbd5',
|
||||
'core.pkg.css' => '9d77cbde',
|
||||
'core.pkg.js' => '9db3e620',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => 'bb338e4b',
|
||||
'differential.pkg.js' => '63a77807',
|
||||
'diffusion.pkg.css' => '385e85b3',
|
||||
'diffusion.pkg.js' => '0115b37c',
|
||||
'maniphest.pkg.css' => 'e87fdd66',
|
||||
'maniphest.pkg.css' => '4845691a',
|
||||
'maniphest.pkg.js' => '2f4f52c2',
|
||||
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
||||
'rsrc/css/aphront/dark-console.css' => '6378ef3d',
|
||||
|
@ -26,7 +26,7 @@ return array(
|
|||
'rsrc/css/aphront/pager-view.css' => '2e3539af',
|
||||
'rsrc/css/aphront/panel-view.css' => '8427b78d',
|
||||
'rsrc/css/aphront/phabricator-nav-view.css' => '949b43d9',
|
||||
'rsrc/css/aphront/table-view.css' => '0046060b',
|
||||
'rsrc/css/aphront/table-view.css' => 'fb17602c',
|
||||
'rsrc/css/aphront/tokenizer.css' => '86a13f7f',
|
||||
'rsrc/css/aphront/tooltip.css' => '7672b60f',
|
||||
'rsrc/css/aphront/two-column.css' => '16ab3ad2',
|
||||
|
@ -36,7 +36,7 @@ return array(
|
|||
'rsrc/css/application/auth/auth.css' => '44975d4b',
|
||||
'rsrc/css/application/base/main-menu-view.css' => '4b7ecab2',
|
||||
'rsrc/css/application/base/notification-menu.css' => '713df25a',
|
||||
'rsrc/css/application/base/phabricator-application-launch-view.css' => '132f9d14',
|
||||
'rsrc/css/application/base/phabricator-application-launch-view.css' => '214e2510',
|
||||
'rsrc/css/application/base/standard-page-view.css' => '43045fb4',
|
||||
'rsrc/css/application/calendar/calendar-icon.css' => '98ce946d',
|
||||
'rsrc/css/application/chatlog/chatlog.css' => '852140ff',
|
||||
|
@ -75,10 +75,10 @@ return array(
|
|||
'rsrc/css/application/harbormaster/harbormaster.css' => '49d64eb4',
|
||||
'rsrc/css/application/herald/herald-test.css' => '778b008e',
|
||||
'rsrc/css/application/herald/herald.css' => '826075fa',
|
||||
'rsrc/css/application/maniphest/batch-editor.css' => '9a5ed9c1',
|
||||
'rsrc/css/application/maniphest/batch-editor.css' => 'b0f0b6d5',
|
||||
'rsrc/css/application/maniphest/report.css' => 'f6931fdf',
|
||||
'rsrc/css/application/maniphest/task-edit.css' => '8e23031b',
|
||||
'rsrc/css/application/maniphest/task-summary.css' => '8795780d',
|
||||
'rsrc/css/application/maniphest/task-summary.css' => '11cc5344',
|
||||
'rsrc/css/application/objectselector/object-selector.css' => '029a133d',
|
||||
'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b',
|
||||
'rsrc/css/application/paste/paste.css' => 'eb997ddd',
|
||||
|
@ -141,7 +141,7 @@ return array(
|
|||
'rsrc/css/phui/phui-info-view.css' => '33e54618',
|
||||
'rsrc/css/phui/phui-list.css' => 'e448b6ba',
|
||||
'rsrc/css/phui/phui-object-box.css' => 'e3441f90',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => '8538712d',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => 'fef025d8',
|
||||
'rsrc/css/phui/phui-pinboard-view.css' => '55b27bc3',
|
||||
'rsrc/css/phui/phui-property-list-view.css' => 'd2d143ea',
|
||||
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
||||
|
@ -484,7 +484,7 @@ return array(
|
|||
'aphront-multi-column-view-css' => 'fd18389d',
|
||||
'aphront-pager-view-css' => '2e3539af',
|
||||
'aphront-panel-view-css' => '8427b78d',
|
||||
'aphront-table-view-css' => '0046060b',
|
||||
'aphront-table-view-css' => 'fb17602c',
|
||||
'aphront-tokenizer-control-css' => '86a13f7f',
|
||||
'aphront-tooltip-css' => '7672b60f',
|
||||
'aphront-two-column-view-css' => '16ab3ad2',
|
||||
|
@ -686,10 +686,10 @@ return array(
|
|||
'javelin-websocket' => 'e292eaf4',
|
||||
'javelin-workflow' => '5b2e3e2b',
|
||||
'lightbox-attachment-css' => '7acac05d',
|
||||
'maniphest-batch-editor' => '9a5ed9c1',
|
||||
'maniphest-batch-editor' => 'b0f0b6d5',
|
||||
'maniphest-report-css' => 'f6931fdf',
|
||||
'maniphest-task-edit-css' => '8e23031b',
|
||||
'maniphest-task-summary-css' => '8795780d',
|
||||
'maniphest-task-summary-css' => '11cc5344',
|
||||
'multirow-row-manager' => 'b5d57730',
|
||||
'owners-path-editor' => 'aa1733d0',
|
||||
'owners-path-editor-css' => '2f00933b',
|
||||
|
@ -697,7 +697,7 @@ return array(
|
|||
'path-typeahead' => 'f7fc67ec',
|
||||
'people-profile-css' => '25970776',
|
||||
'phabricator-action-list-view-css' => '32c388b3',
|
||||
'phabricator-application-launch-view-css' => '132f9d14',
|
||||
'phabricator-application-launch-view-css' => '214e2510',
|
||||
'phabricator-busy' => '59a7976a',
|
||||
'phabricator-chatlog-css' => '852140ff',
|
||||
'phabricator-content-source-view-css' => '4b8b05d4',
|
||||
|
@ -777,7 +777,7 @@ return array(
|
|||
'phui-inline-comment-view-css' => '2174771a',
|
||||
'phui-list-view-css' => 'e448b6ba',
|
||||
'phui-object-box-css' => 'e3441f90',
|
||||
'phui-object-item-list-view-css' => '8538712d',
|
||||
'phui-object-item-list-view-css' => 'fef025d8',
|
||||
'phui-pinboard-view-css' => '55b27bc3',
|
||||
'phui-property-list-view-css' => 'd2d143ea',
|
||||
'phui-remarkup-preview-css' => '19ad512b',
|
||||
|
|
|
@ -141,9 +141,7 @@ final class FundBackerSearchEngine
|
|||
'right',
|
||||
));
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Backers'))
|
||||
->setTable($table);
|
||||
return $table;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -267,10 +267,8 @@ final class LegalpadDocumentSignatureSearchEngine
|
|||
'right',
|
||||
));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Signatures'));
|
||||
|
||||
if ($this->document) {
|
||||
// TODO redesign-2015 : Talk to epriestley about 'correct' way to implelment
|
||||
/* if ($this->document) {
|
||||
$document_id = $this->document->getID();
|
||||
|
||||
$header->addActionLink(
|
||||
|
@ -280,25 +278,15 @@ final class LegalpadDocumentSignatureSearchEngine
|
|||
->setHref($this->getApplicationURI('addsignature/'.$document_id.'/'))
|
||||
->setWorkflow(true)
|
||||
->setIcon(id(new PHUIIconView())->setIconFont('fa-pencil')));
|
||||
}
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setTable($table);
|
||||
}*/
|
||||
|
||||
if (!$this->document) {
|
||||
$policy_notice = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||
->setErrors(
|
||||
array(
|
||||
pht(
|
||||
'NOTE: You can only see your own signatures and signatures on '.
|
||||
'documents you have permission to edit.'),
|
||||
));
|
||||
$box->setInfoView($policy_notice);
|
||||
$table->setNotice(
|
||||
pht('NOTE: You can only see your own signatures and signatures on '.
|
||||
'documents you have permission to edit.'));
|
||||
}
|
||||
|
||||
return $box;
|
||||
return $table;
|
||||
}
|
||||
|
||||
private function renderIcon($icon, $color, $title) {
|
||||
|
|
|
@ -207,7 +207,6 @@ final class PhabricatorAppSearchEngine
|
|||
}
|
||||
|
||||
$list = new PHUIObjectItemListView();
|
||||
$list->addClass('phui-object-item-launcher-list');
|
||||
|
||||
foreach ($applications as $application) {
|
||||
$icon = $application->getFontIcon();
|
||||
|
|
|
@ -186,8 +186,6 @@ final class PhabricatorPeopleLogSearchEngine
|
|||
$table->setSearchBaseURI($this->getApplicationURI('logs/'));
|
||||
}
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('User Activity Logs'))
|
||||
->setTable($table);
|
||||
return $table;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -222,13 +222,12 @@ final class PhortuneCartSearchEngine
|
|||
|
||||
$merchant = $this->getMerchant();
|
||||
if ($merchant) {
|
||||
$header = pht('Orders for %s', $merchant->getName());
|
||||
$notice = pht('Orders for %s', $merchant->getName());
|
||||
} else {
|
||||
$header = pht('Your Orders');
|
||||
$notice = pht('Your Orders');
|
||||
}
|
||||
$table->setNotice($notice);
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText($header)
|
||||
->setTable($table);
|
||||
return $table;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,6 +200,12 @@ final class PhabricatorApplicationSearchController
|
|||
|
||||
$nav->appendChild($filter_view);
|
||||
|
||||
if ($named_query) {
|
||||
$title = $named_query->getQueryName();
|
||||
} else {
|
||||
$title = pht('Advanced Search');
|
||||
}
|
||||
|
||||
if ($run_query) {
|
||||
$nav->appendChild(
|
||||
$anchor = id(new PhabricatorAnchorView())
|
||||
|
@ -227,7 +233,15 @@ final class PhabricatorApplicationSearchController
|
|||
$saved_query);
|
||||
}
|
||||
|
||||
$nav->appendChild($list);
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title);
|
||||
|
||||
if ($list instanceof AphrontTableView) {
|
||||
$box->setTable($list);
|
||||
} else {
|
||||
$box->setObjectList($list);
|
||||
}
|
||||
$nav->appendChild($box);
|
||||
|
||||
// TODO: This is a bit hacky.
|
||||
if ($list instanceof PHUIObjectItemListView) {
|
||||
|
@ -260,12 +274,6 @@ final class PhabricatorApplicationSearchController
|
|||
$nav->appendChild($errors);
|
||||
}
|
||||
|
||||
if ($named_query) {
|
||||
$title = $named_query->getQueryName();
|
||||
} else {
|
||||
$title = pht('Advanced Search');
|
||||
}
|
||||
|
||||
$crumbs = $parent
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
@ -353,7 +361,12 @@ final class PhabricatorApplicationSearchController
|
|||
|
||||
$nav->selectFilter('query/edit');
|
||||
$nav->setCrumbs($crumbs);
|
||||
$nav->appendChild($list);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Saved Queries'))
|
||||
->setObjectList($list);
|
||||
|
||||
$nav->appendChild($box);
|
||||
|
||||
return $parent->buildApplicationPage(
|
||||
$nav,
|
||||
|
|
|
@ -11,6 +11,7 @@ final class AphrontTableView extends AphrontView {
|
|||
protected $zebraStripes = true;
|
||||
protected $noDataString;
|
||||
protected $className;
|
||||
protected $notice;
|
||||
protected $columnVisibility = array();
|
||||
private $deviceVisibility = array();
|
||||
|
||||
|
@ -55,6 +56,11 @@ final class AphrontTableView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setNotice($notice) {
|
||||
$this->notice = $notice;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setZebraStripes($zebra_stripes) {
|
||||
$this->zebraStripes = $zebra_stripes;
|
||||
return $this;
|
||||
|
@ -142,6 +148,21 @@ final class AphrontTableView extends AphrontView {
|
|||
$sort_values[] = null;
|
||||
}
|
||||
|
||||
if ($this->notice) {
|
||||
$colspan = max(count(array_filter($visibility)), 1);
|
||||
$table[] = phutil_tag(
|
||||
'tr',
|
||||
array(),
|
||||
phutil_tag(
|
||||
'td',
|
||||
array(
|
||||
'colspan' => $colspan,
|
||||
'class' => 'aphront-table-notice',
|
||||
),
|
||||
$this->notice));
|
||||
|
||||
}
|
||||
|
||||
$tr = array();
|
||||
foreach ($headers as $col_num => $header) {
|
||||
if (!$visibility[$col_num]) {
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
border-bottom: 1px solid {$blueborder};
|
||||
}
|
||||
|
||||
.aphront-table-view td.aphront-table-notice {
|
||||
padding: 12px 16px;
|
||||
font-size: 13px;
|
||||
color: {$blue};
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid {$thinblueborder};
|
||||
}
|
||||
|
||||
.aphront-table-view tr.alt {
|
||||
background: {$lightgreybackground};
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ div.phabricator-application-launch-container {
|
|||
}
|
||||
|
||||
.phabricator-application-attention-count {
|
||||
color: {$sky};
|
||||
color: {$fire};
|
||||
}
|
||||
|
||||
a.phabricator-application-launch-phone-only {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/**
|
||||
* @provides maniphest-batch-editor
|
||||
*/
|
||||
|
||||
.maniphest-batch-actions-table {
|
||||
width: 100%;
|
||||
margin: 12px 0;
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.maniphest-batch-editor {
|
||||
border-top: 1px solid {$thinblueborder};
|
||||
}
|
||||
|
||||
.maniphest-batch-editor-layout {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -247,9 +247,6 @@ ul.phui-object-item-list-view {
|
|||
|
||||
.phui-object-box .phui-object-item-list-view {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.phui-object-box .phui-object-item-list-view {
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
@ -604,15 +601,6 @@ ul.phui-object-item-list-view .phui-object-item-selected
|
|||
|
||||
/* - Dashboards ------------------------------------------------------------ */
|
||||
|
||||
.dashboard-panel .phui-object-item-list-view {
|
||||
padding: 0;
|
||||
border-left: 1px solid {$lightblueborder};
|
||||
border-right: 1px solid {$lightblueborder};
|
||||
border-bottom: 1px solid {$lightblueborder};
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.dashboard-panel .phui-object-item-frame,
|
||||
.phui-object-box .phui-object-item-list-view .phui-object-item-frame {
|
||||
border: none;
|
||||
border-bottom: 1px solid {$thinblueborder};
|
||||
|
@ -646,31 +634,20 @@ ul.phui-object-item-list-view .phui-object-item-selected
|
|||
/* - Launcher List ---------------------------------------------------------- */
|
||||
|
||||
.launcher-header {
|
||||
margin: 8px 16px -4px;
|
||||
clear: both;
|
||||
color: {$darkbluetext};
|
||||
padding: 8px 4px;
|
||||
font-weight: 500;
|
||||
color: {$blue};
|
||||
font-size: 13px;
|
||||
border-top: 1px solid {$thinblueborder};
|
||||
border-bottom: 1px solid {$thinblueborder};
|
||||
}
|
||||
|
||||
.launcher-header:nth-of-type(1) {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.phui-object-item-launcher-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.device-desktop .phui-object-item-launcher-list .phui-object-item {
|
||||
width: 49%;
|
||||
float: left;
|
||||
margin-right: 1%;
|
||||
box-sizing: border-box;
|
||||
.phui-header-shell + .launcher-header {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.phui-object-item-image-icon {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.phui-object-item-image-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: 4px 0;
|
||||
|
|
Loading…
Reference in a new issue