mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Add ReallyMajorEvent to PHUITimelineView
Summary: For actions like "Close" that are in theory stopping the timeline, we should display some disruption to the line itself. Test Plan: Tested in UIExamples {F236077} Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D10884
This commit is contained in:
parent
f7aa87311a
commit
d908e76733
4 changed files with 55 additions and 26 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '0784ef1d',
|
'core.pkg.css' => '673d0a25',
|
||||||
'core.pkg.js' => 'e5f7f2ba',
|
'core.pkg.js' => 'e5f7f2ba',
|
||||||
'darkconsole.pkg.js' => 'df001cab',
|
'darkconsole.pkg.js' => 'df001cab',
|
||||||
'differential.pkg.css' => '8af45893',
|
'differential.pkg.css' => '8af45893',
|
||||||
|
@ -142,7 +142,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-status.css' => '888cedb8',
|
'rsrc/css/phui/phui-status.css' => '888cedb8',
|
||||||
'rsrc/css/phui/phui-tag-view.css' => 'b0c282e0',
|
'rsrc/css/phui/phui-tag-view.css' => 'b0c282e0',
|
||||||
'rsrc/css/phui/phui-text.css' => 'cf019f54',
|
'rsrc/css/phui/phui-text.css' => 'cf019f54',
|
||||||
'rsrc/css/phui/phui-timeline-view.css' => '8c6fefe7',
|
'rsrc/css/phui/phui-timeline-view.css' => '26bb3fd4',
|
||||||
'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00',
|
'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00',
|
||||||
'rsrc/css/phui/phui-workpanel-view.css' => '198c7e6c',
|
'rsrc/css/phui/phui-workpanel-view.css' => '198c7e6c',
|
||||||
'rsrc/css/sprite-apps-large.css' => '20ec0cc0',
|
'rsrc/css/sprite-apps-large.css' => '20ec0cc0',
|
||||||
|
@ -791,7 +791,7 @@ return array(
|
||||||
'phui-status-list-view-css' => '888cedb8',
|
'phui-status-list-view-css' => '888cedb8',
|
||||||
'phui-tag-view-css' => 'b0c282e0',
|
'phui-tag-view-css' => 'b0c282e0',
|
||||||
'phui-text-css' => 'cf019f54',
|
'phui-text-css' => 'cf019f54',
|
||||||
'phui-timeline-view-css' => '8c6fefe7',
|
'phui-timeline-view-css' => '26bb3fd4',
|
||||||
'phui-workboard-view-css' => '2bf82d00',
|
'phui-workboard-view-css' => '2bf82d00',
|
||||||
'phui-workpanel-view-css' => '198c7e6c',
|
'phui-workpanel-view-css' => '198c7e6c',
|
||||||
'phuix-action-list-view' => 'b5c256b8',
|
'phuix-action-list-view' => 'b5c256b8',
|
||||||
|
|
|
@ -79,21 +79,22 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
|
|
||||||
$events[] = id(new PHUITimelineEventView())
|
$events[] = id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setIcon('fa-random')
|
->setIcon('fa-check')
|
||||||
->setTitle('Minor Not-Red Event')
|
->setTitle('Historically Important Action')
|
||||||
->setColor(PhabricatorTransactions::COLOR_BLACK);
|
->setColor(PhabricatorTransactions::COLOR_BLACK)
|
||||||
|
->setReallyMajorEvent(true);
|
||||||
|
|
||||||
|
|
||||||
$events[] = id(new PHUITimelineEventView())
|
$events[] = id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setIcon('tag')
|
->setIcon('fa-circle-o')
|
||||||
->setTitle('Major Green Event')
|
->setTitle('Major Green Disagreement Action')
|
||||||
->appendChild('This event is green!')
|
->appendChild('This event is green!')
|
||||||
->setColor(PhabricatorTransactions::COLOR_GREEN);
|
->setColor(PhabricatorTransactions::COLOR_GREEN);
|
||||||
|
|
||||||
$events[] = id(new PHUITimelineEventView())
|
$events[] = id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setIcon('tag')
|
->setIcon('fa-tag')
|
||||||
->setTitle(str_repeat('Long Text Title ', 64))
|
->setTitle(str_repeat('Long Text Title ', 64))
|
||||||
->appendChild(str_repeat('Long Text Body ', 64))
|
->appendChild(str_repeat('Long Text Body ', 64))
|
||||||
->setColor(PhabricatorTransactions::COLOR_ORANGE);
|
->setColor(PhabricatorTransactions::COLOR_ORANGE);
|
||||||
|
@ -120,13 +121,13 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
$events[] = id(new PHUITimelineEventView())
|
$events[] = id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle('Colorless')
|
->setTitle('Colorless')
|
||||||
->setIcon('lock');
|
->setIcon('fa-lock');
|
||||||
|
|
||||||
foreach ($colors as $color) {
|
foreach ($colors as $color) {
|
||||||
$events[] = id(new PHUITimelineEventView())
|
$events[] = id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle("Color '{$color}'")
|
->setTitle("Color '{$color}'")
|
||||||
->setIcon('lock')
|
->setIcon('fa-paw')
|
||||||
->setColor($color);
|
->setColor($color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,21 +142,21 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle(pht('%s bought an apple.', $vhandle))
|
->setTitle(pht('%s bought an apple.', $vhandle))
|
||||||
->setColor('green')
|
->setColor('green')
|
||||||
->setIcon('check'));
|
->setIcon('fa-apple'));
|
||||||
|
|
||||||
$group_event->addEventToGroup(
|
$group_event->addEventToGroup(
|
||||||
id(new PHUITimelineEventView())
|
id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle(pht('%s bought a banana.', $vhandle))
|
->setTitle(pht('%s bought a banana.', $vhandle))
|
||||||
->setColor('yellow')
|
->setColor('yellow')
|
||||||
->setIcon('check'));
|
->setIcon('fa-check'));
|
||||||
|
|
||||||
$group_event->addEventToGroup(
|
$group_event->addEventToGroup(
|
||||||
id(new PHUITimelineEventView())
|
id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle(pht('%s bought a cherry.', $vhandle))
|
->setTitle(pht('%s bought a cherry.', $vhandle))
|
||||||
->setColor('red')
|
->setColor('red')
|
||||||
->setIcon('check'));
|
->setIcon('fa-check'));
|
||||||
|
|
||||||
$group_event->addEventToGroup(
|
$group_event->addEventToGroup(
|
||||||
id(new PHUITimelineEventView())
|
id(new PHUITimelineEventView())
|
||||||
|
@ -166,7 +167,7 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
id(new PHUITimelineEventView())
|
id(new PHUITimelineEventView())
|
||||||
->setUserHandle($handle)
|
->setUserHandle($handle)
|
||||||
->setTitle(pht('%s returned home.', $vhandle))
|
->setTitle(pht('%s returned home.', $vhandle))
|
||||||
->setIcon('home')
|
->setIcon('fa-home')
|
||||||
->setColor('blue'));
|
->setColor('blue'));
|
||||||
|
|
||||||
$group_event->addEventToGroup(
|
$group_event->addEventToGroup(
|
||||||
|
|
|
@ -23,6 +23,7 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
private $tokenRemoved;
|
private $tokenRemoved;
|
||||||
private $quoteTargetID;
|
private $quoteTargetID;
|
||||||
private $quoteRef;
|
private $quoteRef;
|
||||||
|
private $reallyMajorEvent;
|
||||||
|
|
||||||
public function setQuoteRef($quote_ref) {
|
public function setQuoteRef($quote_ref) {
|
||||||
$this->quoteRef = $quote_ref;
|
$this->quoteRef = $quote_ref;
|
||||||
|
@ -148,6 +149,11 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setReallyMajorEvent($me) {
|
||||||
|
$this->reallyMajorEvent = $me;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setToken($token, $removed = false) {
|
public function setToken($token, $removed = false) {
|
||||||
$this->token = $token;
|
$this->token = $token;
|
||||||
$this->tokenRemoved = $removed;
|
$this->tokenRemoved = $removed;
|
||||||
|
@ -401,20 +407,33 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return javelin_tag(
|
$major_event = null;
|
||||||
'div',
|
if ($this->reallyMajorEvent) {
|
||||||
array(
|
$major_event = phutil_tag(
|
||||||
'class' => implode(' ', $outer_classes),
|
|
||||||
'id' => $this->anchor ? 'anchor-'.$this->anchor : null,
|
|
||||||
'sigil' => $sigil,
|
|
||||||
'meta' => $meta,
|
|
||||||
),
|
|
||||||
phutil_tag(
|
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => implode(' ', $classes),
|
'class' => 'phui-timeline-event-view '.
|
||||||
|
'phui-timeline-spacer '.
|
||||||
|
'phui-timeline-spacer-bold',
|
||||||
|
'',));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
javelin_tag(
|
||||||
|
'div',
|
||||||
|
array(
|
||||||
|
'class' => implode(' ', $outer_classes),
|
||||||
|
'id' => $this->anchor ? 'anchor-'.$this->anchor : null,
|
||||||
|
'sigil' => $sigil,
|
||||||
|
'meta' => $meta,
|
||||||
),
|
),
|
||||||
$content));
|
phutil_tag(
|
||||||
|
'div',
|
||||||
|
array(
|
||||||
|
'class' => implode(' ', $classes),
|
||||||
|
),
|
||||||
|
$content)),
|
||||||
|
$major_event,);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderExtra(array $events) {
|
private function renderExtra(array $events) {
|
||||||
|
|
|
@ -187,6 +187,15 @@
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phui-timeline-spacer.phui-timeline-spacer-bold {
|
||||||
|
border-bottom: 4px solid {$lightblueborder};
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-timeline-spacer-bold + .phui-timeline-spacer {
|
||||||
|
background-color: #ebecee;
|
||||||
|
}
|
||||||
|
|
||||||
.phui-timeline-icon-fill {
|
.phui-timeline-icon-fill {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
|
|
Loading…
Reference in a new issue