Page MenuHomePhabricator

D15773.diff
No OneTemporary

D15773.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '31417876',
+ 'core.pkg.css' => '04a95108',
'core.pkg.js' => '37344f3c',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '7ba78475',
@@ -131,7 +131,7 @@
'rsrc/css/phui/phui-document-pro.css' => '73e45fd2',
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
'rsrc/css/phui/phui-document.css' => '9c71d2bf',
- 'rsrc/css/phui/phui-feed-story.css' => '04aec08f',
+ 'rsrc/css/phui/phui-feed-story.css' => 'd8440402',
'rsrc/css/phui/phui-fontkit.css' => '9cda225e',
'rsrc/css/phui/phui-form-view.css' => '6a51768e',
'rsrc/css/phui/phui-form.css' => 'aac1d51d',
@@ -823,7 +823,7 @@
'phui-document-summary-view-css' => '9ca48bdf',
'phui-document-view-css' => '9c71d2bf',
'phui-document-view-pro-css' => '73e45fd2',
- 'phui-feed-story-css' => '04aec08f',
+ 'phui-feed-story-css' => 'd8440402',
'phui-font-icon-base-css' => '6449bce8',
'phui-fontkit-css' => '9cda225e',
'phui-form-css' => 'aac1d51d',
diff --git a/src/applications/meta/phid/PhabricatorApplicationApplicationPHIDType.php b/src/applications/meta/phid/PhabricatorApplicationApplicationPHIDType.php
--- a/src/applications/meta/phid/PhabricatorApplicationApplicationPHIDType.php
+++ b/src/applications/meta/phid/PhabricatorApplicationApplicationPHIDType.php
@@ -37,8 +37,10 @@
foreach ($handles as $phid => $handle) {
$application = $objects[$phid];
- $handle->setName($application->getName());
- $handle->setURI($application->getApplicationURI());
+ $handle
+ ->setName($application->getName())
+ ->setURI($application->getApplicationURI())
+ ->setIcon($application->getIcon());
}
}
diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
--- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
+++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
@@ -99,8 +99,15 @@
}
}
- $view->setImage(
- $this->getHandle($xaction->getAuthorPHID())->getImageURI());
+ $author_phid = $xaction->getAuthorPHID();
+ $author_handle = $this->getHandle($author_phid);
+ $author_image = $author_handle->getImageURI();
+
+ if ($author_image) {
+ $view->setImage($author_image);
+ } else {
+ $view->setAuthorIcon($author_handle->getIcon());
+ }
return $view;
}
diff --git a/src/view/phui/PHUIFeedStoryView.php b/src/view/phui/PHUIFeedStoryView.php
--- a/src/view/phui/PHUIFeedStoryView.php
+++ b/src/view/phui/PHUIFeedStoryView.php
@@ -16,6 +16,7 @@
private $actions = array();
private $chronologicalKey;
private $tags;
+ private $authorIcon;
public function setTags($tags) {
$this->tags = $tags;
@@ -82,6 +83,15 @@
return $this;
}
+ public function setAuthorIcon($author_icon) {
+ $this->authorIcon = $author_icon;
+ return $this;
+ }
+
+ public function getAuthorIcon() {
+ return $this->authorIcon;
+ }
+
public function setTokenBar(array $tokens) {
$this->tokenBar = $tokens;
return $this;
@@ -163,8 +173,18 @@
$foot = null;
$actor = new PHUIIconView();
- $actor->setImage($this->image);
- $actor->addClass('phui-feed-story-actor-image');
+ $actor->addClass('phui-feed-story-actor');
+
+ $author_icon = $this->getAuthorIcon();
+
+ if ($this->image) {
+ $actor->addClass('phui-feed-story-actor-image');
+ $actor->setImage($this->image);
+ } else if ($author_icon) {
+ $actor->addClass('phui-feed-story-actor-icon');
+ $actor->setIcon($author_icon);
+ }
+
if ($this->imageHref) {
$actor->setHref($this->imageHref);
}
diff --git a/webroot/rsrc/css/phui/phui-feed-story.css b/webroot/rsrc/css/phui/phui-feed-story.css
--- a/webroot/rsrc/css/phui/phui-feed-story.css
+++ b/webroot/rsrc/css/phui/phui-feed-story.css
@@ -10,16 +10,29 @@
border: none;
}
-.phui-feed-story-head .phui-feed-story-actor-image {
+.phui-feed-story-head .phui-feed-story-actor {
width: 35px;
height: 35px;
- background-size: 35px;
float: left;
margin-right: 8px;
- box-shadow: {$borderinset};
border-radius: 3px;
+ box-shadow: {$borderinset};
}
+.phui-feed-story-head .phui-feed-story-actor-image {
+ background-size: 35px;
+}
+
+.phui-feed-story-head .phui-feed-story-actor-icon {
+ text-align: center;
+ vertical-align: middle;
+ font-size: 24px;
+ line-height: 35px;
+ color: {$lightgreytext};
+ background: {$greybackground};
+}
+
+
.phui-feed-story-head {
padding: 12px 4px;
overflow: hidden;

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 26, 12:15 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7715535
Default Alt Text
D15773.diff (4 KB)

Event Timeline