@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 dashboard arrange actions (move, add, remove) work again after read locking from "chaos reduction"

Summary:
See PHI385. Ref T13054. Ref T13083. The dashboard "arrange" operations (add, remove, move) rely on doing `$dashboard->setThing(...)` and then applying transactions.

This no longer works after the read locking change from T13054. To make this function again, just add an explicit `save()` after layout adjustment. This should be more nuanced eventually, but all arrange operations are nonfunctional in a corrupting way at HEAD of `master`/`stable`, so stop the bleeding first.

Test Plan:
- Created new empty and template dashboards.
- Moved panels.
- Added new and existing panels.
- Removed panels.

Maniphest Tasks: T13083, T13054

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

+11 -1
+8
src/applications/dashboard/storage/PhabricatorDashboard.php
··· 74 74 75 75 public function setLayoutConfigFromObject( 76 76 PhabricatorDashboardLayoutConfig $object) { 77 + 77 78 $this->setLayoutConfig($object->toDictionary()); 79 + 80 + // See PHI385. Dashboard panel mutations rely on changes to the Dashboard 81 + // object persisting when transactions are applied, but this assumption is 82 + // no longer valid after T13054. For now, just save the dashboard 83 + // explicitly. 84 + $this->save(); 85 + 78 86 return $this; 79 87 } 80 88
+3 -1
src/applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php
··· 34 34 $impl = $panel->getImplementation(); 35 35 if ($impl) { 36 36 $type_text = $impl->getPanelTypeName(); 37 + $icon = $impl->getIcon(); 37 38 } else { 38 39 $type_text = nonempty($panel->getPanelType(), pht('Unknown Type')); 40 + $icon = 'fa-question'; 39 41 } 40 42 $id = $panel->getID(); 41 43 $monogram = $panel->getMonogram(); ··· 44 46 $result = id(new PhabricatorTypeaheadResult()) 45 47 ->setName($monogram.' '.$panel->getName()) 46 48 ->setPHID($id) 47 - ->setIcon($impl->getIcon()) 49 + ->setIcon($icon) 48 50 ->addAttribute($type_text); 49 51 50 52 if (!empty($properties['class'])) {