1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +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:
Chad Little 2013-01-13 08:17:12 -08:00
parent ab9556345f
commit 38626dce64
19 changed files with 5 additions and 56 deletions

View file

@ -9,12 +9,9 @@ abstract class PhabricatorCalendarController extends PhabricatorController {
$nav->addFilter('', pht('Calendar'), $this->getApplicationURI()); $nav->addFilter('', pht('Calendar'), $this->getApplicationURI());
$nav->addSpacer();
$nav->addLabel(pht('Create Events')); $nav->addLabel(pht('Create Events'));
$nav->addFilter('status/create/', pht('New Status')); $nav->addFilter('status/create/', pht('New Status'));
$nav->addSpacer();
$nav->addLabel(pht('Your Events')); $nav->addLabel(pht('Your Events'));
if ($status && $status->getID()) { if ($status && $status->getID()) {
$nav->addFilter('status/edit/'.$status->getID().'/', pht('Edit Status')); $nav->addFilter('status/edit/'.$status->getID().'/', pht('Edit Status'));

View file

@ -36,7 +36,6 @@ abstract class PhabricatorConduitController extends PhabricatorController {
$nav->addFilter('method/'.$method_name, $nav->addFilter('method/'.$method_name,
$display_name); $display_name);
} }
$nav->addSpacer();
} }
$nav->selectFilter($this->getFilter()); $nav->selectFilter($this->getFilter());
$nav->appendChild($view); $nav->appendChild($view);

View file

@ -12,7 +12,6 @@ abstract class PhabricatorDaemonController extends PhabricatorController {
$nav->addFilter('log', 'All Daemons'); $nav->addFilter('log', 'All Daemons');
$nav->addFilter('log/combined', 'Combined Log'); $nav->addFilter('log/combined', 'Combined Log');
$nav->addSpacer();
$nav->addLabel('Event Timeline'); $nav->addLabel('Event Timeline');
$nav->addFilter('timeline', 'Timeline'); $nav->addFilter('timeline', 'Timeline');

View file

@ -25,7 +25,6 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
$nav->addFilter('home', 'Tactical Command', '/'); $nav->addFilter('home', 'Tactical Command', '/');
$nav->addFilter('jump', 'Jump Nav'); $nav->addFilter('jump', 'Jump Nav');
$nav->addFilter('feed', 'Feed'); $nav->addFilter('feed', 'Feed');
$nav->addSpacer();
$nav->addFilter('applications', 'More Stuff'); $nav->addFilter('applications', 'More Stuff');
return $nav; return $nav;

View file

@ -7,7 +7,6 @@ abstract class DrydockController extends PhabricatorController {
$nav->setBaseURI(new PhutilURI('/drydock/')); $nav->setBaseURI(new PhutilURI('/drydock/'));
$nav->addFilter('resource', 'Resources'); $nav->addFilter('resource', 'Resources');
$nav->addFilter('lease', 'Leases'); $nav->addFilter('lease', 'Leases');
$nav->addSpacer();
$nav->addFilter('log', 'Logs'); $nav->addFilter('log', 'Logs');
$nav->selectFilter($selected, 'resource'); $nav->selectFilter($selected, 'resource');

View file

@ -27,25 +27,20 @@ abstract class HeraldController extends PhabricatorController {
$nav->addFilter("view/{$key}/personal", $value); $nav->addFilter("view/{$key}/personal", $value);
} }
$nav $nav->addLabel('Global Rules');
->addSpacer()
->addLabel('Global Rules');
foreach ($rules_map as $key => $value) { foreach ($rules_map as $key => $value) {
$nav->addFilter("view/{$key}/global", $value); $nav->addFilter("view/{$key}/global", $value);
} }
$nav $nav
->addSpacer()
->addLabel('Utilities') ->addLabel('Utilities')
->addFilter('test', 'Test Console') ->addFilter('test', 'Test Console')
->addFilter('transcript', 'Transcripts') ->addFilter('transcript', 'Transcripts')
->addFilter('history', 'Edit Log'); ->addFilter('history', 'Edit Log');
if ($this->getRequest()->getUser()->getIsAdmin()) { if ($this->getRequest()->getUser()->getIsAdmin()) {
$nav $nav->addLabel('Admin');
->addSpacer()
->addLabel('Admin');
foreach ($rules_map as $key => $value) { foreach ($rules_map as $key => $value) {
$nav->addFilter("view/{$key}/all", $value); $nav->addFilter("view/{$key}/all", $value);
} }

View file

@ -51,7 +51,6 @@ abstract class ManiphestController extends PhabricatorController {
'/maniphest/view/custom/?key='.$query->getQueryKey()); '/maniphest/view/custom/?key='.$query->getQueryKey());
} }
$nav->addFilter('saved', 'Edit...', '/maniphest/custom/'); $nav->addFilter('saved', 'Edit...', '/maniphest/custom/');
$nav->addSpacer();
} }
$nav->addLabel('User Tasks'); $nav->addLabel('User Tasks');
@ -59,18 +58,14 @@ abstract class ManiphestController extends PhabricatorController {
$nav->addFilter('created', 'Created'); $nav->addFilter('created', 'Created');
$nav->addFilter('subscribed', 'Subscribed'); $nav->addFilter('subscribed', 'Subscribed');
$nav->addFilter('triage', 'Need Triage'); $nav->addFilter('triage', 'Need Triage');
$nav->addSpacer();
$nav->addLabel('User Projects'); $nav->addLabel('User Projects');
$nav->addFilter('projecttriage','Need Triage'); $nav->addFilter('projecttriage','Need Triage');
$nav->addFilter('projectall', 'All Tasks'); $nav->addFilter('projectall', 'All Tasks');
$nav->addSpacer();
$nav->addLabel('All Tasks'); $nav->addLabel('All Tasks');
$nav->addFilter('alltriage', 'Need Triage'); $nav->addFilter('alltriage', 'Need Triage');
$nav->addFilter('all', 'All Tasks'); $nav->addFilter('all', 'All Tasks');
$nav->addSpacer();
$nav->addLabel('Custom'); $nav->addLabel('Custom');
$nav->addFilter('custom', 'Custom Query'); $nav->addFilter('custom', 'Custom Query');
$nav->addSpacer();
$nav->addLabel('Reports'); $nav->addLabel('Reports');
$nav->addFilter('report', 'Reports', '/maniphest/report/'); $nav->addFilter('report', 'Reports', '/maniphest/report/');

View file

@ -37,7 +37,6 @@ final class ManiphestReportController extends ManiphestController {
$nav->addLabel('Open Tasks'); $nav->addLabel('Open Tasks');
$nav->addFilter('user', 'By User'); $nav->addFilter('user', 'By User');
$nav->addFilter('project', 'By Project'); $nav->addFilter('project', 'By Project');
$nav->addSpacer();
$nav->addLabel('Burnup'); $nav->addLabel('Burnup');
$nav->addFilter('burn', 'Burnup Rate'); $nav->addFilter('burn', 'Burnup Rate');

View file

@ -14,8 +14,6 @@ abstract class PhabricatorMetaMTAController extends PhabricatorController {
$nav->addFilter('sent', 'Sent Mail', $this->getApplicationURI()); $nav->addFilter('sent', 'Sent Mail', $this->getApplicationURI());
$nav->addFilter('received', 'Received Mail'); $nav->addFilter('received', 'Received Mail');
$nav->addSpacer();
if ($this->getRequest()->getUser()->getIsAdmin()) { if ($this->getRequest()->getUser()->getIsAdmin()) {
$nav->addLabel('Diagnostics'); $nav->addLabel('Diagnostics');
$nav->addFilter('send', 'Send Test'); $nav->addFilter('send', 'Send Test');

View file

@ -15,7 +15,6 @@ extends PhabricatorController {
$nav->addLabel('Client Authorizations'); $nav->addLabel('Client Authorizations');
$nav->addFilter('clientauthorization', $nav->addFilter('clientauthorization',
'My Authorizations'); 'My Authorizations');
$nav->addSpacer();
$nav->addLabel('Clients'); $nav->addLabel('Clients');
$nav->addFilter('client/create', $nav->addFilter('client/create',
'Create Client'); 'Create Client');

View file

@ -14,14 +14,12 @@ abstract class PhabricatorPeopleController extends PhabricatorController {
if (PhabricatorEnv::getEnvConfig('ldap.auth-enabled') === true) { if (PhabricatorEnv::getEnvConfig('ldap.auth-enabled') === true) {
$nav->addFilter('ldap', 'Import from LDAP'); $nav->addFilter('ldap', 'Import from LDAP');
} }
$nav->addSpacer();
} }
$nav->addLabel('Directory'); $nav->addLabel('Directory');
$nav->addFilter('people', 'User Directory', $this->getApplicationURI()); $nav->addFilter('people', 'User Directory', $this->getApplicationURI());
if ($is_admin) { if ($is_admin) {
$nav->addSpacer();
$nav->addLabel('Logs'); $nav->addLabel('Logs');
$nav->addFilter('logs', 'Activity Logs'); $nav->addFilter('logs', 'Activity Logs');
} }

View file

@ -38,7 +38,6 @@ final class PhabricatorPeopleEditController
$nav->addFilter('role', 'Edit Roles'); $nav->addFilter('role', 'Edit Roles');
$nav->addFilter('cert', 'Conduit Certificate'); $nav->addFilter('cert', 'Conduit Certificate');
$nav->addFilter('profile', 'View Profile', '/p/'.$user->getUsername().'/'); $nav->addFilter('profile', 'View Profile', '/p/'.$user->getUsername().'/');
$nav->addSpacer();
$nav->addLabel('Special'); $nav->addLabel('Special');
$nav->addFilter('rename', 'Change Username'); $nav->addFilter('rename', 'Change Username');
$nav->addFilter('delete', 'Delete User'); $nav->addFilter('delete', 'Delete User');

View file

@ -43,8 +43,6 @@ final class PhabricatorPeopleProfileController
$nav->setBaseURI(new PhutilURI('/p/'.$username.'/')); $nav->setBaseURI(new PhutilURI('/p/'.$username.'/'));
$nav->addFilter('feed', 'Feed'); $nav->addFilter('feed', 'Feed');
$nav->addFilter('about', 'About'); $nav->addFilter('about', 'About');
$nav->addSpacer();
$nav->addLabel('Activity'); $nav->addLabel('Activity');
$external_arrow = "\xE2\x86\x97"; $external_arrow = "\xE2\x86\x97";
@ -74,7 +72,7 @@ final class PhabricatorPeopleProfileController
$oauths = mpull($oauths, null, 'getOAuthProvider'); $oauths = mpull($oauths, null, 'getOAuthProvider');
$providers = PhabricatorOAuthProvider::getAllProviders(); $providers = PhabricatorOAuthProvider::getAllProviders();
$added_spacer = false; $added_label = false;
foreach ($providers as $provider) { foreach ($providers as $provider) {
if (!$provider->isProviderEnabled()) { if (!$provider->isProviderEnabled()) {
continue; continue;
@ -90,10 +88,9 @@ final class PhabricatorPeopleProfileController
$href = $oauths[$provider_key]->getAccountURI(); $href = $oauths[$provider_key]->getAccountURI();
if ($href) { if ($href) {
if (!$added_spacer) { if (!$added_label) {
$nav->addSpacer();
$nav->addLabel('Linked Accounts'); $nav->addLabel('Linked Accounts');
$added_spacer = true; $added_label = true;
} }
$nav->addFilter(null, $name.' '.$external_arrow, $href); $nav->addFilter(null, $name.' '.$external_arrow, $href);
} }
@ -136,12 +133,10 @@ final class PhabricatorPeopleProfileController
$header->appendChild($content); $header->appendChild($content);
if ($user->getPHID() == $viewer->getPHID()) { if ($user->getPHID() == $viewer->getPHID()) {
$nav->addSpacer();
$nav->addFilter(null, 'Edit Profile...', '/settings/panel/profile/'); $nav->addFilter(null, 'Edit Profile...', '/settings/panel/profile/');
} }
if ($viewer->getIsAdmin()) { if ($viewer->getIsAdmin()) {
$nav->addSpacer();
$nav->addFilter( $nav->addFilter(
null, null,
'Administrate User...', 'Administrate User...',

View file

@ -16,15 +16,11 @@ abstract class PhameController extends PhabricatorController {
$nav->addFilter('post/new', 'New Post'); $nav->addFilter('post/new', 'New Post');
$nav->addFilter('blog/new', 'New Blog'); $nav->addFilter('blog/new', 'New Blog');
$nav->addSpacer();
$nav->addLabel('Posts'); $nav->addLabel('Posts');
$nav->addFilter('post/draft', 'My Drafts'); $nav->addFilter('post/draft', 'My Drafts');
$nav->addFilter('post', 'My Posts'); $nav->addFilter('post', 'My Posts');
$nav->addFilter('post/all', 'All Posts'); $nav->addFilter('post/all', 'All Posts');
$nav->addSpacer();
$nav->addLabel('Blogs'); $nav->addLabel('Blogs');
$nav->addFilter('blog/user', 'Joinable Blogs'); $nav->addFilter('blog/user', 'Joinable Blogs');
$nav->addFilter('blog/all', 'All Blogs'); $nav->addFilter('blog/all', 'All Blogs');

View file

@ -25,19 +25,14 @@ abstract class PonderController extends PhabricatorController {
null, null,
'Q'.$question->getID(), 'Q'.$question->getID(),
'Q'.$question->getID()); 'Q'.$question->getID());
$side_nav->addSpacer();
} }
$side_nav->addLabel('Create'); $side_nav->addLabel('Create');
$side_nav->addFilter('question/ask', 'Ask a Question'); $side_nav->addFilter('question/ask', 'Ask a Question');
$side_nav->addSpacer();
$side_nav->addLabel('Questions'); $side_nav->addLabel('Questions');
$side_nav->addFilter('feed', 'All Questions'); $side_nav->addFilter('feed', 'All Questions');
$side_nav->addSpacer();
$side_nav->addLabel('User'); $side_nav->addLabel('User');
$side_nav->addFilter('questions', 'Your Questions'); $side_nav->addFilter('questions', 'Your Questions');
$side_nav->addFilter('answers', 'Your Answers'); $side_nav->addFilter('answers', 'Your Answers');

View file

@ -31,7 +31,6 @@ abstract class PhabricatorProjectController extends PhabricatorController {
$members_uri = '/project/members/'.$id.'/'; $members_uri = '/project/members/'.$id.'/';
$nav_view->addFilter('dashboard', 'Dashboard'); $nav_view->addFilter('dashboard', 'Dashboard');
$nav_view->addSpacer();
$nav_view->addFilter('feed', 'Feed'); $nav_view->addFilter('feed', 'Feed');
$nav_view->addFilter(null, 'Tasks '.$external_arrow, $tasks_uri); $nav_view->addFilter(null, 'Tasks '.$external_arrow, $tasks_uri);
$nav_view->addFilter(null, 'Wiki '.$external_arrow, $phriction_uri); $nav_view->addFilter(null, 'Wiki '.$external_arrow, $phriction_uri);
@ -41,7 +40,6 @@ abstract class PhabricatorProjectController extends PhabricatorController {
$user = $this->getRequest()->getUser(); $user = $this->getRequest()->getUser();
$can_edit = PhabricatorPolicyCapability::CAN_EDIT; $can_edit = PhabricatorPolicyCapability::CAN_EDIT;
$nav_view->addSpacer();
if (PhabricatorPolicyFilter::hasCapability($user, $project, $can_edit)) { if (PhabricatorPolicyFilter::hasCapability($user, $project, $can_edit)) {
$nav_view->addFilter('edit', "Edit Project\xE2\x80\xA6", $edit_uri); $nav_view->addFilter('edit', "Edit Project\xE2\x80\xA6", $edit_uri);
$nav_view->addFilter('members', "Edit Members\xE2\x80\xA6", $members_uri); $nav_view->addFilter('members', "Edit Members\xE2\x80\xA6", $members_uri);

View file

@ -17,7 +17,6 @@ final class PhabricatorProjectListController
->setBaseURI(new PhutilURI('/project/filter/')) ->setBaseURI(new PhutilURI('/project/filter/'))
->addLabel('User') ->addLabel('User')
->addFilter('active', 'Active') ->addFilter('active', 'Active')
->addSpacer()
->addLabel('All') ->addLabel('All')
->addFilter('all', 'All Projects') ->addFilter('all', 'All Projects')
->addFilter('allactive','Active Projects'); ->addFilter('allactive','Active Projects');

View file

@ -73,9 +73,6 @@ final class PhabricatorSettingsMainController
$group = null; $group = null;
foreach ($panels as $panel) { foreach ($panels as $panel) {
if ($panel->getPanelGroup() != $group) { if ($panel->getPanelGroup() != $group) {
if ($group !== null) {
$nav->addSpacer();
}
$group = $panel->getPanelGroup(); $group = $panel->getPanelGroup();
$nav->addLabel($group); $nav->addLabel($group);
} }

View file

@ -9,7 +9,6 @@
* ->addLabel('Cats') * ->addLabel('Cats')
* ->addFilter('meow', 'Meow') * ->addFilter('meow', 'Meow')
* ->addFilter('purr', 'Purr') * ->addFilter('purr', 'Purr')
* ->addSpacer()
* ->addLabel('Dogs') * ->addLabel('Dogs')
* ->addFilter('woof', 'Woof') * ->addFilter('woof', 'Woof')
* ->addFilter('bark', 'Bark'); * ->addFilter('bark', 'Bark');
@ -106,12 +105,6 @@ final class AphrontSideNavFilterView extends AphrontView {
->setName($name)); ->setName($name));
} }
public function addSpacer() {
return $this->addMenuItem(
id(new PhabricatorMenuItemView())
->setType(PhabricatorMenuItemView::TYPE_SPACER));
}
public function setBaseURI(PhutilURI $uri) { public function setBaseURI(PhutilURI $uri) {
$this->baseURI = $uri; $this->baseURI = $uri;
return $this; return $this;