From 636eaf231ec4526f67cb10f04ef0a111457a0b9b Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 13 Oct 2016 19:48:41 -0700 Subject: [PATCH] Only show loading animation on thread change in Conpherence Summary: Fixes the send on enter flash, only uses the `Threads` loading animation on changing threads, not sending a message. Test Plan: Change threads, post a message. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D16705 --- resources/celerity/map.php | 34 +++++++++---------- .../application/conpherence/behavior-menu.js | 12 +++---- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index b012c7904e..5094fb88e9 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -8,7 +8,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'c839a862', - 'conpherence.pkg.js' => 'b18c9dc5', + 'conpherence.pkg.js' => 'cbe4d9be', 'core.pkg.css' => 'b99bbf5e', 'core.pkg.js' => '30185d95', 'darkconsole.pkg.js' => 'e7393ebb', @@ -438,7 +438,7 @@ return array( 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '3bc9d2b1', 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c5238acb', - 'rsrc/js/application/conpherence/behavior-menu.js' => '0f82ba76', + 'rsrc/js/application/conpherence/behavior-menu.js' => '07928ca3', 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', 'rsrc/js/application/conpherence/behavior-pontificate.js' => 'f2e58483', 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', @@ -663,7 +663,7 @@ return array( 'javelin-behavior-choose-control' => '327a00d1', 'javelin-behavior-comment-actions' => '0300eae6', 'javelin-behavior-config-reorder-fields' => 'b6993408', - 'javelin-behavior-conpherence-menu' => '0f82ba76', + 'javelin-behavior-conpherence-menu' => '07928ca3', 'javelin-behavior-conpherence-participant-pane' => '8604caa8', 'javelin-behavior-conpherence-pontificate' => 'f2e58483', 'javelin-behavior-conpherence-search' => '3bc9d2b1', @@ -1040,6 +1040,20 @@ return array( 'phabricator-prefab', 'phuix-icon-view', ), + '07928ca3' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-behavior-device', + 'javelin-history', + 'javelin-vector', + 'javelin-scrollbar', + 'phabricator-title', + 'phabricator-shaped-request', + 'conpherence-thread-manager', + ), '08675c6d' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -1072,20 +1086,6 @@ return array( 'javelin-install', 'javelin-util', ), - '0f82ba76' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-behavior-device', - 'javelin-history', - 'javelin-vector', - 'javelin-scrollbar', - 'phabricator-title', - 'phabricator-shaped-request', - 'conpherence-thread-manager', - ), '116cf19b' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/webroot/rsrc/js/application/conpherence/behavior-menu.js b/webroot/rsrc/js/application/conpherence/behavior-menu.js index 97d232329e..844a6891f2 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-menu.js +++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js @@ -32,7 +32,7 @@ JX.behavior('conpherence-menu', function(config) { return scrollbar.getContentNode(); }); threadManager.setWillLoadThreadCallback(function() { - markThreadLoading(true); + markThreadsLoading(true); }); threadManager.setDidLoadThreadCallback(function(r) { var header = JX.$H(r.header); @@ -48,7 +48,7 @@ JX.behavior('conpherence-menu', function(config) { JX.DOM.setContent(scrollbar.getContentNode(), messages); JX.DOM.setContent(form_root, form); - markThreadLoading(false); + markThreadsLoading(false); didRedrawThread(true); }); @@ -207,15 +207,11 @@ JX.behavior('conpherence-menu', function(config) { } function markThreadsLoading(loading) { - var root = JX.DOM.find(document, 'div', 'conpherence-layout'); - var menu = JX.DOM.find(root, 'div', 'conpherence-menu-pane'); - JX.DOM.alterClass(menu, 'loading', loading); + var root = JX.$('conpherence-main-layout'); + JX.DOM.alterClass(root, 'loading', loading); } function markThreadLoading(loading) { - var root = JX.$('conpherence-main-layout'); - JX.DOM.alterClass(root, 'loading', loading); - try { var textarea = JX.DOM.find(form, 'textarea'); textarea.disabled = loading;