Remove 1x AppIcons, use FontIcons instead

Summary: Removes the 1x application icons, and uses the fonticons instead. Feed was only known location.

Test Plan:
feed, dashboards, grep for use

{F275636}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11496
This commit is contained in:
Chad Little
2015-01-25 14:14:41 -08:00
parent 73e1586247
commit 6018ef91b8
92 changed files with 27 additions and 707 deletions

View File

@@ -214,11 +214,6 @@ final class CeleritySpriteGenerator {
return $sheet;
}
public function buildAppsSheet() {
return $this->buildAppsSheetVariant(1);
}
public function buildAppsLargeSheet() {
return $this->buildAppsSheetVariant(2);
}

View File

@@ -19,7 +19,7 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication {
}
public function getFontIcon() {
return 'fa-code';
return 'fa-file-code-o';
}
public function isPinnedByDefault(PhabricatorUser $viewer) {

View File

@@ -11,7 +11,6 @@ final class PhabricatorFeedStoryAudit extends PhabricatorFeedStory {
$commit_phid = $this->getPrimaryObjectPHID();
$view = $this->newStoryView();
$view->setAppIcon('audit-dark');
$action = $this->getValue('action');
$verb = PhabricatorAuditActionConstants::getActionPastTenseVerb($action);

View File

@@ -50,7 +50,6 @@ final class PhabricatorFeedStoryCommit extends PhabricatorFeedStory {
}
$view = $this->newStoryView();
$view->setAppIcon('differential-dark');
$view->setTitle($title);

View File

@@ -10,7 +10,6 @@ final class PhabricatorFeedStoryDifferential extends PhabricatorFeedStory {
$data = $this->getStoryData();
$view = $this->newStoryView();
$view->setAppIcon('differential-dark');
$line = $this->getLineForData($data);
$view->setTitle($line);

View File

@@ -55,7 +55,6 @@ final class PhabricatorFeedStoryDifferentialAggregate
}
$view = $this->newStoryView();
$view->setAppIcon('differential-dark');
$view->setTitle($title);
$href = $this->getHandle($data->getValue('revision_phid'))->getURI();

View File

@@ -55,7 +55,6 @@ final class PhabricatorFeedStoryManiphestAggregate
}
$view = $this->newStoryView();
$view->setAppIcon('maniphest-dark');
$view->setTitle($title);
$href = $this->getHandle($data->getValue('taskPHID'))->getURI();

View File

@@ -23,7 +23,6 @@ final class PhabricatorFeedStoryPhriction extends PhabricatorFeedStory {
$document_phid = $data->getValue('phid');
$view = $this->newStoryView();
$view->setAppIcon('phriction-dark');
$action = $data->getValue('action');
$verb = PhrictionActionConstants::getActionPastTenseVerb($action);

View File

@@ -73,7 +73,7 @@ abstract class PhameController extends PhabricatorController {
->setTitle($title)
->setImage($blogger_image)
->setImageHref($blogger_uri)
->setAppIcon('phame-dark')
->setAppIcon('fa-star')
->setUser($viewer)
->setPontification($phame_post, $phame_title);

View File

@@ -22,7 +22,6 @@ final class PhabricatorTokenGivenFeedStory
public function renderView() {
$view = $this->newStoryView();
$view->setAppIcon('token-dark');
$author_phid = $this->getValue('authorPHID');
$href = $this->getHandle($this->getPrimaryObjectPHID())->getURI();

View File

@@ -69,7 +69,19 @@ class PhabricatorApplicationTransactionFeedStory
$handle = $this->getHandle($this->getPrimaryObjectPHID());
$view->setHref($handle->getURI());
$view->setAppIconFromPHID($handle->getPHID());
$type = phid_get_type($handle->getPHID());
$phid_types = PhabricatorPHIDType::getAllTypes();
$icon = null;
if (!empty($phid_types[$type])) {
$phid_type = $phid_types[$type];
$class = $phid_type->getPHIDTypeApplicationClass();
if ($class) {
$application = PhabricatorApplication::getByClass($class);
$icon = $application->getFontIcon();
}
}
$view->setAppIcon($icon);
$xaction_phids = $this->getValue('transactionPHIDs');
$xaction = $this->getPrimaryTransaction();

View File

@@ -24,7 +24,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->setImage(celerity_get_resource_uri('/rsrc/image/people/harding.png'))
->setImageHref('http://en.wikipedia.org/wiki/Warren_G._Harding')
->setEpoch(1)
->setAppIcon('differential-dark')
->setAppIcon('fa-star')
->setUser($user);
/* Text Story, useful in Blogs, Ponders, Status */
@@ -48,7 +48,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->setImage(celerity_get_resource_uri('/rsrc/image/people/lincoln.png'))
->setImageHref('http://en.wikipedia.org/wiki/Abraham_Lincoln')
->setEpoch(strtotime('November 19, 1863'))
->setAppIcon('phame-dark')
->setAppIcon('fa-star')
->setUser($user)
->setTokenBar($tokenview)
->setPontification('Four score and seven years ago our fathers brought '.
@@ -80,7 +80,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->appendChild($token)
->setEpoch(1)
->addAction($action1)
->setAppIcon('token-dark')
->setAppIcon('fa-trophy')
->setUser($user);
/* Image Story, used in Pholio, Macro */
@@ -97,7 +97,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->setImage(celerity_get_resource_uri('/rsrc/image/people/harding.png'))
->setImageHref('http://en.wikipedia.org/wiki/Warren_G._Harding')
->setEpoch(1)
->setAppIcon('ponder-dark')
->setAppIcon('fa-cogs')
->setPontification('Why does inline-block add space under my spans and '.
'anchors?')
->addAction($action1)
@@ -112,7 +112,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->setImage(celerity_get_resource_uri('/rsrc/image/people/lincoln.png'))
->setImageHref('http://en.wikipedia.org/wiki/Abraham_Lincoln')
->setEpoch(strtotime('November 19, 1863'))
->setAppIcon('phame-dark')
->setAppIcon('fa-rocket')
->setUser($user)
->setPontification('If we ever create a lightweight status app '.
'this story would be how that would be displayed.');
@@ -126,7 +126,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample {
->setImage(celerity_get_resource_uri('/rsrc/image/people/harding.png'))
->setImageHref('http://en.wikipedia.org/wiki/Warren_G._Harding')
->setEpoch(1)
->setAppIcon('differential-dark')
->setAppIcon('fa-wifi')
->setUser($user);

View File

@@ -192,9 +192,8 @@ final class PHUIFeedStoryView extends AphrontView {
$icon = null;
if ($this->appIcon) {
$icon = new PHUIIconView();
$icon->setSpriteIcon($this->appIcon);
$icon->setSpriteSheet(PHUIIconView::SPRITE_APPS);
$icon = id(new PHUIIconView())
->setIconFont($this->appIcon);
}
$action_list = array();
@@ -275,23 +274,4 @@ final class PHUIFeedStoryView extends AphrontView {
->appendChild(array($head, $body, $foot));
}
public function setAppIconFromPHID($phid) {
switch (phid_get_type($phid)) {
case PholioMockPHIDType::TYPECONST:
$this->setAppIcon('pholio-dark');
break;
case PhabricatorMacroMacroPHIDType::TYPECONST:
$this->setAppIcon('macro-dark');
break;
case ManiphestTaskPHIDType::TYPECONST:
$this->setAppIcon('maniphest-dark');
break;
case DifferentialRevisionPHIDType::TYPECONST:
$this->setAppIcon('differential-dark');
break;
case PhabricatorCalendarEventPHIDType::TYPECONST:
$this->setAppIcon('calendar-dark');
break;
}
}
}

View File

@@ -2,7 +2,6 @@
final class PHUIIconView extends AphrontTagView {
const SPRITE_APPS = 'apps';
const SPRITE_TOKENS = 'tokens';
const SPRITE_LOGIN = 'login';
const SPRITE_PROJECTS = 'projects';

View File

@@ -70,11 +70,6 @@ final class PHUIListItemView extends AphrontTagView {
return $this;
}
public function setAppIcon($icon) {
$this->appIcon = $icon;
return $this;
}
public function setProfileImage($image) {
$this->profileImage = $image;
return $this;
@@ -242,8 +237,7 @@ final class PHUIListItemView extends AphrontTagView {
if ($this->appIcon) {
$icon = id(new PHUIIconView())
->addClass('phui-list-item-icon')
->setSpriteSheet(PHUIIconView::SPRITE_APPS)
->setSpriteIcon($this->appIcon);
->setIconFont($this->appIcon);
}
return javelin_tag(