1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-14 16:51:08 +01:00

Make border conditional in crumbs

Summary: Add a setBorder call to CrumbsView to be more deliberate when a border is drawn. Could not find any CSS hacks to set it conditionally CSS.

Test Plan: Browsed every application that called crumbs and make a design decision. Also fixed a few bad layouts.

Reviewers: btrahan, epriestley

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11533
This commit is contained in:
Chad Little 2015-01-28 09:33:49 -08:00
parent 99722e08fa
commit 170dc15c05
16 changed files with 49 additions and 31 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '63e9e0b7',
'core.pkg.css' => '8815f87d',
'core.pkg.js' => 'efa12ecc',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
@ -125,7 +125,7 @@ return array(
'rsrc/css/phui/phui-action-list.css' => '9ee9910a',
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
'rsrc/css/phui/phui-button.css' => '008ba5e2',
'rsrc/css/phui/phui-crumbs-view.css' => '3e362700',
'rsrc/css/phui/phui-crumbs-view.css' => '646a8830',
'rsrc/css/phui/phui-document.css' => 'bbeb1890',
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
'rsrc/css/phui/phui-fontkit.css' => '9c3d2dce',
@ -770,7 +770,7 @@ return array(
'phui-calendar-day-css' => 'de035c8a',
'phui-calendar-list-css' => 'c1d0ca59',
'phui-calendar-month-css' => 'a92e47d2',
'phui-crumbs-view-css' => '3e362700',
'phui-crumbs-view-css' => '646a8830',
'phui-document-view-css' => 'bbeb1890',
'phui-feed-story-css' => 'c9f3a0b5',
'phui-font-icon-base-css' => '3dad2ae3',

View file

@ -90,6 +90,7 @@ final class PhabricatorAuthListController
pht('Add Authentication Provider'))));
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb(pht('Auth Providers'));
$config_name = 'auth.email-domains';

View file

@ -33,6 +33,7 @@ final class PhabricatorConfigHistoryController
$title = pht('Settings History');
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb('Config', $this->getApplicationURI());
$crumbs->addTextCrumb($title, '/config/history/');

View file

@ -32,6 +32,7 @@ abstract class ConpherenceController extends PhabricatorController {
protected function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs
->addAction(

View file

@ -442,15 +442,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
->setRequestURI($request->getRequestURI()));
}
$object_id = 'D'.$revision->getID();
$top_anchor = id(new PhabricatorAnchorView())
->setAnchorName('top')
->setNavigationMarker(true);
$content = array(
$top_anchor,
$revision_detail_box,
$page_pane,
);
@ -467,7 +461,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
false);
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
->setAnchorName('top')
->setTitle('D'.$revision->getID())
->setBaseURI(new PhutilURI('/D'.$revision->getID()))
->setCollapsed((bool)$collapsed)

View file

@ -69,11 +69,6 @@ final class DiffusionCommitController extends DiffusionController {
));
}
$top_anchor = id(new PhabricatorAnchorView())
->setAnchorName('top')
->setNavigationMarker(true);
$audit_requests = $commit->getAudits();
$this->auditAuthorityPHIDs =
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($user);
@ -93,7 +88,6 @@ final class DiffusionCommitController extends DiffusionController {
"didn't affect the tracked subdirectory ('%s'), so no ".
"information is available.", $subpath));
$content[] = $error_panel;
$content[] = $top_anchor;
} else {
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
$engine->setConfig('viewer', $user);
@ -151,7 +145,6 @@ final class DiffusionCommitController extends DiffusionController {
'class' => 'diffusion-commit-message phabricator-remarkup',
),
$message));
$content[] = $top_anchor;
$object_box = id(new PHUIObjectBoxView())
->setHeader($headsup_view)
@ -381,7 +374,6 @@ final class DiffusionCommitController extends DiffusionController {
if ($changesets && $show_filetree) {
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
->setAnchorName('top')
->setTitle($short_name)
->setBaseURI(new PhutilURI('/'.$commit_id))
->build($changesets)

View file

@ -30,10 +30,9 @@ final class HeraldRuleEditHistoryController extends HeraldController {
->setHandles($handles)
->setUser($this->getRequest()->getUser());
$panel = new AphrontPanelView();
$panel->setHeader(pht('Edit History'));
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Edit History'));
$panel->appendChild($list_view);
$panel->setNoBackground();
$crumbs = $this
->buildApplicationCrumbs($can_create = false)

View file

@ -276,6 +276,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
}
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb($document->getMonogram());
return $this->buildApplicationPage(

View file

@ -32,11 +32,9 @@ final class PhabricatorPeopleLdapController
id(new AphrontFormSubmitControl())
->setValue(pht('Search')));
$panel = id(new AphrontPanelView())
->setHeader(pht('Import LDAP Users'))
->setNoBackground()
->setWidth(AphrontPanelView::WIDTH_FORM)
->appendChild($form);
$panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Import LDAP Users'))
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(

View file

@ -75,6 +75,7 @@ final class PhamePostListController extends PhameController {
->appendChild($post_list);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb($title, $this->getApplicationURI());
$nav->appendChild(

View file

@ -185,6 +185,7 @@ final class PhrictionDocumentController
$actions = $this->buildActionView($user, $document);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumb_views = $this->renderBreadcrumbs($slug);
foreach ($crumb_views as $view) {
$crumbs->addCrumb($view);

View file

@ -261,6 +261,7 @@ final class PhabricatorApplicationSearchController
$crumbs = $parent
->buildApplicationCrumbs()
->setBorder(true)
->addTextCrumb($title);
$nav->setCrumbs($crumbs);

View file

@ -39,6 +39,7 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
}
$list = new PHUIObjectItemListView();
$list->setStackable(true);
foreach ($tokens_given as $token_given) {
$handle = $handles[$token_given->getObjectPHID()];
$token = idx($tokens, $token_given->getTokenPHID());
@ -57,17 +58,20 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
$list->addItem($item);
}
$list->setPager($pager);
$title = pht('Tokens Given');
$box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->appendChild($list);
$nav = $this->buildSideNav();
$nav->setCrumbs(
$this->buildApplicationCrumbs()
->addTextCrumb($title));
$nav->selectFilter('given/');
$nav->appendChild($list);
$nav->appendChild($box);
$nav->appendChild($pager);
return $this->buildApplicationPage(
$nav,

View file

@ -30,6 +30,7 @@ final class PhabricatorTokenLeaderController
}
$list = new PHUIObjectItemListView();
$list->setStackable(true);
foreach ($phids as $object) {
$count = idx($counts, $object, 0);
$item = id(new PHUIObjectItemView());
@ -43,13 +44,17 @@ final class PhabricatorTokenLeaderController
$title = pht('Token Leader Board');
$box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->appendChild($list);
$nav = $this->buildSideNav();
$nav->setCrumbs(
$this->buildApplicationCrumbs()
->addTextCrumb($title));
$nav->selectFilter('leaders/');
$nav->appendChild($list);
$nav->appendChild($box);
$nav->appendChild($pager);
return $this->buildApplicationPage(

View file

@ -4,6 +4,7 @@ final class PHUICrumbsView extends AphrontView {
private $crumbs = array();
private $actions = array();
private $border;
protected function canAppendChild() {
return false;
@ -35,6 +36,11 @@ final class PHUICrumbsView extends AphrontView {
return $this;
}
public function setBorder($border) {
$this->border = $border;
return $this;
}
public function render() {
require_celerity_resource('phui-crumbs-view-css');
@ -99,6 +105,9 @@ final class PHUICrumbsView extends AphrontView {
$classes = array();
$classes[] = 'phui-crumbs-view';
if ($this->border) {
$classes[] = 'phui-crumbs-border';
}
return phutil_tag(
'div',

View file

@ -10,7 +10,6 @@
Remove this once that gets sorted out. */
position: relative;
-webkit-font-smoothing: antialiased;
border-bottom: 1px solid rgba(205, 207, 211, 1);
}
.phui-crumbs-view,
@ -99,3 +98,15 @@ a.phui-crumbs-action .phui-icon-view {
.phui-crumb-divider {
margin: 2px 8px;
}
.phui-crumbs-view.phui-crumbs-border {
border-bottom: 1px solid rgba(205, 207, 211, 1);
}
.phui-crumbs-view + .phui-object-box {
margin-top: 0;
}
body .phui-crumbs-view + .phui-object-item-list-view {
padding-top: 0;
}