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:
@@ -24,6 +24,10 @@ final class DiffusionRepositoryEditEngine
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getQuickCreateOrderVector() {
|
||||
return id(new PhutilSortVector())->addInt(300);
|
||||
}
|
||||
|
||||
public function getEngineName() {
|
||||
return pht('Repositories');
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ final class PhabricatorProjectEditEngine
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getQuickCreateOrderVector() {
|
||||
return id(new PhutilSortVector())->addInt(200);
|
||||
}
|
||||
|
||||
public function getEngineName() {
|
||||
return pht('Projects');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user