@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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

+88 -84
+12 -12
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '341abbd5', 10 + 'core.pkg.css' => '9d77cbde', 11 11 'core.pkg.js' => '9db3e620', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => 'bb338e4b', 14 14 'differential.pkg.js' => '63a77807', 15 15 'diffusion.pkg.css' => '385e85b3', 16 16 'diffusion.pkg.js' => '0115b37c', 17 - 'maniphest.pkg.css' => 'e87fdd66', 17 + 'maniphest.pkg.css' => '4845691a', 18 18 'maniphest.pkg.js' => '2f4f52c2', 19 19 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 20 20 'rsrc/css/aphront/dark-console.css' => '6378ef3d', ··· 26 26 'rsrc/css/aphront/pager-view.css' => '2e3539af', 27 27 'rsrc/css/aphront/panel-view.css' => '8427b78d', 28 28 'rsrc/css/aphront/phabricator-nav-view.css' => '949b43d9', 29 - 'rsrc/css/aphront/table-view.css' => '0046060b', 29 + 'rsrc/css/aphront/table-view.css' => 'fb17602c', 30 30 'rsrc/css/aphront/tokenizer.css' => '86a13f7f', 31 31 'rsrc/css/aphront/tooltip.css' => '7672b60f', 32 32 'rsrc/css/aphront/two-column.css' => '16ab3ad2', ··· 36 36 'rsrc/css/application/auth/auth.css' => '44975d4b', 37 37 'rsrc/css/application/base/main-menu-view.css' => '4b7ecab2', 38 38 'rsrc/css/application/base/notification-menu.css' => '713df25a', 39 - 'rsrc/css/application/base/phabricator-application-launch-view.css' => '132f9d14', 39 + 'rsrc/css/application/base/phabricator-application-launch-view.css' => '214e2510', 40 40 'rsrc/css/application/base/standard-page-view.css' => '43045fb4', 41 41 'rsrc/css/application/calendar/calendar-icon.css' => '98ce946d', 42 42 'rsrc/css/application/chatlog/chatlog.css' => '852140ff', ··· 75 75 'rsrc/css/application/harbormaster/harbormaster.css' => '49d64eb4', 76 76 'rsrc/css/application/herald/herald-test.css' => '778b008e', 77 77 'rsrc/css/application/herald/herald.css' => '826075fa', 78 - 'rsrc/css/application/maniphest/batch-editor.css' => '9a5ed9c1', 78 + 'rsrc/css/application/maniphest/batch-editor.css' => 'b0f0b6d5', 79 79 'rsrc/css/application/maniphest/report.css' => 'f6931fdf', 80 80 'rsrc/css/application/maniphest/task-edit.css' => '8e23031b', 81 - 'rsrc/css/application/maniphest/task-summary.css' => '8795780d', 81 + 'rsrc/css/application/maniphest/task-summary.css' => '11cc5344', 82 82 'rsrc/css/application/objectselector/object-selector.css' => '029a133d', 83 83 'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b', 84 84 'rsrc/css/application/paste/paste.css' => 'eb997ddd', ··· 141 141 'rsrc/css/phui/phui-info-view.css' => '33e54618', 142 142 'rsrc/css/phui/phui-list.css' => 'e448b6ba', 143 143 'rsrc/css/phui/phui-object-box.css' => 'e3441f90', 144 - 'rsrc/css/phui/phui-object-item-list-view.css' => '8538712d', 144 + 'rsrc/css/phui/phui-object-item-list-view.css' => 'fef025d8', 145 145 'rsrc/css/phui/phui-pinboard-view.css' => '55b27bc3', 146 146 'rsrc/css/phui/phui-property-list-view.css' => 'd2d143ea', 147 147 'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b', ··· 484 484 'aphront-multi-column-view-css' => 'fd18389d', 485 485 'aphront-pager-view-css' => '2e3539af', 486 486 'aphront-panel-view-css' => '8427b78d', 487 - 'aphront-table-view-css' => '0046060b', 487 + 'aphront-table-view-css' => 'fb17602c', 488 488 'aphront-tokenizer-control-css' => '86a13f7f', 489 489 'aphront-tooltip-css' => '7672b60f', 490 490 'aphront-two-column-view-css' => '16ab3ad2', ··· 686 686 'javelin-websocket' => 'e292eaf4', 687 687 'javelin-workflow' => '5b2e3e2b', 688 688 'lightbox-attachment-css' => '7acac05d', 689 - 'maniphest-batch-editor' => '9a5ed9c1', 689 + 'maniphest-batch-editor' => 'b0f0b6d5', 690 690 'maniphest-report-css' => 'f6931fdf', 691 691 'maniphest-task-edit-css' => '8e23031b', 692 - 'maniphest-task-summary-css' => '8795780d', 692 + 'maniphest-task-summary-css' => '11cc5344', 693 693 'multirow-row-manager' => 'b5d57730', 694 694 'owners-path-editor' => 'aa1733d0', 695 695 'owners-path-editor-css' => '2f00933b', ··· 697 697 'path-typeahead' => 'f7fc67ec', 698 698 'people-profile-css' => '25970776', 699 699 'phabricator-action-list-view-css' => '32c388b3', 700 - 'phabricator-application-launch-view-css' => '132f9d14', 700 + 'phabricator-application-launch-view-css' => '214e2510', 701 701 'phabricator-busy' => '59a7976a', 702 702 'phabricator-chatlog-css' => '852140ff', 703 703 'phabricator-content-source-view-css' => '4b8b05d4', ··· 777 777 'phui-inline-comment-view-css' => '2174771a', 778 778 'phui-list-view-css' => 'e448b6ba', 779 779 'phui-object-box-css' => 'e3441f90', 780 - 'phui-object-item-list-view-css' => '8538712d', 780 + 'phui-object-item-list-view-css' => 'fef025d8', 781 781 'phui-pinboard-view-css' => '55b27bc3', 782 782 'phui-property-list-view-css' => 'd2d143ea', 783 783 'phui-remarkup-preview-css' => '19ad512b',
+1 -3
src/applications/fund/query/FundBackerSearchEngine.php
··· 141 141 'right', 142 142 )); 143 143 144 - return id(new PHUIObjectBoxView()) 145 - ->setHeaderText(pht('Backers')) 146 - ->setTable($table); 144 + return $table; 147 145 } 148 146 149 147 }
+7 -19
src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
··· 267 267 'right', 268 268 )); 269 269 270 - $header = id(new PHUIHeaderView()) 271 - ->setHeader(pht('Signatures')); 272 - 273 - if ($this->document) { 270 + // TODO redesign-2015 : Talk to epriestley about 'correct' way to implelment 271 + /* if ($this->document) { 274 272 $document_id = $this->document->getID(); 275 273 276 274 $header->addActionLink( ··· 280 278 ->setHref($this->getApplicationURI('addsignature/'.$document_id.'/')) 281 279 ->setWorkflow(true) 282 280 ->setIcon(id(new PHUIIconView())->setIconFont('fa-pencil'))); 283 - } 284 - 285 - $box = id(new PHUIObjectBoxView()) 286 - ->setHeader($header) 287 - ->setTable($table); 281 + }*/ 288 282 289 283 if (!$this->document) { 290 - $policy_notice = id(new PHUIInfoView()) 291 - ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 292 - ->setErrors( 293 - array( 294 - pht( 295 - 'NOTE: You can only see your own signatures and signatures on '. 296 - 'documents you have permission to edit.'), 297 - )); 298 - $box->setInfoView($policy_notice); 284 + $table->setNotice( 285 + pht('NOTE: You can only see your own signatures and signatures on '. 286 + 'documents you have permission to edit.')); 299 287 } 300 288 301 - return $box; 289 + return $table; 302 290 } 303 291 304 292 private function renderIcon($icon, $color, $title) {
-1
src/applications/meta/query/PhabricatorAppSearchEngine.php
··· 207 207 } 208 208 209 209 $list = new PHUIObjectItemListView(); 210 - $list->addClass('phui-object-item-launcher-list'); 211 210 212 211 foreach ($applications as $application) { 213 212 $icon = $application->getFontIcon();
+1 -3
src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
··· 186 186 $table->setSearchBaseURI($this->getApplicationURI('logs/')); 187 187 } 188 188 189 - return id(new PHUIObjectBoxView()) 190 - ->setHeaderText(pht('User Activity Logs')) 191 - ->setTable($table); 189 + return $table; 192 190 } 193 191 }
+4 -5
src/applications/phortune/query/PhortuneCartSearchEngine.php
··· 222 222 223 223 $merchant = $this->getMerchant(); 224 224 if ($merchant) { 225 - $header = pht('Orders for %s', $merchant->getName()); 225 + $notice = pht('Orders for %s', $merchant->getName()); 226 226 } else { 227 - $header = pht('Your Orders'); 227 + $notice = pht('Your Orders'); 228 228 } 229 + $table->setNotice($notice); 229 230 230 - return id(new PHUIObjectBoxView()) 231 - ->setHeaderText($header) 232 - ->setTable($table); 231 + return $table; 233 232 } 234 233 }
+21 -8
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 200 200 201 201 $nav->appendChild($filter_view); 202 202 203 + if ($named_query) { 204 + $title = $named_query->getQueryName(); 205 + } else { 206 + $title = pht('Advanced Search'); 207 + } 208 + 203 209 if ($run_query) { 204 210 $nav->appendChild( 205 211 $anchor = id(new PhabricatorAnchorView()) ··· 227 233 $saved_query); 228 234 } 229 235 230 - $nav->appendChild($list); 236 + $box = id(new PHUIObjectBoxView()) 237 + ->setHeaderText($title); 238 + 239 + if ($list instanceof AphrontTableView) { 240 + $box->setTable($list); 241 + } else { 242 + $box->setObjectList($list); 243 + } 244 + $nav->appendChild($box); 231 245 232 246 // TODO: This is a bit hacky. 233 247 if ($list instanceof PHUIObjectItemListView) { ··· 258 272 259 273 if ($errors) { 260 274 $nav->appendChild($errors); 261 - } 262 - 263 - if ($named_query) { 264 - $title = $named_query->getQueryName(); 265 - } else { 266 - $title = pht('Advanced Search'); 267 275 } 268 276 269 277 $crumbs = $parent ··· 353 361 354 362 $nav->selectFilter('query/edit'); 355 363 $nav->setCrumbs($crumbs); 356 - $nav->appendChild($list); 364 + 365 + $box = id(new PHUIObjectBoxView()) 366 + ->setHeaderText(pht('Saved Queries')) 367 + ->setObjectList($list); 368 + 369 + $nav->appendChild($box); 357 370 358 371 return $parent->buildApplicationPage( 359 372 $nav,
+21
src/view/control/AphrontTableView.php
··· 11 11 protected $zebraStripes = true; 12 12 protected $noDataString; 13 13 protected $className; 14 + protected $notice; 14 15 protected $columnVisibility = array(); 15 16 private $deviceVisibility = array(); 16 17 ··· 52 53 53 54 public function setClassName($class_name) { 54 55 $this->className = $class_name; 56 + return $this; 57 + } 58 + 59 + public function setNotice($notice) { 60 + $this->notice = $notice; 55 61 return $this; 56 62 } 57 63 ··· 140 146 } 141 147 while (count($headers) > count($sort_values)) { 142 148 $sort_values[] = null; 149 + } 150 + 151 + if ($this->notice) { 152 + $colspan = max(count(array_filter($visibility)), 1); 153 + $table[] = phutil_tag( 154 + 'tr', 155 + array(), 156 + phutil_tag( 157 + 'td', 158 + array( 159 + 'colspan' => $colspan, 160 + 'class' => 'aphront-table-notice', 161 + ), 162 + $this->notice)); 163 + 143 164 } 144 165 145 166 $tr = array();
+8
webroot/rsrc/css/aphront/table-view.css
··· 15 15 border-bottom: 1px solid {$blueborder}; 16 16 } 17 17 18 + .aphront-table-view td.aphront-table-notice { 19 + padding: 12px 16px; 20 + font-size: 13px; 21 + color: {$blue}; 22 + font-weight: bold; 23 + border-bottom: 1px solid {$thinblueborder}; 24 + } 25 + 18 26 .aphront-table-view tr.alt { 19 27 background: {$lightgreybackground}; 20 28 }
+1 -1
webroot/rsrc/css/application/base/phabricator-application-launch-view.css
··· 89 89 } 90 90 91 91 .phabricator-application-attention-count { 92 - color: {$sky}; 92 + color: {$fire}; 93 93 } 94 94 95 95 a.phabricator-application-launch-phone-only {
-1
webroot/rsrc/css/application/maniphest/batch-editor.css
··· 1 1 /** 2 2 * @provides maniphest-batch-editor 3 3 */ 4 - 5 4 .maniphest-batch-actions-table { 6 5 width: 100%; 7 6 margin: 12px 0;
+4
webroot/rsrc/css/application/maniphest/task-summary.css
··· 6 6 display: none; 7 7 } 8 8 9 + .maniphest-batch-editor { 10 + border-top: 1px solid {$thinblueborder}; 11 + } 12 + 9 13 .maniphest-batch-editor-layout { 10 14 width: 100%; 11 15 }
+8 -31
webroot/rsrc/css/phui/phui-object-item-list-view.css
··· 247 247 248 248 .phui-object-box .phui-object-item-list-view { 249 249 padding: 0; 250 - } 251 - 252 - .phui-object-box .phui-object-item-list-view { 253 250 border: none; 254 251 } 255 252 ··· 604 601 605 602 /* - Dashboards ------------------------------------------------------------ */ 606 603 607 - .dashboard-panel .phui-object-item-list-view { 608 - padding: 0; 609 - border-left: 1px solid {$lightblueborder}; 610 - border-right: 1px solid {$lightblueborder}; 611 - border-bottom: 1px solid {$lightblueborder}; 612 - margin-bottom: -1px; 613 - } 614 - 615 - .dashboard-panel .phui-object-item-frame, 616 604 .phui-object-box .phui-object-item-list-view .phui-object-item-frame { 617 605 border: none; 618 606 border-bottom: 1px solid {$thinblueborder}; ··· 646 634 /* - Launcher List ---------------------------------------------------------- */ 647 635 648 636 .launcher-header { 649 - margin: 8px 16px -4px; 650 - clear: both; 651 - color: {$darkbluetext}; 652 - } 653 - 654 - .launcher-header:nth-of-type(1) { 655 - margin-top: 24px; 656 - } 657 - 658 - .phui-object-item-launcher-list { 659 - overflow: hidden; 637 + padding: 8px 4px; 638 + font-weight: 500; 639 + color: {$blue}; 640 + font-size: 13px; 641 + border-top: 1px solid {$thinblueborder}; 642 + border-bottom: 1px solid {$thinblueborder}; 660 643 } 661 644 662 - .device-desktop .phui-object-item-launcher-list .phui-object-item { 663 - width: 49%; 664 - float: left; 665 - margin-right: 1%; 666 - box-sizing: border-box; 645 + .phui-header-shell + .launcher-header { 646 + border-top: none; 667 647 } 668 648 669 649 .phui-object-item-image-icon { 670 650 background: none; 671 - } 672 - 673 - .phui-object-item-image-icon { 674 651 width: 30px; 675 652 height: 30px; 676 653 margin: 4px 0;