mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-15 01:01:09 +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:
parent
99722e08fa
commit
170dc15c05
16 changed files with 49 additions and 31 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '63e9e0b7',
|
'core.pkg.css' => '8815f87d',
|
||||||
'core.pkg.js' => 'efa12ecc',
|
'core.pkg.js' => 'efa12ecc',
|
||||||
'darkconsole.pkg.js' => '8ab24e01',
|
'darkconsole.pkg.js' => '8ab24e01',
|
||||||
'differential.pkg.css' => '8af45893',
|
'differential.pkg.css' => '8af45893',
|
||||||
|
@ -125,7 +125,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-action-list.css' => '9ee9910a',
|
'rsrc/css/phui/phui-action-list.css' => '9ee9910a',
|
||||||
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
|
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
|
||||||
'rsrc/css/phui/phui-button.css' => '008ba5e2',
|
'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-document.css' => 'bbeb1890',
|
||||||
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
|
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
|
||||||
'rsrc/css/phui/phui-fontkit.css' => '9c3d2dce',
|
'rsrc/css/phui/phui-fontkit.css' => '9c3d2dce',
|
||||||
|
@ -770,7 +770,7 @@ return array(
|
||||||
'phui-calendar-day-css' => 'de035c8a',
|
'phui-calendar-day-css' => 'de035c8a',
|
||||||
'phui-calendar-list-css' => 'c1d0ca59',
|
'phui-calendar-list-css' => 'c1d0ca59',
|
||||||
'phui-calendar-month-css' => 'a92e47d2',
|
'phui-calendar-month-css' => 'a92e47d2',
|
||||||
'phui-crumbs-view-css' => '3e362700',
|
'phui-crumbs-view-css' => '646a8830',
|
||||||
'phui-document-view-css' => 'bbeb1890',
|
'phui-document-view-css' => 'bbeb1890',
|
||||||
'phui-feed-story-css' => 'c9f3a0b5',
|
'phui-feed-story-css' => 'c9f3a0b5',
|
||||||
'phui-font-icon-base-css' => '3dad2ae3',
|
'phui-font-icon-base-css' => '3dad2ae3',
|
||||||
|
|
|
@ -90,6 +90,7 @@ final class PhabricatorAuthListController
|
||||||
pht('Add Authentication Provider'))));
|
pht('Add Authentication Provider'))));
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
$crumbs->addTextCrumb(pht('Auth Providers'));
|
$crumbs->addTextCrumb(pht('Auth Providers'));
|
||||||
|
|
||||||
$config_name = 'auth.email-domains';
|
$config_name = 'auth.email-domains';
|
||||||
|
|
|
@ -33,6 +33,7 @@ final class PhabricatorConfigHistoryController
|
||||||
$title = pht('Settings History');
|
$title = pht('Settings History');
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
$crumbs->addTextCrumb('Config', $this->getApplicationURI());
|
$crumbs->addTextCrumb('Config', $this->getApplicationURI());
|
||||||
$crumbs->addTextCrumb($title, '/config/history/');
|
$crumbs->addTextCrumb($title, '/config/history/');
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ abstract class ConpherenceController extends PhabricatorController {
|
||||||
|
|
||||||
protected function buildApplicationCrumbs() {
|
protected function buildApplicationCrumbs() {
|
||||||
$crumbs = parent::buildApplicationCrumbs();
|
$crumbs = parent::buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$crumbs
|
$crumbs
|
||||||
->addAction(
|
->addAction(
|
||||||
|
|
|
@ -442,15 +442,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
->setRequestURI($request->getRequestURI()));
|
->setRequestURI($request->getRequestURI()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$object_id = 'D'.$revision->getID();
|
$object_id = 'D'.$revision->getID();
|
||||||
|
|
||||||
$top_anchor = id(new PhabricatorAnchorView())
|
|
||||||
->setAnchorName('top')
|
|
||||||
->setNavigationMarker(true);
|
|
||||||
|
|
||||||
$content = array(
|
$content = array(
|
||||||
$top_anchor,
|
|
||||||
$revision_detail_box,
|
$revision_detail_box,
|
||||||
$page_pane,
|
$page_pane,
|
||||||
);
|
);
|
||||||
|
@ -467,7 +461,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
false);
|
false);
|
||||||
|
|
||||||
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
||||||
->setAnchorName('top')
|
|
||||||
->setTitle('D'.$revision->getID())
|
->setTitle('D'.$revision->getID())
|
||||||
->setBaseURI(new PhutilURI('/D'.$revision->getID()))
|
->setBaseURI(new PhutilURI('/D'.$revision->getID()))
|
||||||
->setCollapsed((bool)$collapsed)
|
->setCollapsed((bool)$collapsed)
|
||||||
|
|
|
@ -69,11 +69,6 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$top_anchor = id(new PhabricatorAnchorView())
|
|
||||||
->setAnchorName('top')
|
|
||||||
->setNavigationMarker(true);
|
|
||||||
|
|
||||||
$audit_requests = $commit->getAudits();
|
$audit_requests = $commit->getAudits();
|
||||||
$this->auditAuthorityPHIDs =
|
$this->auditAuthorityPHIDs =
|
||||||
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($user);
|
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($user);
|
||||||
|
@ -93,7 +88,6 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
"didn't affect the tracked subdirectory ('%s'), so no ".
|
"didn't affect the tracked subdirectory ('%s'), so no ".
|
||||||
"information is available.", $subpath));
|
"information is available.", $subpath));
|
||||||
$content[] = $error_panel;
|
$content[] = $error_panel;
|
||||||
$content[] = $top_anchor;
|
|
||||||
} else {
|
} else {
|
||||||
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
|
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
|
||||||
$engine->setConfig('viewer', $user);
|
$engine->setConfig('viewer', $user);
|
||||||
|
@ -151,7 +145,6 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
'class' => 'diffusion-commit-message phabricator-remarkup',
|
'class' => 'diffusion-commit-message phabricator-remarkup',
|
||||||
),
|
),
|
||||||
$message));
|
$message));
|
||||||
$content[] = $top_anchor;
|
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($headsup_view)
|
->setHeader($headsup_view)
|
||||||
|
@ -381,7 +374,6 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
|
|
||||||
if ($changesets && $show_filetree) {
|
if ($changesets && $show_filetree) {
|
||||||
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
||||||
->setAnchorName('top')
|
|
||||||
->setTitle($short_name)
|
->setTitle($short_name)
|
||||||
->setBaseURI(new PhutilURI('/'.$commit_id))
|
->setBaseURI(new PhutilURI('/'.$commit_id))
|
||||||
->build($changesets)
|
->build($changesets)
|
||||||
|
|
|
@ -30,10 +30,9 @@ final class HeraldRuleEditHistoryController extends HeraldController {
|
||||||
->setHandles($handles)
|
->setHandles($handles)
|
||||||
->setUser($this->getRequest()->getUser());
|
->setUser($this->getRequest()->getUser());
|
||||||
|
|
||||||
$panel = new AphrontPanelView();
|
$panel = new PHUIObjectBoxView();
|
||||||
$panel->setHeader(pht('Edit History'));
|
$panel->setHeaderText(pht('Edit History'));
|
||||||
$panel->appendChild($list_view);
|
$panel->appendChild($list_view);
|
||||||
$panel->setNoBackground();
|
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs($can_create = false)
|
->buildApplicationCrumbs($can_create = false)
|
||||||
|
|
|
@ -276,6 +276,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
$crumbs->addTextCrumb($document->getMonogram());
|
$crumbs->addTextCrumb($document->getMonogram());
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
|
|
|
@ -32,11 +32,9 @@ final class PhabricatorPeopleLdapController
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue(pht('Search')));
|
->setValue(pht('Search')));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new PHUIObjectBoxView())
|
||||||
->setHeader(pht('Import LDAP Users'))
|
->setHeaderText(pht('Import LDAP Users'))
|
||||||
->setNoBackground()
|
->setForm($form);
|
||||||
->setWidth(AphrontPanelView::WIDTH_FORM)
|
|
||||||
->appendChild($form);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
|
|
|
@ -75,6 +75,7 @@ final class PhamePostListController extends PhameController {
|
||||||
->appendChild($post_list);
|
->appendChild($post_list);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
$crumbs->addTextCrumb($title, $this->getApplicationURI());
|
$crumbs->addTextCrumb($title, $this->getApplicationURI());
|
||||||
|
|
||||||
$nav->appendChild(
|
$nav->appendChild(
|
||||||
|
|
|
@ -185,6 +185,7 @@ final class PhrictionDocumentController
|
||||||
$actions = $this->buildActionView($user, $document);
|
$actions = $this->buildActionView($user, $document);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
$crumb_views = $this->renderBreadcrumbs($slug);
|
$crumb_views = $this->renderBreadcrumbs($slug);
|
||||||
foreach ($crumb_views as $view) {
|
foreach ($crumb_views as $view) {
|
||||||
$crumbs->addCrumb($view);
|
$crumbs->addCrumb($view);
|
||||||
|
|
|
@ -261,6 +261,7 @@ final class PhabricatorApplicationSearchController
|
||||||
|
|
||||||
$crumbs = $parent
|
$crumbs = $parent
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
|
->setBorder(true)
|
||||||
->addTextCrumb($title);
|
->addTextCrumb($title);
|
||||||
|
|
||||||
$nav->setCrumbs($crumbs);
|
$nav->setCrumbs($crumbs);
|
||||||
|
|
|
@ -39,6 +39,7 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setStackable(true);
|
||||||
foreach ($tokens_given as $token_given) {
|
foreach ($tokens_given as $token_given) {
|
||||||
$handle = $handles[$token_given->getObjectPHID()];
|
$handle = $handles[$token_given->getObjectPHID()];
|
||||||
$token = idx($tokens, $token_given->getTokenPHID());
|
$token = idx($tokens, $token_given->getTokenPHID());
|
||||||
|
@ -57,17 +58,20 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController {
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
$list->setPager($pager);
|
|
||||||
|
|
||||||
$title = pht('Tokens Given');
|
$title = pht('Tokens Given');
|
||||||
|
|
||||||
|
$box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText($title)
|
||||||
|
->appendChild($list);
|
||||||
|
|
||||||
$nav = $this->buildSideNav();
|
$nav = $this->buildSideNav();
|
||||||
$nav->setCrumbs(
|
$nav->setCrumbs(
|
||||||
$this->buildApplicationCrumbs()
|
$this->buildApplicationCrumbs()
|
||||||
->addTextCrumb($title));
|
->addTextCrumb($title));
|
||||||
$nav->selectFilter('given/');
|
$nav->selectFilter('given/');
|
||||||
|
|
||||||
$nav->appendChild($list);
|
$nav->appendChild($box);
|
||||||
|
$nav->appendChild($pager);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
$nav,
|
$nav,
|
||||||
|
|
|
@ -30,6 +30,7 @@ final class PhabricatorTokenLeaderController
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setStackable(true);
|
||||||
foreach ($phids as $object) {
|
foreach ($phids as $object) {
|
||||||
$count = idx($counts, $object, 0);
|
$count = idx($counts, $object, 0);
|
||||||
$item = id(new PHUIObjectItemView());
|
$item = id(new PHUIObjectItemView());
|
||||||
|
@ -43,13 +44,17 @@ final class PhabricatorTokenLeaderController
|
||||||
|
|
||||||
$title = pht('Token Leader Board');
|
$title = pht('Token Leader Board');
|
||||||
|
|
||||||
|
$box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText($title)
|
||||||
|
->appendChild($list);
|
||||||
|
|
||||||
$nav = $this->buildSideNav();
|
$nav = $this->buildSideNav();
|
||||||
$nav->setCrumbs(
|
$nav->setCrumbs(
|
||||||
$this->buildApplicationCrumbs()
|
$this->buildApplicationCrumbs()
|
||||||
->addTextCrumb($title));
|
->addTextCrumb($title));
|
||||||
$nav->selectFilter('leaders/');
|
$nav->selectFilter('leaders/');
|
||||||
|
|
||||||
$nav->appendChild($list);
|
$nav->appendChild($box);
|
||||||
$nav->appendChild($pager);
|
$nav->appendChild($pager);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
|
|
|
@ -4,6 +4,7 @@ final class PHUICrumbsView extends AphrontView {
|
||||||
|
|
||||||
private $crumbs = array();
|
private $crumbs = array();
|
||||||
private $actions = array();
|
private $actions = array();
|
||||||
|
private $border;
|
||||||
|
|
||||||
protected function canAppendChild() {
|
protected function canAppendChild() {
|
||||||
return false;
|
return false;
|
||||||
|
@ -35,6 +36,11 @@ final class PHUICrumbsView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setBorder($border) {
|
||||||
|
$this->border = $border;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
require_celerity_resource('phui-crumbs-view-css');
|
require_celerity_resource('phui-crumbs-view-css');
|
||||||
|
|
||||||
|
@ -99,6 +105,9 @@ final class PHUICrumbsView extends AphrontView {
|
||||||
|
|
||||||
$classes = array();
|
$classes = array();
|
||||||
$classes[] = 'phui-crumbs-view';
|
$classes[] = 'phui-crumbs-view';
|
||||||
|
if ($this->border) {
|
||||||
|
$classes[] = 'phui-crumbs-border';
|
||||||
|
}
|
||||||
|
|
||||||
return phutil_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
Remove this once that gets sorted out. */
|
Remove this once that gets sorted out. */
|
||||||
position: relative;
|
position: relative;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
border-bottom: 1px solid rgba(205, 207, 211, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-crumbs-view,
|
.phui-crumbs-view,
|
||||||
|
@ -99,3 +98,15 @@ a.phui-crumbs-action .phui-icon-view {
|
||||||
.phui-crumb-divider {
|
.phui-crumb-divider {
|
||||||
margin: 2px 8px;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue