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
This commit is contained in:
Chad Little
2017-03-10 19:37:44 -08:00
parent 2b5bf4b911
commit 40391d089e
3 changed files with 12 additions and 0 deletions

View File

@@ -24,6 +24,10 @@ final class DiffusionRepositoryEditEngine
return true;
}
public function getQuickCreateOrderVector() {
return id(new PhutilSortVector())->addInt(300);
}
public function getEngineName() {
return pht('Repositories');
}

View File

@@ -25,6 +25,10 @@ final class ManiphestEditEngine
return true;
}
public function getQuickCreateOrderVector() {
return id(new PhutilSortVector())->addInt(100);
}
protected function newEditableObject() {
return ManiphestTask::initializeNewTask($this->getViewer());
}

View File

@@ -30,6 +30,10 @@ final class PhabricatorProjectEditEngine
return true;
}
public function getQuickCreateOrderVector() {
return id(new PhutilSortVector())->addInt(200);
}
public function getEngineName() {
return pht('Projects');
}