From aba7d1406ac804806d2d7b2819ce0ff9ea48f059 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 25 Apr 2019 11:57:55 -0700 Subject: [PATCH] Really fix movable panels inside tab panels by changing the JX.Request serializer Summary: Depends on D20475. Ref T13272. Currently, if you `JX.Request` with `data` like `{x: null}`, we submit that as `?x=null`, i.e. as though `null` was the string `"null"`. This is weird and almost certainly never intended/desiarable. In particular, it causes a bug where panels embedded inside tab panels are incorrectly draggable. It's possible this breaks something which relied on the buggy behavior, but that seems unlikely. Test Plan: Tried to drag a panel inside a tab panel, it really truly didn't work. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13272 Differential Revision: https://secure.phabricator.com/D20476 --- resources/celerity/map.php | 26 +++++++++---------- webroot/rsrc/externals/javelin/lib/Request.js | 5 ++++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 71384aae9f..6184c2c7ae 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -10,7 +10,7 @@ return array( 'conpherence.pkg.css' => '3c8a0668', 'conpherence.pkg.js' => '020aebcf', 'core.pkg.css' => '3dc188c0', - 'core.pkg.js' => '9ac8af68', + 'core.pkg.js' => 'ee320ca2', 'differential.pkg.css' => '8d8360fb', 'differential.pkg.js' => '67e02996', 'diffusion.pkg.css' => '42c75c37', @@ -244,7 +244,7 @@ return array( 'rsrc/externals/javelin/lib/Leader.js' => '0d2490ce', 'rsrc/externals/javelin/lib/Mask.js' => '7c4d8998', 'rsrc/externals/javelin/lib/Quicksand.js' => 'd3799cb4', - 'rsrc/externals/javelin/lib/Request.js' => '91863989', + 'rsrc/externals/javelin/lib/Request.js' => '84e6891f', 'rsrc/externals/javelin/lib/Resource.js' => '740956e1', 'rsrc/externals/javelin/lib/Routable.js' => '6a18c42e', 'rsrc/externals/javelin/lib/Router.js' => '32755edb', @@ -717,7 +717,7 @@ return array( 'javelin-reactor-dom' => '6cfa0008', 'javelin-reactor-node-calmer' => '225bbb98', 'javelin-reactornode' => '72960bc1', - 'javelin-request' => '91863989', + 'javelin-request' => '84e6891f', 'javelin-resource' => '740956e1', 'javelin-routable' => '6a18c42e', 'javelin-router' => '32755edb', @@ -1595,6 +1595,16 @@ return array( 'javelin-dom', 'javelin-vector', ), + '84e6891f' => array( + 'javelin-install', + 'javelin-stratcom', + 'javelin-util', + 'javelin-behavior', + 'javelin-json', + 'javelin-dom', + 'javelin-resource', + 'javelin-routable', + ), '87428eb2' => array( 'javelin-behavior', 'javelin-diffusion-locate-file-source', @@ -1651,16 +1661,6 @@ return array( 'javelin-workflow', 'javelin-stratcom', ), - 91863989 => array( - 'javelin-install', - 'javelin-stratcom', - 'javelin-util', - 'javelin-behavior', - 'javelin-json', - 'javelin-dom', - 'javelin-resource', - 'javelin-routable', - ), '91befbcc' => array( 'javelin-behavior', 'javelin-dom', diff --git a/webroot/rsrc/externals/javelin/lib/Request.js b/webroot/rsrc/externals/javelin/lib/Request.js index 50e044b038..6cdf5132ad 100644 --- a/webroot/rsrc/externals/javelin/lib/Request.js +++ b/webroot/rsrc/externals/javelin/lib/Request.js @@ -393,6 +393,11 @@ JX.install('Request', { var uri = []; for (var ii = 0; ii < list_of_pairs.length; ii++) { var pair = list_of_pairs[ii]; + + if (pair[1] === null) { + continue; + } + var name = encodeURIComponent(pair[0]); var value = encodeURIComponent(pair[1]); uri.push(name + '=' + value);