1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-17 18:21:11 +01:00

Move PhabricatorCrumbs to PHUICrumbs

Summary: Ref T7014, laying the groundwork for redesigning crumbs.

Test Plan: Tested numberous pages, grep'd locations.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7014

Differential Revision: https://secure.phabricator.com/D11478
This commit is contained in:
Chad Little 2015-01-23 11:35:09 -08:00
parent a03d16907c
commit 45ae9cf340
14 changed files with 64 additions and 64 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '8d1c0f87',
'core.pkg.css' => 'd7209022',
'core.pkg.js' => '2d9bfc06',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
@ -107,12 +107,11 @@ return array(
'rsrc/css/core/core.css' => 'ca42b69f',
'rsrc/css/core/remarkup.css' => '0ee3d256',
'rsrc/css/core/syntax.css' => '56c1ba38',
'rsrc/css/core/z-index.css' => '44e1d311',
'rsrc/css/core/z-index.css' => '27a9a1be',
'rsrc/css/diviner/diviner-shared.css' => '38813222',
'rsrc/css/font/font-awesome.css' => '0c10d96b',
'rsrc/css/font/font-source-sans-pro.css' => '91d53463',
'rsrc/css/font/phui-font-icon-base.css' => '3dad2ae3',
'rsrc/css/layout/phabricator-crumbs-view.css' => 'd5aa87e4',
'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82',
'rsrc/css/layout/phabricator-hovercard-view.css' => '893f4783',
'rsrc/css/layout/phabricator-side-menu-view.css' => '7e8c6341',
@ -125,6 +124,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' => '1705bce6',
'rsrc/css/phui/phui-document.css' => 'bbeb1890',
'rsrc/css/phui/phui-feed-story.css' => '582f0ec9',
'rsrc/css/phui/phui-fontkit.css' => '9c3d2dce',
@ -152,7 +152,7 @@ return array(
'rsrc/css/sprite-gradient.css' => '4bdb98a7',
'rsrc/css/sprite-login.css' => 'a355d921',
'rsrc/css/sprite-main-header.css' => '92720ee2',
'rsrc/css/sprite-menu.css' => '0ca5a908',
'rsrc/css/sprite-menu.css' => '661b879f',
'rsrc/css/sprite-projects.css' => 'b0d9e24f',
'rsrc/css/sprite-tokens.css' => '1706b943',
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '579d3140',
@ -707,7 +707,6 @@ return array(
'phabricator-content-source-view-css' => '4b8b05d4',
'phabricator-core-css' => 'ca42b69f',
'phabricator-countdown-css' => '86b7b0a0',
'phabricator-crumbs-view-css' => 'd5aa87e4',
'phabricator-dashboard-css' => 'a2bfdcbf',
'phabricator-drag-and-drop-file-upload' => '8c49f386',
'phabricator-draggable-list' => 'a16ec1c6',
@ -751,7 +750,7 @@ return array(
'phabricator-uiexample-reactor-select' => 'a155550f',
'phabricator-uiexample-reactor-sendclass' => '1def2711',
'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee',
'phabricator-zindex-css' => '44e1d311',
'phabricator-zindex-css' => '27a9a1be',
'phame-css' => '19ecc703',
'pholio-css' => '95174bdd',
'pholio-edit-css' => '3ad9d1ee',
@ -768,6 +767,7 @@ return array(
'phui-calendar-day-css' => 'de035c8a',
'phui-calendar-list-css' => 'c1d0ca59',
'phui-calendar-month-css' => 'a92e47d2',
'phui-crumbs-view-css' => '1705bce6',
'phui-document-view-css' => 'bbeb1890',
'phui-feed-story-css' => '582f0ec9',
'phui-font-icon-base-css' => '3dad2ae3',
@ -815,7 +815,7 @@ return array(
'sprite-gradient-css' => '4bdb98a7',
'sprite-login-css' => 'a355d921',
'sprite-main-header-css' => '92720ee2',
'sprite-menu-css' => '0ca5a908',
'sprite-menu-css' => '661b879f',
'sprite-projects-css' => 'b0d9e24f',
'sprite-tokens-css' => '1706b943',
'syntax-highlighting-css' => '56c1ba38',
@ -2007,7 +2007,7 @@ return array(
'phabricator-filetree-view-css',
'phabricator-nav-view-css',
'phabricator-side-menu-view-css',
'phabricator-crumbs-view-css',
'phui-crumbs-view-css',
'phui-object-item-list-view-css',
'global-drag-and-drop-css',
'phui-spacing-css',

View file

@ -109,7 +109,7 @@ return array(
'phabricator-filetree-view-css',
'phabricator-nav-view-css',
'phabricator-side-menu-view-css',
'phabricator-crumbs-view-css',
'phui-crumbs-view-css',
'phui-object-item-list-view-css',
'global-drag-and-drop-css',
'phui-spacing-css',

View file

@ -1132,6 +1132,8 @@ phutil_register_library_map(array(
'PHUICalendarMonthView' => 'view/phui/calendar/PHUICalendarMonthView.php',
'PHUICalendarWidgetView' => 'view/phui/calendar/PHUICalendarWidgetView.php',
'PHUIColorPalletteExample' => 'applications/uiexample/examples/PHUIColorPalletteExample.php',
'PHUICrumbView' => 'view/phui/PHUICrumbView.php',
'PHUICrumbsView' => 'view/phui/PHUICrumbsView.php',
'PHUIDocumentExample' => 'applications/uiexample/examples/PHUIDocumentExample.php',
'PHUIDocumentView' => 'view/phui/PHUIDocumentView.php',
'PHUIFeedStoryExample' => 'applications/uiexample/examples/PHUIFeedStoryExample.php',
@ -1551,8 +1553,6 @@ phutil_register_library_map(array(
'PhabricatorCountdownView' => 'applications/countdown/view/PhabricatorCountdownView.php',
'PhabricatorCountdownViewController' => 'applications/countdown/controller/PhabricatorCountdownViewController.php',
'PhabricatorCredentialsUsedByObjectEdgeType' => 'applications/passphrase/edge/PhabricatorCredentialsUsedByObjectEdgeType.php',
'PhabricatorCrumbView' => 'view/layout/PhabricatorCrumbView.php',
'PhabricatorCrumbsView' => 'view/layout/PhabricatorCrumbsView.php',
'PhabricatorCursorPagedPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php',
'PhabricatorCustomField' => 'infrastructure/customfield/field/PhabricatorCustomField.php',
'PhabricatorCustomFieldAttachment' => 'infrastructure/customfield/field/PhabricatorCustomFieldAttachment.php',
@ -4309,6 +4309,8 @@ phutil_register_library_map(array(
'PHUICalendarMonthView' => 'AphrontView',
'PHUICalendarWidgetView' => 'AphrontTagView',
'PHUIColorPalletteExample' => 'PhabricatorUIExample',
'PHUICrumbView' => 'AphrontView',
'PHUICrumbsView' => 'AphrontView',
'PHUIDocumentExample' => 'PhabricatorUIExample',
'PHUIDocumentView' => 'AphrontTagView',
'PHUIFeedStoryExample' => 'PhabricatorUIExample',
@ -4762,8 +4764,6 @@ phutil_register_library_map(array(
'PhabricatorCountdownView' => 'AphrontTagView',
'PhabricatorCountdownViewController' => 'PhabricatorCountdownController',
'PhabricatorCredentialsUsedByObjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorCrumbView' => 'AphrontView',
'PhabricatorCrumbsView' => 'AphrontView',
'PhabricatorCursorPagedPolicyAwareQuery' => 'PhabricatorPolicyAwareQuery',
'PhabricatorCustomFieldConfigOptionType' => 'PhabricatorConfigOptionType',
'PhabricatorCustomFieldDataNotAvailableException' => 'Exception',

View file

@ -439,13 +439,13 @@ abstract class PhabricatorController extends AphrontController {
$sprite = 'application';
}
$crumbs[] = id(new PhabricatorCrumbView())
$crumbs[] = id(new PHUICrumbView())
->setHref($this->getApplicationURI())
->setAural($application->getName())
->setIcon($sprite);
}
$view = new PhabricatorCrumbsView();
$view = new PHUICrumbsView();
foreach ($crumbs as $crumb) {
$view->addCrumb($crumb);
}

View file

@ -9,7 +9,7 @@ final class CeleritySpriteGenerator {
'arrow-right' => array(
'x' => 9,
'y' => 31,
'css' => '.phabricator-crumb-divider',
'css' => '.phui-crumb-divider',
),
'logo' => array(
'x' => 96,

View file

@ -59,7 +59,7 @@ abstract class ConpherenceController extends PhabricatorController {
$title = pht('[No Title]');
}
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
id(new PHUICrumbView())
->setName($title)
->setHref($this->getApplicationURI('update/'.$conpherence->getID().'/'))
->setWorkflow(true));

View file

@ -96,7 +96,7 @@ abstract class DiffusionController extends PhabricatorController {
}
}
$crumb = id(new PhabricatorCrumbView())
$crumb = id(new PHUICrumbView())
->setName($repository_name);
if (!$spec['view'] && !$spec['commit'] &&
!$spec['tags'] && !$spec['branches']) {
@ -114,7 +114,7 @@ abstract class DiffusionController extends PhabricatorController {
$stable_commit = $drequest->getStableCommit();
if ($spec['tags']) {
$crumb = new PhabricatorCrumbView();
$crumb = new PHUICrumbView();
if ($spec['commit']) {
$crumb->setName(
pht('Tags for %s', 'r'.$callsign.$stable_commit));
@ -131,21 +131,21 @@ abstract class DiffusionController extends PhabricatorController {
}
if ($spec['branches']) {
$crumb = id(new PhabricatorCrumbView())
$crumb = id(new PHUICrumbView())
->setName(pht('Branches'));
$crumb_list[] = $crumb;
return $crumb_list;
}
if ($spec['commit']) {
$crumb = id(new PhabricatorCrumbView())
$crumb = id(new PHUICrumbView())
->setName("r{$callsign}{$stable_commit}")
->setHref("r{$callsign}{$stable_commit}");
$crumb_list[] = $crumb;
return $crumb_list;
}
$crumb = new PhabricatorCrumbView();
$crumb = new PHUICrumbView();
$view = $spec['view'];
switch ($view) {
@ -163,7 +163,7 @@ abstract class DiffusionController extends PhabricatorController {
break;
}
$crumb = id(new PhabricatorCrumbView())
$crumb = id(new PHUICrumbView())
->setName($view_name);
$crumb_list[] = $crumb;

View file

@ -80,7 +80,7 @@ abstract class PhrictionController extends PhabricatorController {
$breadcrumbs = array();
foreach ($ancestor_handles as $ancestor_handle) {
$breadcrumbs[] = id(new PhabricatorCrumbView())
$breadcrumbs[] = id(new PHUICrumbView())
->setName($ancestor_handle->getName())
->setHref($ancestor_handle->getUri());
}

View file

@ -53,7 +53,7 @@ final class AphrontSideNavFilterView extends AphrontView {
return $object;
}
public function setCrumbs(PhabricatorCrumbsView $crumbs) {
public function setCrumbs(PHUICrumbsView $crumbs) {
$this->crumbs = $crumbs;
return $this;
}

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorCrumbView extends AphrontView {
final class PHUICrumbView extends AphrontView {
private $name;
private $href;
@ -53,7 +53,7 @@ final class PhabricatorCrumbView extends AphrontView {
public function render() {
$classes = array(
'phabricator-crumb-view',
'phui-crumb-view',
);
$aural = null;
@ -68,11 +68,11 @@ final class PhabricatorCrumbView extends AphrontView {
$icon = null;
if ($this->icon) {
$classes[] = 'phabricator-crumb-has-icon';
$classes[] = 'phui-crumb-has-icon';
$icon = phutil_tag(
'span',
array(
'class' => 'phabricator-crumb-icon '.
'class' => 'phui-crumb-icon '.
'sprite-apps-large apps-'.$this->icon.'-dark-large',
),
'');
@ -81,7 +81,7 @@ final class PhabricatorCrumbView extends AphrontView {
$name = phutil_tag(
'span',
array(
'class' => 'phabricator-crumb-name',
'class' => 'phui-crumb-name',
),
$this->name);
@ -90,7 +90,7 @@ final class PhabricatorCrumbView extends AphrontView {
$divider = phutil_tag(
'span',
array(
'class' => 'sprite-menu phabricator-crumb-divider',
'class' => 'sprite-menu phui-crumb-divider',
),
'');
} else {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorCrumbsView extends AphrontView {
final class PHUICrumbsView extends AphrontView {
private $crumbs = array();
private $actions = array();
@ -20,12 +20,12 @@ final class PhabricatorCrumbsView extends AphrontView {
*/
public function addTextCrumb($text, $href = null) {
return $this->addCrumb(
id(new PhabricatorCrumbView())
id(new PHUICrumbView())
->setName($text)
->setHref($href));
}
public function addCrumb(PhabricatorCrumbView $crumb) {
public function addCrumb(PHUICrumbView $crumb) {
$this->crumbs[] = $crumb;
return $this;
}
@ -36,7 +36,7 @@ final class PhabricatorCrumbsView extends AphrontView {
}
public function render() {
require_celerity_resource('phabricator-crumbs-view-css');
require_celerity_resource('phui-crumbs-view-css');
$action_view = null;
if ($this->actions) {
@ -56,7 +56,7 @@ final class PhabricatorCrumbsView extends AphrontView {
$name = phutil_tag(
'span',
array(
'class' => 'phabricator-crumbs-action-name',
'class' => 'phui-crumbs-action-name',
),
$action->getName());
@ -65,10 +65,10 @@ final class PhabricatorCrumbsView extends AphrontView {
$action_sigils[] = 'workflow';
}
$action_classes = $action->getClasses();
$action_classes[] = 'phabricator-crumbs-action';
$action_classes[] = 'phui-crumbs-action';
if ($action->getDisabled()) {
$action_classes[] = 'phabricator-crumbs-action-disabled';
$action_classes[] = 'phui-crumbs-action-disabled';
}
$actions[] = javelin_tag(
@ -88,7 +88,7 @@ final class PhabricatorCrumbsView extends AphrontView {
$action_view = phutil_tag(
'div',
array(
'class' => 'phabricator-crumbs-actions',
'class' => 'phui-crumbs-actions',
),
$actions);
}
@ -100,7 +100,7 @@ final class PhabricatorCrumbsView extends AphrontView {
return phutil_tag(
'div',
array(
'class' => 'phabricator-crumbs-view '.
'class' => 'phui-crumbs-view '.
'sprite-gradient gradient-breadcrumbs',
),
array(

View file

@ -38,7 +38,7 @@
z-index: 3;
}
.phabricator-crumbs-view {
.phui-crumbs-view {
z-index: 3;
}

View file

@ -1,8 +1,8 @@
/**
* @provides phabricator-crumbs-view-css
* @provides phui-crumbs-view-css
*/
.phabricator-crumbs-view {
.phui-crumbs-view {
background-color: #ebecee;
background-image: none !important;
height: 31px;
@ -15,43 +15,43 @@
-webkit-font-smoothing: antialiased;
}
.phabricator-crumbs-view,
.phabricator-crumbs-view a.phabricator-crumb-view,
.phabricator-crumbs-view a.phabricator-crumbs-action {
.phui-crumbs-view,
.phui-crumbs-view a.phui-crumb-view,
.phui-crumbs-view a.phui-crumbs-action {
color: {$darkbluetext};
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}
.phabricator-crumbs-view a.phabricator-crumbs-action-disabled {
.phui-crumbs-view a.phui-crumbs-action-disabled {
color: {$lightgreytext};
}
.phabricator-crumbs-view + .phui-header-shell {
.phui-crumbs-view + .phui-header-shell {
border-top: none;
}
.device-desktop .phabricator-crumbs-view a:hover {
.device-desktop .phui-crumbs-view a:hover {
text-decoration: underline;
}
.phabricator-crumb-view {
.phui-crumb-view {
float: left;
height: 31px;
line-height: 31px;
}
.device-phone .phabricator-crumb-view {
.device-phone .phui-crumb-view {
display: none;
}
.device-phone .phabricator-crumb-view.phabricator-last-crumb,
.device-phone .phabricator-crumb-view.phabricator-crumb-has-icon {
.device-phone .phui-crumb-view.phabricator-last-crumb,
.device-phone .phui-crumb-view.phui-crumb-has-icon {
display: inline-block;
}
.phabricator-crumb-icon {
.phui-crumb-icon {
display: inline-block;
width: 28px;
height: 28px;
@ -59,46 +59,46 @@
vertical-align: top;
}
.device-phone .phabricator-crumb-icon {
.device-phone .phui-crumb-icon {
margin-left: 7px;
}
.phabricator-crumbs-actions {
.phui-crumbs-actions {
float: right;
white-space: nowrap;
}
.phabricator-crumbs-action {
.phui-crumbs-action {
display: inline-block;
height: 17px;
padding: 8px 12px;
position: relative;
}
.device-phone a.phabricator-crumbs-action {
.device-phone a.phui-crumbs-action {
padding: 7px;
border-left: 1px solid {$hovergrey};
}
.device-desktop a.phabricator-crumbs-action:hover {
.device-desktop a.phui-crumbs-action:hover {
background: rgba(205, 207, 211, .5);
text-decoration: none;
}
.device-phone .phabricator-crumbs-action-name {
.device-phone .phui-crumbs-action-name {
display: none;
}
a.phabricator-crumbs-action .phui-icon-view {
a.phui-crumbs-action .phui-icon-view {
margin-right: 5px;
color: {$darkbluetext};
}
.device-phone a.phabricator-crumbs-action .phui-icon-view {
.device-phone a.phui-crumbs-action .phui-icon-view {
margin-left: 5px;
}
.phabricator-crumb-divider {
.phui-crumb-divider {
display: inline-block;
width: 9px;
height: 31px;

View file

@ -18,7 +18,7 @@ only screen and (-webkit-min-device-pixel-ratio: 1.5) {
}
.phabricator-crumb-divider {
.phui-crumb-divider {
background-position: 0px -27px;
}