1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Conpherence - fix "pop in" effect

Summary: Ref T7014. This got broken in today's action. For whatever reason the only way I can get the CSS to show up correctly is to move the require statement to where it was before rP5ef99dba2afc9f9ed3ca77707366a78be15f4871. Otherwise, this feature massages the UI a bit to make sure the "loading" stuff is set correctly in this state.

Test Plan: toggled conpherence open and it looked good. reloaded and it looked good.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7014

Differential Revision: https://secure.phabricator.com/D12047
This commit is contained in:
Bob Trahan 2015-03-11 16:20:13 -07:00
parent d9adedd9d6
commit 7d7deaf698
3 changed files with 30 additions and 15 deletions

View file

@ -353,7 +353,7 @@ return array(
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0324970d',
'rsrc/js/application/conpherence/behavior-durable-column.js' => '44100dc7',
'rsrc/js/application/conpherence/behavior-durable-column.js' => '64fc1053',
'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
@ -585,7 +585,7 @@ return array(
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
'javelin-behavior-durable-column' => '44100dc7',
'javelin-behavior-durable-column' => '64fc1053',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => '07f199d8',
@ -1110,15 +1110,6 @@ return array(
'javelin-dom',
'javelin-request',
),
'44100dc7' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'44168bad' => array(
'javelin-behavior',
'javelin-dom',
@ -1266,6 +1257,15 @@ return array(
'javelin-dom',
'javelin-fx',
),
'64fc1053' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'6882e80a' => array(
'javelin-dom',
),

View file

@ -7,6 +7,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
private $selectedConpherence;
private $transactions;
private $visible;
private $initialLoad = false;
public function setConpherences(array $conpherences) {
assert_instances_of($conpherences, 'ConpherenceThread');
@ -56,16 +57,29 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
return $this->visible;
}
public function setInitialLoad($bool) {
$this->initialLoad = $bool;
return $this;
}
public function getInitialLoad() {
return $this->initialLoad;
}
protected function getTagAttributes() {
if ($this->getVisible()) {
$style = null;
} else {
$style = 'display: none;';
}
$classes = array('conpherence-durable-column');
if ($this->getInitialLoad()) {
$classes[] = 'loading';
}
return array(
'id' => 'conpherence-durable-column',
'class' => 'conpherence-durable-column',
'class' => implode(' ', $classes),
'style' => $style,
'sigil' => 'conpherence-durable-column',
);
@ -73,7 +87,6 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
protected function getTagContent() {
$column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN;
require_celerity_resource('conpherence-durable-column-view');
require_celerity_resource('font-source-sans-pro');
Javelin::initBehavior(
@ -317,7 +330,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
private function buildTransactions() {
$conpherence = $this->getSelectedConpherence();
if (!$conpherence) {
if (!$this->getVisible()) {
if (!$this->getVisible() || $this->getInitialLoad()) {
return pht('Loading...');
}
return array(

View file

@ -160,6 +160,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
require_celerity_resource('phui-form-css');
require_celerity_resource('sprite-gradient-css');
require_celerity_resource('phabricator-standard-page-view');
require_celerity_resource('conpherence-durable-column-view');
Javelin::initBehavior('workflow', array());
@ -420,7 +421,8 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
$durable_column = id(new ConpherenceDurableColumnView())
->setSelectedConpherence(null)
->setUser($user)
->setVisible($is_visible);
->setVisible($is_visible)
->setInitialLoad(true);
}
Javelin::initBehavior('quicksand-blacklist', array(