mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Remove spacer from sidebars.
Summary: This removes all calls to addSpacer and the method. We were applying it inconsistently and it was causing spacing issues with redesigning the sidenav. My feeling is we can recreate the space in CSS if the design dictates, which would apply it consistently. Test Plan: Go to Applications, click on every application. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4420
This commit is contained in:
parent
ab9556345f
commit
38626dce64
19 changed files with 5 additions and 56 deletions
|
@ -9,12 +9,9 @@ abstract class PhabricatorCalendarController extends PhabricatorController {
|
|||
|
||||
$nav->addFilter('', pht('Calendar'), $this->getApplicationURI());
|
||||
|
||||
$nav->addSpacer();
|
||||
|
||||
$nav->addLabel(pht('Create Events'));
|
||||
$nav->addFilter('status/create/', pht('New Status'));
|
||||
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel(pht('Your Events'));
|
||||
if ($status && $status->getID()) {
|
||||
$nav->addFilter('status/edit/'.$status->getID().'/', pht('Edit Status'));
|
||||
|
|
|
@ -36,7 +36,6 @@ abstract class PhabricatorConduitController extends PhabricatorController {
|
|||
$nav->addFilter('method/'.$method_name,
|
||||
$display_name);
|
||||
}
|
||||
$nav->addSpacer();
|
||||
}
|
||||
$nav->selectFilter($this->getFilter());
|
||||
$nav->appendChild($view);
|
||||
|
|
|
@ -12,7 +12,6 @@ abstract class PhabricatorDaemonController extends PhabricatorController {
|
|||
$nav->addFilter('log', 'All Daemons');
|
||||
$nav->addFilter('log/combined', 'Combined Log');
|
||||
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Event Timeline');
|
||||
$nav->addFilter('timeline', 'Timeline');
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
$nav->addFilter('home', 'Tactical Command', '/');
|
||||
$nav->addFilter('jump', 'Jump Nav');
|
||||
$nav->addFilter('feed', 'Feed');
|
||||
$nav->addSpacer();
|
||||
$nav->addFilter('applications', 'More Stuff');
|
||||
|
||||
return $nav;
|
||||
|
|
|
@ -7,7 +7,6 @@ abstract class DrydockController extends PhabricatorController {
|
|||
$nav->setBaseURI(new PhutilURI('/drydock/'));
|
||||
$nav->addFilter('resource', 'Resources');
|
||||
$nav->addFilter('lease', 'Leases');
|
||||
$nav->addSpacer();
|
||||
$nav->addFilter('log', 'Logs');
|
||||
|
||||
$nav->selectFilter($selected, 'resource');
|
||||
|
|
|
@ -27,25 +27,20 @@ abstract class HeraldController extends PhabricatorController {
|
|||
$nav->addFilter("view/{$key}/personal", $value);
|
||||
}
|
||||
|
||||
$nav
|
||||
->addSpacer()
|
||||
->addLabel('Global Rules');
|
||||
$nav->addLabel('Global Rules');
|
||||
|
||||
foreach ($rules_map as $key => $value) {
|
||||
$nav->addFilter("view/{$key}/global", $value);
|
||||
}
|
||||
|
||||
$nav
|
||||
->addSpacer()
|
||||
->addLabel('Utilities')
|
||||
->addFilter('test', 'Test Console')
|
||||
->addFilter('transcript', 'Transcripts')
|
||||
->addFilter('history', 'Edit Log');
|
||||
|
||||
if ($this->getRequest()->getUser()->getIsAdmin()) {
|
||||
$nav
|
||||
->addSpacer()
|
||||
->addLabel('Admin');
|
||||
$nav->addLabel('Admin');
|
||||
foreach ($rules_map as $key => $value) {
|
||||
$nav->addFilter("view/{$key}/all", $value);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ abstract class ManiphestController extends PhabricatorController {
|
|||
'/maniphest/view/custom/?key='.$query->getQueryKey());
|
||||
}
|
||||
$nav->addFilter('saved', 'Edit...', '/maniphest/custom/');
|
||||
$nav->addSpacer();
|
||||
}
|
||||
|
||||
$nav->addLabel('User Tasks');
|
||||
|
@ -59,18 +58,14 @@ abstract class ManiphestController extends PhabricatorController {
|
|||
$nav->addFilter('created', 'Created');
|
||||
$nav->addFilter('subscribed', 'Subscribed');
|
||||
$nav->addFilter('triage', 'Need Triage');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('User Projects');
|
||||
$nav->addFilter('projecttriage','Need Triage');
|
||||
$nav->addFilter('projectall', 'All Tasks');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('All Tasks');
|
||||
$nav->addFilter('alltriage', 'Need Triage');
|
||||
$nav->addFilter('all', 'All Tasks');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Custom');
|
||||
$nav->addFilter('custom', 'Custom Query');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Reports');
|
||||
$nav->addFilter('report', 'Reports', '/maniphest/report/');
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ final class ManiphestReportController extends ManiphestController {
|
|||
$nav->addLabel('Open Tasks');
|
||||
$nav->addFilter('user', 'By User');
|
||||
$nav->addFilter('project', 'By Project');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Burnup');
|
||||
$nav->addFilter('burn', 'Burnup Rate');
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ abstract class PhabricatorMetaMTAController extends PhabricatorController {
|
|||
$nav->addFilter('sent', 'Sent Mail', $this->getApplicationURI());
|
||||
$nav->addFilter('received', 'Received Mail');
|
||||
|
||||
$nav->addSpacer();
|
||||
|
||||
if ($this->getRequest()->getUser()->getIsAdmin()) {
|
||||
$nav->addLabel('Diagnostics');
|
||||
$nav->addFilter('send', 'Send Test');
|
||||
|
|
|
@ -15,7 +15,6 @@ extends PhabricatorController {
|
|||
$nav->addLabel('Client Authorizations');
|
||||
$nav->addFilter('clientauthorization',
|
||||
'My Authorizations');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Clients');
|
||||
$nav->addFilter('client/create',
|
||||
'Create Client');
|
||||
|
|
|
@ -14,14 +14,12 @@ abstract class PhabricatorPeopleController extends PhabricatorController {
|
|||
if (PhabricatorEnv::getEnvConfig('ldap.auth-enabled') === true) {
|
||||
$nav->addFilter('ldap', 'Import from LDAP');
|
||||
}
|
||||
$nav->addSpacer();
|
||||
}
|
||||
|
||||
$nav->addLabel('Directory');
|
||||
$nav->addFilter('people', 'User Directory', $this->getApplicationURI());
|
||||
|
||||
if ($is_admin) {
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Logs');
|
||||
$nav->addFilter('logs', 'Activity Logs');
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ final class PhabricatorPeopleEditController
|
|||
$nav->addFilter('role', 'Edit Roles');
|
||||
$nav->addFilter('cert', 'Conduit Certificate');
|
||||
$nav->addFilter('profile', 'View Profile', '/p/'.$user->getUsername().'/');
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Special');
|
||||
$nav->addFilter('rename', 'Change Username');
|
||||
$nav->addFilter('delete', 'Delete User');
|
||||
|
|
|
@ -43,8 +43,6 @@ final class PhabricatorPeopleProfileController
|
|||
$nav->setBaseURI(new PhutilURI('/p/'.$username.'/'));
|
||||
$nav->addFilter('feed', 'Feed');
|
||||
$nav->addFilter('about', 'About');
|
||||
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Activity');
|
||||
|
||||
$external_arrow = "\xE2\x86\x97";
|
||||
|
@ -74,7 +72,7 @@ final class PhabricatorPeopleProfileController
|
|||
$oauths = mpull($oauths, null, 'getOAuthProvider');
|
||||
|
||||
$providers = PhabricatorOAuthProvider::getAllProviders();
|
||||
$added_spacer = false;
|
||||
$added_label = false;
|
||||
foreach ($providers as $provider) {
|
||||
if (!$provider->isProviderEnabled()) {
|
||||
continue;
|
||||
|
@ -90,10 +88,9 @@ final class PhabricatorPeopleProfileController
|
|||
$href = $oauths[$provider_key]->getAccountURI();
|
||||
|
||||
if ($href) {
|
||||
if (!$added_spacer) {
|
||||
$nav->addSpacer();
|
||||
if (!$added_label) {
|
||||
$nav->addLabel('Linked Accounts');
|
||||
$added_spacer = true;
|
||||
$added_label = true;
|
||||
}
|
||||
$nav->addFilter(null, $name.' '.$external_arrow, $href);
|
||||
}
|
||||
|
@ -136,12 +133,10 @@ final class PhabricatorPeopleProfileController
|
|||
$header->appendChild($content);
|
||||
|
||||
if ($user->getPHID() == $viewer->getPHID()) {
|
||||
$nav->addSpacer();
|
||||
$nav->addFilter(null, 'Edit Profile...', '/settings/panel/profile/');
|
||||
}
|
||||
|
||||
if ($viewer->getIsAdmin()) {
|
||||
$nav->addSpacer();
|
||||
$nav->addFilter(
|
||||
null,
|
||||
'Administrate User...',
|
||||
|
|
|
@ -16,15 +16,11 @@ abstract class PhameController extends PhabricatorController {
|
|||
$nav->addFilter('post/new', 'New Post');
|
||||
$nav->addFilter('blog/new', 'New Blog');
|
||||
|
||||
$nav->addSpacer();
|
||||
|
||||
$nav->addLabel('Posts');
|
||||
$nav->addFilter('post/draft', 'My Drafts');
|
||||
$nav->addFilter('post', 'My Posts');
|
||||
$nav->addFilter('post/all', 'All Posts');
|
||||
|
||||
$nav->addSpacer();
|
||||
|
||||
$nav->addLabel('Blogs');
|
||||
$nav->addFilter('blog/user', 'Joinable Blogs');
|
||||
$nav->addFilter('blog/all', 'All Blogs');
|
||||
|
|
|
@ -25,19 +25,14 @@ abstract class PonderController extends PhabricatorController {
|
|||
null,
|
||||
'Q'.$question->getID(),
|
||||
'Q'.$question->getID());
|
||||
$side_nav->addSpacer();
|
||||
}
|
||||
|
||||
$side_nav->addLabel('Create');
|
||||
$side_nav->addFilter('question/ask', 'Ask a Question');
|
||||
|
||||
$side_nav->addSpacer();
|
||||
|
||||
$side_nav->addLabel('Questions');
|
||||
$side_nav->addFilter('feed', 'All Questions');
|
||||
|
||||
$side_nav->addSpacer();
|
||||
|
||||
$side_nav->addLabel('User');
|
||||
$side_nav->addFilter('questions', 'Your Questions');
|
||||
$side_nav->addFilter('answers', 'Your Answers');
|
||||
|
|
|
@ -31,7 +31,6 @@ abstract class PhabricatorProjectController extends PhabricatorController {
|
|||
$members_uri = '/project/members/'.$id.'/';
|
||||
|
||||
$nav_view->addFilter('dashboard', 'Dashboard');
|
||||
$nav_view->addSpacer();
|
||||
$nav_view->addFilter('feed', 'Feed');
|
||||
$nav_view->addFilter(null, 'Tasks '.$external_arrow, $tasks_uri);
|
||||
$nav_view->addFilter(null, 'Wiki '.$external_arrow, $phriction_uri);
|
||||
|
@ -41,7 +40,6 @@ abstract class PhabricatorProjectController extends PhabricatorController {
|
|||
$user = $this->getRequest()->getUser();
|
||||
$can_edit = PhabricatorPolicyCapability::CAN_EDIT;
|
||||
|
||||
$nav_view->addSpacer();
|
||||
if (PhabricatorPolicyFilter::hasCapability($user, $project, $can_edit)) {
|
||||
$nav_view->addFilter('edit', "Edit Project\xE2\x80\xA6", $edit_uri);
|
||||
$nav_view->addFilter('members', "Edit Members\xE2\x80\xA6", $members_uri);
|
||||
|
|
|
@ -17,7 +17,6 @@ final class PhabricatorProjectListController
|
|||
->setBaseURI(new PhutilURI('/project/filter/'))
|
||||
->addLabel('User')
|
||||
->addFilter('active', 'Active')
|
||||
->addSpacer()
|
||||
->addLabel('All')
|
||||
->addFilter('all', 'All Projects')
|
||||
->addFilter('allactive','Active Projects');
|
||||
|
|
|
@ -73,9 +73,6 @@ final class PhabricatorSettingsMainController
|
|||
$group = null;
|
||||
foreach ($panels as $panel) {
|
||||
if ($panel->getPanelGroup() != $group) {
|
||||
if ($group !== null) {
|
||||
$nav->addSpacer();
|
||||
}
|
||||
$group = $panel->getPanelGroup();
|
||||
$nav->addLabel($group);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
* ->addLabel('Cats')
|
||||
* ->addFilter('meow', 'Meow')
|
||||
* ->addFilter('purr', 'Purr')
|
||||
* ->addSpacer()
|
||||
* ->addLabel('Dogs')
|
||||
* ->addFilter('woof', 'Woof')
|
||||
* ->addFilter('bark', 'Bark');
|
||||
|
@ -106,12 +105,6 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
->setName($name));
|
||||
}
|
||||
|
||||
public function addSpacer() {
|
||||
return $this->addMenuItem(
|
||||
id(new PhabricatorMenuItemView())
|
||||
->setType(PhabricatorMenuItemView::TYPE_SPACER));
|
||||
}
|
||||
|
||||
public function setBaseURI(PhutilURI $uri) {
|
||||
$this->baseURI = $uri;
|
||||
return $this;
|
||||
|
|
Loading…
Reference in a new issue