@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.

Hide the Differential scroll objective list on trackpad systems

Summary:
Ref T12733. In the longer run I'd like to just push this out from the edge, but that currently gets us into trouble since we start bumping into content. On my system, the trackpad scrollbar also expands in size when moused over, so the minimum number of pixels we need to push it out is approximatley 15px. This hits body content and the persistent chat.

For now, just disable this element on trackpad systems.

Test Plan:
Disconnected all USB peripherals, quit and relaunched Safari, saw no objective list.

Reconnected mouse, relaunched Safari, saw objective list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

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

+39 -27
+24 -23
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => 'ff161f2d', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 12 'core.pkg.css' => '5ffe8b79', 13 - 'core.pkg.js' => 'e822b496', 13 + 'core.pkg.js' => '6b2da600', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 - 'differential.pkg.css' => '4d7dd14e', 16 - 'differential.pkg.js' => '0dfe037d', 15 + 'differential.pkg.css' => 'bf87589e', 16 + 'differential.pkg.js' => 'ee4f14c5', 17 17 'diffusion.pkg.css' => 'b93d9b8c', 18 18 'diffusion.pkg.js' => '84c8f8fd', 19 19 'favicon.ico' => '30672e08', ··· 64 64 'rsrc/css/application/dashboard/dashboard.css' => 'fe5b1869', 65 65 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 66 66 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', 67 - 'rsrc/css/application/differential/changeset-view.css' => '54774a28', 67 + 'rsrc/css/application/differential/changeset-view.css' => 'fa476ec0', 68 68 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 69 69 'rsrc/css/application/differential/phui-inline-comment.css' => 'ffd1a542', 70 70 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', ··· 247 247 'rsrc/externals/javelin/lib/Resource.js' => '44959b73', 248 248 'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692', 249 249 'rsrc/externals/javelin/lib/Router.js' => '29274e2b', 250 - 'rsrc/externals/javelin/lib/Scrollbar.js' => '087e919c', 250 + 'rsrc/externals/javelin/lib/Scrollbar.js' => '9065f639', 251 251 'rsrc/externals/javelin/lib/Sound.js' => '949c0fe5', 252 252 'rsrc/externals/javelin/lib/URI.js' => 'c989ade3', 253 253 'rsrc/externals/javelin/lib/Vector.js' => '2caa8fb8', ··· 394 394 'rsrc/js/application/diff/DiffChangesetList.js' => 'a716ca27', 395 395 'rsrc/js/application/diff/DiffInline.js' => '77e14b60', 396 396 'rsrc/js/application/diff/ScrollObjective.js' => '0eee7a00', 397 - 'rsrc/js/application/diff/ScrollObjectiveList.js' => '1ca4d9db', 397 + 'rsrc/js/application/diff/ScrollObjectiveList.js' => '085dd101', 398 398 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 399 399 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', 400 400 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', ··· 567 567 'conpherence-thread-manager' => '4d863052', 568 568 'conpherence-transaction-css' => '85129c68', 569 569 'd3' => 'a11a5ff2', 570 - 'differential-changeset-view-css' => '54774a28', 570 + 'differential-changeset-view-css' => 'fa476ec0', 571 571 'differential-core-view-css' => '5b7b8ff4', 572 572 'differential-revision-add-comment-css' => 'c47f8c40', 573 573 'differential-revision-comment-css' => '14b8565a', ··· 732 732 'javelin-resource' => '44959b73', 733 733 'javelin-routable' => 'b3e7d692', 734 734 'javelin-router' => '29274e2b', 735 - 'javelin-scrollbar' => '087e919c', 735 + 'javelin-scrollbar' => '9065f639', 736 736 'javelin-sound' => '949c0fe5', 737 737 'javelin-stratcom' => '6ad39b6f', 738 738 'javelin-tokenizer' => '8d3bc1b2', ··· 800 800 'phabricator-prefab' => 'c5af80a2', 801 801 'phabricator-remarkup-css' => 'd1a5e11e', 802 802 'phabricator-scroll-objective' => '0eee7a00', 803 - 'phabricator-scroll-objective-list' => '1ca4d9db', 803 + 'phabricator-scroll-objective-list' => '085dd101', 804 804 'phabricator-search-results-css' => 'f87d23ad', 805 805 'phabricator-shaped-request' => '7cbe244b', 806 806 'phabricator-slowvote-css' => 'a94b7230', ··· 956 956 'javelin-stratcom', 957 957 'javelin-util', 958 958 ), 959 - '087e919c' => array( 960 - 'javelin-install', 959 + '085dd101' => array( 961 960 'javelin-dom', 961 + 'javelin-util', 962 962 'javelin-stratcom', 963 - 'javelin-vector', 963 + 'javelin-install', 964 + 'javelin-workflow', 965 + 'javelin-scrollbar', 966 + 'phabricator-scroll-objective', 964 967 ), 965 968 '08f4ccc3' => array( 966 969 'phui-oi-list-view-css', ··· 1033 1036 'javelin-vector', 1034 1037 'javelin-request', 1035 1038 'javelin-uri', 1036 - ), 1037 - '1ca4d9db' => array( 1038 - 'javelin-dom', 1039 - 'javelin-util', 1040 - 'javelin-stratcom', 1041 - 'javelin-install', 1042 - 'javelin-workflow', 1043 - 'phabricator-scroll-objective', 1044 1039 ), 1045 1040 '1de8bf63' => array( 1046 1041 'javelin-behavior', ··· 1324 1319 '5294060f' => array( 1325 1320 'phui-theme-css', 1326 1321 ), 1327 - '54774a28' => array( 1328 - 'phui-inline-comment-view-css', 1329 - ), 1330 1322 '54b612ba' => array( 1331 1323 'javelin-color', 1332 1324 'javelin-install', ··· 1610 1602 'javelin-behavior', 1611 1603 'javelin-dom', 1612 1604 'javelin-request', 1605 + ), 1606 + '9065f639' => array( 1607 + 'javelin-install', 1608 + 'javelin-dom', 1609 + 'javelin-stratcom', 1610 + 'javelin-vector', 1613 1611 ), 1614 1612 '92b9ec77' => array( 1615 1613 'javelin-behavior', ··· 2207 2205 'javelin-view', 2208 2206 'javelin-install', 2209 2207 'javelin-dom', 2208 + ), 2209 + 'fa476ec0' => array( 2210 + 'phui-inline-comment-view-css', 2210 2211 ), 2211 2212 'fbe497e7' => array( 2212 2213 'javelin-behavior',
+5
webroot/rsrc/css/application/differential/changeset-view.css
··· 423 423 overflow: hidden; 424 424 } 425 425 426 + .scroll-objective-list.has-aesthetic-scrollbar { 427 + /* For now, hide this element on systems with aesthetic scrollbars. */ 428 + display: none; 429 + } 430 + 426 431 .scroll-objective { 427 432 display: block; 428 433 position: absolute;
+4 -4
webroot/rsrc/externals/javelin/lib/Scrollbar.js
··· 34 34 // width. If it doesn't, we're already in an environment with an aesthetic 35 35 // scrollbar (like Safari on OSX with no mouse connected, or an iPhone) 36 36 // and we don't need to do anything. 37 - if (JX.Scrollbar._getScrollbarControlWidth() === 0) { 37 + if (JX.Scrollbar.getScrollbarControlWidth() === 0) { 38 38 return; 39 39 } 40 40 ··· 104 104 /** 105 105 * Compute the width of the browser's scrollbar control, in pixels. 106 106 */ 107 - _getScrollbarControlWidth: function() { 107 + getScrollbarControlWidth: function() { 108 108 var self = JX.Scrollbar; 109 109 110 110 if (self._controlWidth === null) { ··· 140 140 141 141 // If this browser and OS don't render a real scrollbar control, we 142 142 // need to leave a margin. Generally, this is OSX with no mouse attached. 143 - if (self._getScrollbarControlWidth() === 0) { 143 + if (self.getScrollbarControlWidth() === 0) { 144 144 return 12; 145 145 } 146 146 ··· 357 357 */ 358 358 _resizeViewport: function() { 359 359 var fdim = JX.Vector.getDim(this._frame); 360 - fdim.x += JX.Scrollbar._getScrollbarControlWidth(); 360 + fdim.x += JX.Scrollbar.getScrollbarControlWidth(); 361 361 fdim.setDim(this._viewport); 362 362 }, 363 363
+6
webroot/rsrc/js/application/diff/ScrollObjectiveList.js
··· 5 5 * javelin-stratcom 6 6 * javelin-install 7 7 * javelin-workflow 8 + * javelin-scrollbar 8 9 * phabricator-scroll-objective 9 10 * @javelin 10 11 */ ··· 80 81 } 81 82 82 83 document.body.appendChild(node); 84 + 85 + // If we're on OSX without a mouse or some other system with zero-width 86 + // trackpad-style scrollbars, adjust the display appropriately. 87 + var aesthetic = (JX.Scrollbar.getScrollbarControlWidth() === 0); 88 + JX.DOM.alterClass(node, 'has-aesthetic-scrollbar', aesthetic); 83 89 84 90 var d = JX.Vector.getDocument(); 85 91