From 3c0da816196741ec790fa15878fc5623dcae767a Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 16 May 2017 06:59:32 -0700 Subject: [PATCH] When the Differential filetree is toggled, resize the keyboard reticle properly Summary: Ref T9270. Ref T12634. Emit a resize event after toggling the filetree so that things can recalculate layout. This just does the keyboard reticle, not the mouse/edit reticle. Test Plan: - Used "n" to select a block. - Used "f" to toggle the filetree. - Saw reticle resize properly. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12634, T9270 Differential Revision: https://secure.phabricator.com/D17902 --- resources/celerity/map.php | 20 +++++++++---------- .../rsrc/js/core/behavior-phabricator-nav.js | 4 ++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index ab3628f264..c662ac7c88 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -10,7 +10,7 @@ return array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', 'core.pkg.css' => 'ee5f28cd', - 'core.pkg.js' => '115cb4da', + 'core.pkg.js' => '8c5f913d', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '58712637', 'differential.pkg.js' => '14ef6888', @@ -506,7 +506,7 @@ return array( 'rsrc/js/core/behavior-more.js' => 'a80d0378', 'rsrc/js/core/behavior-object-selector.js' => 'e0ec7f2f', 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', - 'rsrc/js/core/behavior-phabricator-nav.js' => '08675c6d', + 'rsrc/js/core/behavior-phabricator-nav.js' => '08163386', 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'acd29eee', 'rsrc/js/core/behavior-read-only-warning.js' => 'ba158207', 'rsrc/js/core/behavior-refresh-csrf.js' => 'ab2f381b', @@ -664,7 +664,7 @@ return array( 'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0', 'javelin-behavior-phabricator-keyboard-shortcuts' => '01fca1f0', 'javelin-behavior-phabricator-line-linker' => '1499a8cb', - 'javelin-behavior-phabricator-nav' => '08675c6d', + 'javelin-behavior-phabricator-nav' => '08163386', 'javelin-behavior-phabricator-notification-example' => '8ce821c5', 'javelin-behavior-phabricator-object-selector' => 'e0ec7f2f', 'javelin-behavior-phabricator-oncopy' => '2926fff2', @@ -955,13 +955,7 @@ return array( 'javelin-stratcom', 'javelin-workflow', ), - '0825c27a' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-util', - ), - '08675c6d' => array( + '08163386' => array( 'javelin-behavior', 'javelin-behavior-device', 'javelin-stratcom', @@ -971,6 +965,12 @@ return array( 'javelin-request', 'javelin-util', ), + '0825c27a' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-util', + ), '087e919c' => array( 'javelin-install', 'javelin-dom', diff --git a/webroot/rsrc/js/core/behavior-phabricator-nav.js b/webroot/rsrc/js/core/behavior-phabricator-nav.js index ca7fc0d14a..cd132550a8 100644 --- a/webroot/rsrc/js/core/behavior-phabricator-nav.js +++ b/webroot/rsrc/js/core/behavior-phabricator-nav.js @@ -113,6 +113,10 @@ JX.behavior('phabricator-nav', function(config) { new JX.Request('/settings/adjust/', JX.bag) .setData({ key : 'nav-collapsed', value : (collapsed ? 1 : 0) }) .send(); + + // Invoke a resize event so page elements can redraw if they need to. One + // example is the selection reticles in Differential. + JX.Stratcom.invoke('resize'); });