@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.

Make the Dashboard dropshadow a little lighter and turn panel management into a menu

Summary:
Depends on D20372. Ref T13272.

- There's a very heavy dropshadow on panels right now that looks out of place. Reduce it a bit.
- Panels currently have unlabeled pencil and trash icons. Turn this into a menu. I'm likely planning to add options like "Change Query..." to this menu to make managing some types of panels easier.

Test Plan: {F6332838}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13272

Differential Revision: https://secure.phabricator.com/D20373

+62 -34
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '3c8a0668', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => '3b565a84', 12 + 'core.pkg.css' => '2d4810eb', 13 13 'core.pkg.js' => 'a568e834', 14 14 'differential.pkg.css' => '8d8360fb', 15 15 'differential.pkg.js' => '67e02996', ··· 58 58 'rsrc/css/application/contentsource/content-source-view.css' => 'cdf0d579', 59 59 'rsrc/css/application/countdown/timer.css' => 'bff8012f', 60 60 'rsrc/css/application/daemon/bulk-job.css' => '73af99f5', 61 - 'rsrc/css/application/dashboard/dashboard.css' => '4267d6c6', 61 + 'rsrc/css/application/dashboard/dashboard.css' => '5a205b9d', 62 62 'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d', 63 63 'rsrc/css/application/differential/add-comment.css' => '7e5900d9', 64 64 'rsrc/css/application/differential/changeset-view.css' => 'bde53589', ··· 765 765 'phabricator-countdown-css' => 'bff8012f', 766 766 'phabricator-darklog' => '3b869402', 767 767 'phabricator-darkmessage' => '26cd4b73', 768 - 'phabricator-dashboard-css' => '4267d6c6', 768 + 'phabricator-dashboard-css' => '5a205b9d', 769 769 'phabricator-diff-changeset' => 'd0a85a85', 770 770 'phabricator-diff-changeset-list' => '04023d82', 771 771 'phabricator-diff-inline' => 'a4a14a94',
+1 -2
src/applications/dashboard/controller/PhabricatorDashboardRemovePanelController.php
··· 42 42 return new Aphront404Response(); 43 43 } 44 44 45 - $redirect_uri = $this->getApplicationURI( 46 - 'arrange/'.$dashboard->getID().'/'); 45 + $redirect_uri = $dashboard->getURI(); 47 46 $layout_config = $dashboard->getLayoutConfigObject(); 48 47 49 48 if ($request->isFormPost()) {
+25 -20
src/applications/dashboard/controller/panel/PhabricatorDashboardPanelEditController.php
··· 9 9 $engine = id(new PhabricatorDashboardPanelEditEngine()) 10 10 ->setController($this); 11 11 12 + // We can create or edit a panel in the context of a dashboard. If we 13 + // started on a dashboard, we want to return to that dashboard when we're 14 + // done editing. 15 + $dashboard_id = $request->getStr('dashboardID'); 16 + if (strlen($dashboard_id)) { 17 + $dashboard = id(new PhabricatorDashboardQuery()) 18 + ->setViewer($viewer) 19 + ->withIDs(array($dashboard_id)) 20 + ->requireCapabilities( 21 + array( 22 + PhabricatorPolicyCapability::CAN_VIEW, 23 + PhabricatorPolicyCapability::CAN_EDIT, 24 + )) 25 + ->executeOne(); 26 + if (!$dashboard) { 27 + return new Aphront404Response(); 28 + } 29 + 30 + $engine 31 + ->setDashboard($dashboard) 32 + ->addContextParameter('dashboardID', $dashboard_id); 33 + } else { 34 + $dashboard = null; 35 + } 36 + 12 37 $id = $request->getURIData('id'); 13 38 if (!$id) { 14 - $dashboard_id = $request->getStr('dashboardID'); 15 39 $column_id = $request->getStr('columnID'); 16 40 17 - if (strlen($dashboard_id)) { 18 - $dashboard = id(new PhabricatorDashboardQuery()) 19 - ->setViewer($viewer) 20 - ->withIDs(array($dashboard_id)) 21 - ->requireCapabilities( 22 - array( 23 - PhabricatorPolicyCapability::CAN_VIEW, 24 - PhabricatorPolicyCapability::CAN_EDIT, 25 - )) 26 - ->executeOne(); 27 - if (!$dashboard) { 28 - return new Aphront404Response(); 29 - } 30 - } else { 31 - $dashboard = null; 32 - } 33 - 34 41 if ($dashboard) { 35 42 $cancel_uri = $dashboard->getURI(); 36 43 } else { ··· 45 52 46 53 $engine 47 54 ->addContextParameter('panelType', $panel_type) 48 - ->addContextParameter('dashboardID', $dashboard_id) 49 55 ->addContextParameter('columnID', $column_id) 50 56 ->setPanelType($panel_type) 51 - ->setDashboard($dashboard) 52 57 ->setColumnID($column_id); 53 58 } 54 59
+9
src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
··· 101 101 return parent::getEffectiveObjectEditDoneURI($object); 102 102 } 103 103 104 + protected function getObjectEditCancelURI($object) { 105 + $dashboard = $this->getDashboard(); 106 + if ($dashboard) { 107 + return $dashboard->getURI(); 108 + } 109 + 110 + return parent::getObjectEditCancelURI($object); 111 + } 112 + 104 113 protected function getObjectEditTitleText($object) { 105 114 return pht('Edit Panel: %s', $object->getName()); 106 115 }
+23 -8
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 277 277 278 278 private function addPanelHeaderActions( 279 279 PHUIHeaderView $header) { 280 + 281 + $viewer = $this->getViewer(); 280 282 $panel = $this->getPanel(); 283 + $dashboard_id = $this->getDashboardID(); 281 284 282 - $dashboard_id = $this->getDashboardID(); 285 + $actions = array(); 283 286 284 287 if ($panel) { 285 288 $panel_id = $panel->getID(); ··· 290 293 $edit_uri->replaceQueryParam('dashboardID', $dashboard_id); 291 294 } 292 295 293 - $action_edit = id(new PHUIIconView()) 296 + $actions[] = id(new PhabricatorActionView()) 294 297 ->setIcon('fa-pencil') 295 - ->setWorkflow(true) 298 + ->setName(pht('Edit Panel')) 296 299 ->setHref((string)$edit_uri); 297 - 298 - $header->addActionItem($action_edit); 299 300 } 300 301 301 302 if ($dashboard_id) { ··· 305 306 $remove_uri = id(new PhutilURI($remove_uri)) 306 307 ->replaceQueryParam('panelPHID', $panel_phid); 307 308 308 - $action_remove = id(new PHUIIconView()) 309 - ->setIcon('fa-trash-o') 309 + $actions[] = id(new PhabricatorActionView()) 310 + ->setIcon('fa-times') 310 311 ->setHref((string)$remove_uri) 312 + ->setName(pht('Remove Panel')) 311 313 ->setWorkflow(true); 314 + } 312 315 313 - $header->addActionItem($action_remove); 316 + $dropdown_menu = id(new PhabricatorActionListView()) 317 + ->setViewer($viewer); 318 + 319 + foreach ($actions as $action) { 320 + $dropdown_menu->addAction($action); 314 321 } 322 + 323 + $action_menu = id(new PHUIButtonView()) 324 + ->setTag('a') 325 + ->setIcon('fa-cog') 326 + ->setText(pht('Manage Panel')) 327 + ->setDropdownMenu($dropdown_menu); 328 + 329 + $header->addActionLink($action_menu); 315 330 316 331 return $header; 317 332 }
+1 -1
webroot/rsrc/css/application/dashboard/dashboard.css
··· 54 54 } 55 55 56 56 .grippable .aphront-multi-column-column .dashboard-box.phui-object-box:hover { 57 - box-shadow: {$dropshadow}; 57 + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10); 58 58 } 59 59 60 60 .grippable .aphront-multi-column-column .dashboard-box.phui-object-box:hover