@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] Add Table, Collapse support to ObjectBox

+46 -22
+1 -3
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 837 837 $viewer = $this->getViewer(); 838 838 839 839 $header = id(new PHUIHeaderView()) 840 - ->setHeader(pht('Similar Open Revisions')) 841 - ->setSubheader( 842 - pht('Recently updated open revisions affecting the same files.')); 840 + ->setHeader(pht('Recent Similar Open Revisions')); 843 841 844 842 $view = id(new DifferentialRevisionListView()) 845 843 ->setHeader($header)
+1 -1
src/applications/differential/view/DifferentialDiffTableOfContentsView.php
··· 251 251 252 252 return id(new PHUIObjectBoxView()) 253 253 ->setHeaderText(pht('Table of Contents')) 254 + ->setTable($table) 254 255 ->appendChild($anchor) 255 - ->appendChild($table) 256 256 ->appendChild($buttons); 257 257 } 258 258
+1 -1
src/applications/differential/view/DifferentialLocalCommitsView.php
··· 130 130 131 131 return id(new PHUIObjectBoxView()) 132 132 ->setHeaderText(pht('Local Commits')) 133 - ->appendChild($table); 133 + ->setTable($table); 134 134 } 135 135 136 136 private static function formatCommit($commit) {
+1 -1
src/applications/diffusion/controller/DiffusionBranchTableController.php
··· 47 47 48 48 $panel = id(new PHUIObjectBoxView()) 49 49 ->setHeaderText(pht('Branches')) 50 - ->appendChild($view); 50 + ->setTable($view); 51 51 52 52 $content = $panel; 53 53 }
+1 -1
src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
··· 59 59 60 60 $browse_panel = new PHUIObjectBoxView(); 61 61 $browse_panel->setHeaderText($drequest->getPath(), '/'); 62 - $browse_panel->appendChild($browse_table); 62 + $browse_panel->setTable($browse_table); 63 63 64 64 $content[] = $browse_panel; 65 65 }
+1 -1
src/applications/diffusion/controller/DiffusionBrowseSearchController.php
··· 103 103 104 104 $box = id(new PHUIObjectBoxView()) 105 105 ->setHeaderText($header) 106 - ->appendChild($table); 106 + ->setTable($table); 107 107 108 108 $pager_box = id(new PHUIBoxView()) 109 109 ->addMargin(PHUI::MARGIN_LARGE)
+2 -2
src/applications/diffusion/controller/DiffusionCommitController.php
··· 261 261 $header->addActionLink($button); 262 262 } 263 263 264 - $change_panel->appendChild($change_table); 264 + $change_panel->setTable($change_table); 265 265 $change_panel->setHeader($header); 266 266 267 267 $content[] = $change_panel; ··· 918 918 919 919 $panel = new PHUIObjectBoxView(); 920 920 $panel->setHeaderText(pht('Merged Changes')); 921 - $panel->appendChild($history_table); 921 + $panel->setTable($history_table); 922 922 if ($caption) { 923 923 $panel->setInfoView($caption); 924 924 }
+1 -1
src/applications/diffusion/controller/DiffusionExternalController.php
··· 132 132 $content = new PHUIObjectBoxView(); 133 133 $content->setHeaderText(pht('Multiple Matching Commits')); 134 134 $content->setInfoView($caption); 135 - $content->appendChild($table); 135 + $content->setTable($table); 136 136 } 137 137 138 138 return $this->buildApplicationPage(
+1 -1
src/applications/diffusion/controller/DiffusionHistoryController.php
··· 59 59 60 60 $history_panel = new PHUIObjectBoxView(); 61 61 $history_panel->setHeaderText(pht('History')); 62 - $history_panel->appendChild($history_table); 62 + $history_panel->setTable($history_table); 63 63 64 64 $content[] = $history_panel; 65 65
+1 -1
src/applications/diffusion/controller/DiffusionLintController.php
··· 122 122 123 123 $content[] = id(new PHUIObjectBoxView()) 124 124 ->setHeaderText(pht('Lint')) 125 - ->appendChild($table); 125 + ->setTable($table); 126 126 127 127 $title = array('Lint'); 128 128 $crumbs = $this->buildCrumbs(
+1 -1
src/applications/diffusion/controller/DiffusionLintDetailsController.php
··· 74 74 75 75 $content[] = id(new PHUIObjectBoxView()) 76 76 ->setHeaderText(pht('Lint Details')) 77 - ->appendChild($table); 77 + ->setTable($table); 78 78 79 79 $crumbs = $this->buildCrumbs( 80 80 array(
+2 -2
src/applications/diffusion/controller/DiffusionPushEventViewController.php
··· 43 43 44 44 $commits_box = id(new PHUIObjectBoxView()) 45 45 ->setHeaderText(pht('Pushed Commits')) 46 - ->appendChild($commits_table); 46 + ->setTable($commits_table); 47 47 48 48 $logs = $event->getLogs(); 49 49 ··· 54 54 55 55 $update_box = id(new PHUIObjectBoxView()) 56 56 ->setHeaderText(pht('All Pushed Updates')) 57 - ->appendChild($updates_table); 57 + ->setTable($updates_table); 58 58 59 59 return $this->buildApplicationPage( 60 60 array(
+1 -1
src/applications/diffusion/controller/DiffusionRefTableController.php
··· 127 127 128 128 $content = id(new PHUIObjectBoxView()) 129 129 ->setHeaderText(pht('Ref "%s"', $ref_name)) 130 - ->appendChild($table); 130 + ->setTable($table); 131 131 132 132 $crumbs = $this->buildCrumbs(array()); 133 133 $crumbs->addTextCrumb(pht('Refs'));
+3 -3
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 397 397 398 398 $header->addActionLink($button); 399 399 $panel->setHeader($header); 400 - $panel->appendChild($table); 400 + $panel->setTable($table); 401 401 402 402 return $panel; 403 403 } ··· 572 572 ->setHeader(pht('Recent Commits')) 573 573 ->addActionLink($button); 574 574 $panel->setHeader($header); 575 - $panel->appendChild($history_table); 575 + $panel->setTable($history_table); 576 576 577 577 return $panel; 578 578 } ··· 658 658 $browse_panel->appendChild($form_box); 659 659 } 660 660 661 - $browse_panel->appendChild($browse_table); 661 + $browse_panel->setTable($browse_table); 662 662 663 663 return $browse_panel; 664 664 }
+1 -1
src/applications/diffusion/controller/DiffusionSymbolController.php
··· 132 132 133 133 $panel = new PHUIObjectBoxView(); 134 134 $panel->setHeaderText(pht('Similar Symbols')); 135 - $panel->appendChild($table); 135 + $panel->setTable($table); 136 136 137 137 return $this->buildApplicationPage( 138 138 $panel,
+18
src/view/phui/PHUIObjectBoxView.php
··· 16 16 private $metadata; 17 17 private $actionListID; 18 18 private $objectList; 19 + private $table; 20 + private $collapsed = false; 19 21 20 22 private $tabs = array(); 21 23 private $propertyLists = array(); ··· 148 150 $this->objectList = $list; 149 151 return $this; 150 152 } 153 + 154 + public function setTable($table) { 155 + $this->collapsed = true; 156 + $this->table = $table; 157 + return $this; 158 + } 159 + 160 + public function setCollapsed($collapsed) { 161 + $this->collapsed = $collapsed; 162 + return $this; 163 + } 151 164 152 165 public function setValidationException( 153 166 PhabricatorApplicationTransactionValidationException $ex = null) { ··· 280 293 $tabs, 281 294 $tab_lists, 282 295 $property_lists, 296 + $this->table, 283 297 $this->renderChildren(), 284 298 )) 285 299 ->setBorder(true) ··· 291 305 292 306 if ($this->color) { 293 307 $content->addClass('phui-object-box-'.$this->color); 308 + } 309 + 310 + if ($this->collapsed) { 311 + $content->addClass('phui-object-box-collapsed'); 294 312 } 295 313 296 314 if ($this->tabs) {
+1 -1
webroot/rsrc/css/aphront/table-view.css
··· 208 208 } 209 209 210 210 .aphront-table-view tr.alt-highlighted { 211 - background: #fcf2bb; 211 + background: {$sh-yellowbackground}; 212 212 } 213 213 214 214 .aphront-table-view tr.no-data td {
+8
webroot/rsrc/css/phui/phui-object-box.css
··· 7 7 padding: 12px 12px 4px 12px; 8 8 } 9 9 10 + .phui-object-box.phui-object-box-collapsed { 11 + padding: 12px 0 0 0; 12 + } 13 + 14 + .phui-object-box.phui-object-box-collapsed .phui-header-shell { 15 + padding: 0 4px 4px 16px; 16 + } 17 + 10 18 div.phui-object-box.phui-object-box-flush { 11 19 margin-top: 0; 12 20 }