mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Remove oneline feed story
Summary: People seem confused and it is a little inconsistent. Also added other app icon types. Test Plan: Viewed a number of feed stories. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9320
This commit is contained in:
parent
1855e66758
commit
c7a7574f0c
1 changed files with 18 additions and 30 deletions
|
@ -142,7 +142,6 @@ final class PHUIFeedStoryView extends AphrontView {
|
||||||
|
|
||||||
require_celerity_resource('phui-feed-story-css');
|
require_celerity_resource('phui-feed-story-css');
|
||||||
Javelin::initBehavior('phabricator-hovercards');
|
Javelin::initBehavior('phabricator-hovercards');
|
||||||
$oneline = !$this->hasChildren();
|
|
||||||
|
|
||||||
$body = null;
|
$body = null;
|
||||||
$foot = null;
|
$foot = null;
|
||||||
|
@ -186,18 +185,6 @@ final class PHUIFeedStoryView extends AphrontView {
|
||||||
$icon->setSpriteSheet(PHUIIconView::SPRITE_APPS);
|
$icon->setSpriteSheet(PHUIIconView::SPRITE_APPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ol_foot = null;
|
|
||||||
if ($oneline) {
|
|
||||||
$ol_foot = phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'class' => 'phui-feed-story-oneline-foot'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
$icon,
|
|
||||||
$foot));
|
|
||||||
}
|
|
||||||
|
|
||||||
$action_list = array();
|
$action_list = array();
|
||||||
$icons = null;
|
$icons = null;
|
||||||
foreach ($this->actions as $action) {
|
foreach ($this->actions as $action) {
|
||||||
|
@ -223,10 +210,9 @@ final class PHUIFeedStoryView extends AphrontView {
|
||||||
'class' => 'phui-feed-story-head',
|
'class' => 'phui-feed-story-head',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
(!$oneline ? $actor : null),
|
$actor,
|
||||||
nonempty($this->title, pht('Untitled Story')),
|
nonempty($this->title, pht('Untitled Story')),
|
||||||
$icons,
|
$icons,
|
||||||
$ol_foot
|
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!empty($this->tokenBar)) {
|
if (!empty($this->tokenBar)) {
|
||||||
|
@ -249,23 +235,16 @@ final class PHUIFeedStoryView extends AphrontView {
|
||||||
$body_content);
|
$body_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($oneline) {
|
$foot = phutil_tag(
|
||||||
$foot = null;
|
'div',
|
||||||
} else {
|
array(
|
||||||
$foot = phutil_tag(
|
'class' => 'phui-feed-story-foot',
|
||||||
'div',
|
),
|
||||||
array(
|
array(
|
||||||
'class' => 'phui-feed-story-foot',
|
$icon,
|
||||||
),
|
$foot));
|
||||||
array(
|
|
||||||
$icon,
|
|
||||||
$foot));
|
|
||||||
}
|
|
||||||
|
|
||||||
$classes = array('phui-feed-story');
|
$classes = array('phui-feed-story');
|
||||||
if ($oneline) {
|
|
||||||
$classes[] = 'phui-feed-story-oneline';
|
|
||||||
}
|
|
||||||
|
|
||||||
return id(new PHUIBoxView())
|
return id(new PHUIBoxView())
|
||||||
->addClass(implode(' ', $classes))
|
->addClass(implode(' ', $classes))
|
||||||
|
@ -282,6 +261,15 @@ final class PHUIFeedStoryView extends AphrontView {
|
||||||
case PhabricatorMacroPHIDTypeMacro::TYPECONST:
|
case PhabricatorMacroPHIDTypeMacro::TYPECONST:
|
||||||
$this->setAppIcon("macro-dark");
|
$this->setAppIcon("macro-dark");
|
||||||
break;
|
break;
|
||||||
|
case ManiphestPHIDTypeTask::TYPECONST:
|
||||||
|
$this->setAppIcon('maniphest-dark');
|
||||||
|
break;
|
||||||
|
case DifferentialPHIDTypeRevision::TYPECONST:
|
||||||
|
$this->setAppIcon('differential-dark');
|
||||||
|
break;
|
||||||
|
case PhabricatorCalendarPHIDTypeEvent::TYPECONST:
|
||||||
|
$this->setAppIcon('calendar-dark');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue