1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Clean up nux state with durable column

Summary: Remove policy icons from durable column, create a basic nux layout and style.

Test Plan: leave all rooms, pop open chat, see helpful text and button.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16655
This commit is contained in:
Chad Little 2016-10-03 10:32:43 -07:00
parent c7a6cfd87c
commit 1d00bc9180
3 changed files with 33 additions and 47 deletions

View file

@ -7,7 +7,7 @@
*/ */
return array( return array(
'names' => array( 'names' => array(
'conpherence.pkg.css' => '5f3eb99c', 'conpherence.pkg.css' => '1bc6cd0d',
'conpherence.pkg.js' => '11f3e07e', 'conpherence.pkg.js' => '11f3e07e',
'core.pkg.css' => '3fa66cb3', 'core.pkg.css' => '3fa66cb3',
'core.pkg.js' => '30185d95', 'core.pkg.js' => '30185d95',
@ -46,7 +46,7 @@ return array(
'rsrc/css/application/config/config-template.css' => '8f18fa41', 'rsrc/css/application/config/config-template.css' => '8f18fa41',
'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3',
'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a',
'rsrc/css/application/conpherence/durable-column.css' => '6127de1b', 'rsrc/css/application/conpherence/durable-column.css' => '44bcaa19',
'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe',
'rsrc/css/application/conpherence/menu.css' => '78c7b811', 'rsrc/css/application/conpherence/menu.css' => '78c7b811',
'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02', 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02',
@ -618,7 +618,7 @@ return array(
'conduit-api-css' => '7bc725c4', 'conduit-api-css' => '7bc725c4',
'config-options-css' => '0ede4c9b', 'config-options-css' => '0ede4c9b',
'config-page-css' => '8798e14f', 'config-page-css' => '8798e14f',
'conpherence-durable-column-view' => '6127de1b', 'conpherence-durable-column-view' => '44bcaa19',
'conpherence-header-pane-css' => '517de9fe', 'conpherence-header-pane-css' => '517de9fe',
'conpherence-menu-css' => '78c7b811', 'conpherence-menu-css' => '78c7b811',
'conpherence-message-pane-css' => '0d7dff02', 'conpherence-message-pane-css' => '0d7dff02',

View file

@ -150,13 +150,14 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
$icon_bar = null; $icon_bar = null;
if ($this->conpherences) { if ($this->conpherences) {
$icon_bar = phutil_tag( $icon_bar = $this->buildIconBar();
'div',
array(
'class' => 'conpherence-durable-column-icon-bar',
),
$this->buildIconBar());
} }
$icon_bar = phutil_tag(
'div',
array(
'class' => 'conpherence-durable-column-icon-bar',
),
$icon_bar);
$transactions = $this->buildTransactions(); $transactions = $this->buildTransactions();
@ -198,19 +199,6 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
); );
} }
private function getPolicyIcon(
ConpherenceThread $conpherence,
array $policy_objects) {
assert_instances_of($policy_objects, 'PhabricatorPolicy');
$icon = $conpherence->getPolicyIconName($policy_objects);
$icon = id(new PHUIIconView())
->addClass('mmr')
->setIcon($icon);
return $icon;
}
private function buildIconBar() { private function buildIconBar() {
$icons = array(); $icons = array();
$selected_conpherence = $this->getSelectedConpherence(); $selected_conpherence = $this->getSelectedConpherence();
@ -222,12 +210,10 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
$classes[] = 'selected'; $classes[] = 'selected';
} }
$data = $conpherence->getDisplayData($this->getUser()); $data = $conpherence->getDisplayData($this->getUser());
$icon = $this->getPolicyIcon($conpherence, $this->getPolicyObjects());
$thread_title = phutil_tag( $thread_title = phutil_tag(
'span', 'span',
array(), array(),
array( array(
$icon,
$data['title'], $data['title'],
)); ));
$image = $data['image']; $image = $data['image'];
@ -324,17 +310,18 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
->addMenuItem($minimize) ->addMenuItem($minimize)
->addClass('phabricator-application-menu'); ->addClass('phabricator-application-menu');
$header = null;
if ($conpherence) { if ($conpherence) {
$data = $conpherence->getDisplayData($this->getUser()); $data = $conpherence->getDisplayData($this->getUser());
$header = phutil_tag( $header = phutil_tag(
'span', 'span',
array(), array(),
array( $data['title']);
$this->getPolicyIcon($conpherence, $this->getPolicyObjects()), } else {
$data['title'], $header = phutil_tag(
)); 'span',
} array(),
pht('Conpherence'));
}
$status = new PhabricatorNotificationStatusView(); $status = new PhabricatorNotificationStatusView();
@ -406,22 +393,22 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
if (!$this->getVisible() || $this->getInitialLoad()) { if (!$this->getVisible() || $this->getInitialLoad()) {
return pht('Loading...'); return pht('Loading...');
} }
return array( $view = array(
phutil_tag( phutil_tag(
'div', 'div',
array( array(
'class' => 'mmb', 'class' => 'column-no-rooms-text',
), ),
pht('You are not in any rooms yet.')), pht('You have not joined any rooms yet.')),
javelin_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/conpherence/new/', 'href' => '/conpherence/search/',
'class' => 'button grey', 'class' => 'button grey',
'sigil' => 'workflow',
), ),
pht('Create a Room')), pht('Find Rooms')),
); );
return phutil_tag_div('column-no-rooms', $view);
} }
$data = ConpherenceTransactionRenderer::renderTransactions( $data = ConpherenceTransactionRenderer::renderTransactions(

View file

@ -118,11 +118,6 @@
padding: 10px 8px 10px 8px; padding: 10px 8px 10px 8px;
} }
.conpherence-durable-column-header-text .phui-icon-view {
color: #fff;
text-shadow: 1px 1px 0 rgba(0,0,0,.6);
}
.conpherence-durable-column-icon-bar { .conpherence-durable-column-icon-bar {
width: 36px; width: 36px;
background-color: {$lightgreybackground}; background-color: {$lightgreybackground};
@ -171,6 +166,16 @@
overflow-x: hidden; overflow-x: hidden;
} }
.conpherence-durable-column .column-no-rooms {
padding: 12px 8px;
}
.conpherence-durable-column .column-no-rooms-text {
color: {$greytext};
font-style: italic;
margin-bottom: 16px;
}
.conpherence-durable-column-transactions { .conpherence-durable-column-transactions {
padding: 8px 12px 0; padding: 8px 12px 0;
} }
@ -318,12 +323,6 @@ img {
text-shadow: none; text-shadow: none;
} }
.minimize-column .conpherence-durable-column
.conpherence-durable-column-header-text .phui-icon-view {
color: {$darkbluetext};
text-shadow: none;
}
.minimize-column .conpherence-durable-column .minimize-column .conpherence-durable-column
.conpherence-durable-column-header .phabricator-application-menu .conpherence-durable-column-header .phabricator-application-menu
.phui-list-item-icon.phui-font-fa { .phui-list-item-icon.phui-font-fa {