Skip to content

Commit 7d7deaf

Browse files
committed
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
1 parent d9adedd commit 7d7deaf

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

resources/celerity/map.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
354354
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
355355
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0324970d',
356-
'rsrc/js/application/conpherence/behavior-durable-column.js' => '44100dc7',
356+
'rsrc/js/application/conpherence/behavior-durable-column.js' => '64fc1053',
357357
'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295',
358358
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
359359
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
@@ -585,7 +585,7 @@
585585
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
586586
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
587587
'javelin-behavior-doorkeeper-tag' => 'e5822781',
588-
'javelin-behavior-durable-column' => '44100dc7',
588+
'javelin-behavior-durable-column' => '64fc1053',
589589
'javelin-behavior-error-log' => '6882e80a',
590590
'javelin-behavior-fancy-datepicker' => 'c51ae228',
591591
'javelin-behavior-global-drag-and-drop' => '07f199d8',
@@ -1110,15 +1110,6 @@
11101110
'javelin-dom',
11111111
'javelin-request',
11121112
),
1113-
'44100dc7' => array(
1114-
'javelin-behavior',
1115-
'javelin-dom',
1116-
'javelin-stratcom',
1117-
'javelin-scrollbar',
1118-
'javelin-quicksand',
1119-
'phabricator-keyboard-shortcut',
1120-
'conpherence-thread-manager',
1121-
),
11221113
'44168bad' => array(
11231114
'javelin-behavior',
11241115
'javelin-dom',
@@ -1266,6 +1257,15 @@
12661257
'javelin-dom',
12671258
'javelin-fx',
12681259
),
1260+
'64fc1053' => array(
1261+
'javelin-behavior',
1262+
'javelin-dom',
1263+
'javelin-stratcom',
1264+
'javelin-scrollbar',
1265+
'javelin-quicksand',
1266+
'phabricator-keyboard-shortcut',
1267+
'conpherence-thread-manager',
1268+
),
12691269
'6882e80a' => array(
12701270
'javelin-dom',
12711271
),

src/applications/conpherence/view/ConpherenceDurableColumnView.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
77
private $selectedConpherence;
88
private $transactions;
99
private $visible;
10+
private $initialLoad = false;
1011

1112
public function setConpherences(array $conpherences) {
1213
assert_instances_of($conpherences, 'ConpherenceThread');
@@ -56,24 +57,36 @@ public function getVisible() {
5657
return $this->visible;
5758
}
5859

60+
public function setInitialLoad($bool) {
61+
$this->initialLoad = $bool;
62+
return $this;
63+
}
64+
65+
public function getInitialLoad() {
66+
return $this->initialLoad;
67+
}
68+
5969
protected function getTagAttributes() {
6070
if ($this->getVisible()) {
6171
$style = null;
6272
} else {
6373
$style = 'display: none;';
6474
}
75+
$classes = array('conpherence-durable-column');
76+
if ($this->getInitialLoad()) {
77+
$classes[] = 'loading';
78+
}
6579

6680
return array(
6781
'id' => 'conpherence-durable-column',
68-
'class' => 'conpherence-durable-column',
82+
'class' => implode(' ', $classes),
6983
'style' => $style,
7084
'sigil' => 'conpherence-durable-column',
7185
);
7286
}
7387

7488
protected function getTagContent() {
7589
$column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN;
76-
require_celerity_resource('conpherence-durable-column-view');
7790
require_celerity_resource('font-source-sans-pro');
7891

7992
Javelin::initBehavior(
@@ -317,7 +330,7 @@ private function getHeaderActionsConfig(ConpherenceThread $conpherence) {
317330
private function buildTransactions() {
318331
$conpherence = $this->getSelectedConpherence();
319332
if (!$conpherence) {
320-
if (!$this->getVisible()) {
333+
if (!$this->getVisible() || $this->getInitialLoad()) {
321334
return pht('Loading...');
322335
}
323336
return array(

src/view/page/PhabricatorStandardPageView.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ protected function willRenderPage() {
160160
require_celerity_resource('phui-form-css');
161161
require_celerity_resource('sprite-gradient-css');
162162
require_celerity_resource('phabricator-standard-page-view');
163+
require_celerity_resource('conpherence-durable-column-view');
163164

164165
Javelin::initBehavior('workflow', array());
165166

@@ -420,7 +421,8 @@ protected function getBody() {
420421
$durable_column = id(new ConpherenceDurableColumnView())
421422
->setSelectedConpherence(null)
422423
->setUser($user)
423-
->setVisible($is_visible);
424+
->setVisible($is_visible)
425+
->setInitialLoad(true);
424426
}
425427

426428
Javelin::initBehavior('quicksand-blacklist', array(

0 commit comments

Comments
 (0)