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

Remove an old Differential selection behavior

Summary:
Ref T12822. Ref PHI878. This is some leftover code from the old selection behavior that prevented visual selection of the left side of a diff if the user clicked on the right -- basically, a much simpler attack on what ultimately landed in D20191.

I think the change from `th` to `td` "broke" it so it didn't interfere with the other behavior, which is why I didn't have to remove it earlier. It's no longer necessary, in any case.

Test Plan: Grepped for behavior name, selected stuff on both sides of a diff.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12822

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

+4 -56
+4 -12
resources/celerity/map.php
··· 11 11 'conpherence.pkg.js' => '020aebcf', 12 12 'core.pkg.css' => 'e3c1a8f2', 13 13 'core.pkg.js' => '2cda17a4', 14 - 'differential.pkg.css' => '9f215e54', 15 - 'differential.pkg.js' => '53f8d00c', 14 + 'differential.pkg.css' => '97e13037', 15 + 'differential.pkg.js' => '67e02996', 16 16 'diffusion.pkg.css' => '42c75c37', 17 17 'diffusion.pkg.js' => '91192d85', 18 18 'maniphest.pkg.css' => '35995d6d', ··· 62 62 'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d', 63 63 'rsrc/css/application/differential/add-comment.css' => '7e5900d9', 64 64 'rsrc/css/application/differential/changeset-view.css' => 'de570228', 65 - 'rsrc/css/application/differential/core.css' => 'bdb93065', 65 + 'rsrc/css/application/differential/core.css' => '7300a73e', 66 66 'rsrc/css/application/differential/phui-inline-comment.css' => '48acce5b', 67 67 'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d', 68 68 'rsrc/css/application/differential/revision-history.css' => '8aa3eac5', ··· 380 380 'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17', 381 381 'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd', 382 382 'rsrc/js/application/differential/behavior-populate.js' => 'dfa1d313', 383 - 'rsrc/js/application/differential/behavior-user-select.js' => 'e18685c0', 384 383 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => '94243d89', 385 384 'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'b7b73831', 386 385 'rsrc/js/application/diffusion/behavior-commit-branches.js' => '4b671572', ··· 542 541 'conpherence-transaction-css' => '3a3f5e7e', 543 542 'd3' => 'd67475f5', 544 543 'differential-changeset-view-css' => 'de570228', 545 - 'differential-core-view-css' => 'bdb93065', 544 + 'differential-core-view-css' => '7300a73e', 546 545 'differential-revision-add-comment-css' => '7e5900d9', 547 546 'differential-revision-comment-css' => '7dbc8d1d', 548 547 'differential-revision-history-css' => '8aa3eac5', ··· 596 595 'javelin-behavior-diff-preview-link' => 'f51e9c17', 597 596 'javelin-behavior-differential-diff-radios' => '925fe8cd', 598 597 'javelin-behavior-differential-populate' => 'dfa1d313', 599 - 'javelin-behavior-differential-user-select' => 'e18685c0', 600 598 'javelin-behavior-diffusion-commit-branches' => '4b671572', 601 599 'javelin-behavior-diffusion-commit-graph' => '1c88f154', 602 600 'javelin-behavior-diffusion-locate-file' => '87428eb2', ··· 2030 2028 'javelin-dom', 2031 2029 'javelin-history', 2032 2030 ), 2033 - 'e18685c0' => array( 2034 - 'javelin-behavior', 2035 - 'javelin-dom', 2036 - 'javelin-stratcom', 2037 - ), 2038 2031 'e562708c' => array( 2039 2032 'javelin-install', 2040 2033 ), ··· 2339 2332 'javelin-behavior-aphront-drag-and-drop-textarea', 2340 2333 'javelin-behavior-phabricator-object-selector', 2341 2334 'javelin-behavior-repository-crossreference', 2342 - 'javelin-behavior-differential-user-select', 2343 2335 'javelin-behavior-aphront-more', 2344 2336 'phabricator-diff-inline', 2345 2337 'phabricator-diff-changeset',
-1
resources/celerity/packages.php
··· 199 199 'javelin-behavior-phabricator-object-selector', 200 200 'javelin-behavior-repository-crossreference', 201 201 202 - 'javelin-behavior-differential-user-select', 203 202 'javelin-behavior-aphront-more', 204 203 205 204 'phabricator-diff-inline',
-2
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 621 621 ->build($changesets); 622 622 } 623 623 624 - Javelin::initBehavior('differential-user-select'); 625 - 626 624 $view = id(new PHUITwoColumnView()) 627 625 ->setHeader($header) 628 626 ->setSubheader($subheader)
-8
webroot/rsrc/css/application/differential/core.css
··· 16 16 margin-bottom: 8px; 17 17 } 18 18 19 - .differential-unselectable tr td:nth-of-type(1) { 20 - -moz-user-select: -moz-none; 21 - -khtml-user-select: none; 22 - -webkit-user-select: none; 23 - -ms-user-select: none; 24 - user-select: none; 25 - } 26 - 27 19 .differential-content-hidden { 28 20 margin: 0 0 24px 0; 29 21 }
-33
webroot/rsrc/js/application/differential/behavior-user-select.js
··· 1 - /** 2 - * @provides javelin-behavior-differential-user-select 3 - * @requires javelin-behavior 4 - * javelin-dom 5 - * javelin-stratcom 6 - */ 7 - 8 - JX.behavior('differential-user-select', function() { 9 - 10 - var unselectable; 11 - 12 - function isOnRight(node) { 13 - return node.previousSibling && 14 - node.parentNode.firstChild != node.previousSibling; 15 - } 16 - 17 - JX.Stratcom.listen( 18 - 'mousedown', 19 - null, 20 - function(e) { 21 - var key = 'differential-unselectable'; 22 - if (unselectable) { 23 - JX.DOM.alterClass(unselectable, key, false); 24 - } 25 - var diff = e.getNode('differential-diff'); 26 - var td = e.getNode('tag:td'); 27 - if (diff && td && isOnRight(td)) { 28 - unselectable = diff; 29 - JX.DOM.alterClass(diff, key, true); 30 - } 31 - }); 32 - 33 - });