Skip to content

Commit 40391d0

Browse files
author
Chad Little
committedMar 11, 2017
Add a sort order to the favorites menu
Summary: These were once ordered, but I think we switched to being defined in the Engine and never implemented the sorts there. This adds sort ordering to Tasks, Projects, and Repositories. Test Plan: Review Favorites Menu in local install, see order is now set per the engine. Click Edit Favorites, and re-order. See order sticks. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17490
1 parent 2b5bf4b commit 40391d0

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
 

‎src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public function isDefaultQuickCreateEngine() {
2424
return true;
2525
}
2626

27+
public function getQuickCreateOrderVector() {
28+
return id(new PhutilSortVector())->addInt(300);
29+
}
30+
2731
public function getEngineName() {
2832
return pht('Repositories');
2933
}

‎src/applications/maniphest/editor/ManiphestEditEngine.php

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public function isDefaultQuickCreateEngine() {
2525
return true;
2626
}
2727

28+
public function getQuickCreateOrderVector() {
29+
return id(new PhutilSortVector())->addInt(100);
30+
}
31+
2832
protected function newEditableObject() {
2933
return ManiphestTask::initializeNewTask($this->getViewer());
3034
}

‎src/applications/project/engine/PhabricatorProjectEditEngine.php

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public function isDefaultQuickCreateEngine() {
3030
return true;
3131
}
3232

33+
public function getQuickCreateOrderVector() {
34+
return id(new PhutilSortVector())->addInt(200);
35+
}
36+
3337
public function getEngineName() {
3438
return pht('Projects');
3539
}

0 commit comments

Comments
 (0)
Failed to load comments.