@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When you make the file tree huge, scroll to the right, and then toggle it, stop it from growing

Summary: Depends on D19346. Ref PHI568. I love Javascript.

Test Plan:
- Viewed a revision.
- Dragged file tree view really wide.
- Scrolled document to the right.
- Toggled file tree off and on by pressing "f" twice.
- Before patch: file tree grew wider and wider after it was toggled.
- After patch: file tree stayed the same size after it was toggled.
- Dragged to various widths and reloaded to make sure the "sticky across reloads" behavior still works.
- Scrolled right, dragged the tree a bit, then reloaded and didn't see it flip out.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19347

+25 -16
+13 -13
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => '15191c65', 12 12 'core.pkg.css' => '39061f68', 13 - 'core.pkg.js' => '1ea38af8', 13 + 'core.pkg.js' => 'e1f0f7bd', 14 14 'differential.pkg.css' => '06dc617c', 15 15 'differential.pkg.js' => 'c2ca903a', 16 16 'diffusion.pkg.css' => 'a2d17c7d', ··· 475 475 'rsrc/js/core/behavior-more.js' => 'a80d0378', 476 476 'rsrc/js/core/behavior-object-selector.js' => '77c1f0b0', 477 477 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', 478 - 'rsrc/js/core/behavior-phabricator-nav.js' => '836f966d', 478 + 'rsrc/js/core/behavior-phabricator-nav.js' => '94b7c320', 479 479 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'acd29eee', 480 480 'rsrc/js/core/behavior-read-only-warning.js' => 'ba158207', 481 481 'rsrc/js/core/behavior-redirect.js' => '0213259f', ··· 635 635 'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0', 636 636 'javelin-behavior-phabricator-keyboard-shortcuts' => '01fca1f0', 637 637 'javelin-behavior-phabricator-line-linker' => '1e017314', 638 - 'javelin-behavior-phabricator-nav' => '836f966d', 638 + 'javelin-behavior-phabricator-nav' => '94b7c320', 639 639 'javelin-behavior-phabricator-notification-example' => '8ce821c5', 640 640 'javelin-behavior-phabricator-object-selector' => '77c1f0b0', 641 641 'javelin-behavior-phabricator-oncopy' => '2926fff2', ··· 1547 1547 'javelin-behavior', 1548 1548 'javelin-scrollbar', 1549 1549 ), 1550 - '836f966d' => array( 1551 - 'javelin-behavior', 1552 - 'javelin-behavior-device', 1553 - 'javelin-stratcom', 1554 - 'javelin-dom', 1555 - 'javelin-magical-init', 1556 - 'javelin-vector', 1557 - 'javelin-request', 1558 - 'javelin-util', 1559 - ), 1560 1550 '8499b6ab' => array( 1561 1551 'javelin-behavior', 1562 1552 'javelin-dom', ··· 1657 1647 'javelin-dom', 1658 1648 'javelin-resource', 1659 1649 'javelin-routable', 1650 + ), 1651 + '94b7c320' => array( 1652 + 'javelin-behavior', 1653 + 'javelin-behavior-device', 1654 + 'javelin-stratcom', 1655 + 'javelin-dom', 1656 + 'javelin-magical-init', 1657 + 'javelin-vector', 1658 + 'javelin-request', 1659 + 'javelin-util', 1660 1660 ), 1661 1661 '960f6a39' => array( 1662 1662 'javelin-behavior',
+12 -3
webroot/rsrc/js/core/behavior-phabricator-nav.js
··· 49 49 { 50 50 element: drag, 51 51 parameter: 'left', 52 - start: JX.$V(drag).x 52 + start: get_width() 53 53 }, 54 54 { 55 55 element: content, ··· 102 102 .setData( 103 103 { 104 104 key: 'filetree.width', 105 - value: JX.$V(drag).x 105 + value: get_width() 106 106 }) 107 107 .send(); 108 108 }); 109 109 110 + function get_width() { 111 + // See PHI568. If the document has scrolled horizontally, the "x" position 112 + // of the bar will be the actual width of the menu plus the horizontal 113 + // scroll position (because the element is "position: fixed"). Subtract the 114 + // document scroll position when saving the element width so that scrolling 115 + // to the right and then toggling the filetree UI does not make it grow 116 + // any wider. 117 + return (JX.$V(drag).x - JX.Vector.getScroll().x); 118 + } 110 119 111 120 var saved_width = config.width; 112 121 function savedrag() { 113 - saved_width = JX.$V(drag).x; 122 + saved_width = get_width(); 114 123 115 124 local.style.width = ''; 116 125 drag.style.left = '';