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

Persist "Show Changeset" and improve path text selection

Summary:
Ref T13513. Currently:

- If you click the "Show Changeset" button, your state change doesn't actually get saved on the server.
- It's hard to select a changeset path name for copy/paste because the "highlight the header" code tends to eat the event.

Instead: persist the former event; make the actual path text not be part of the highlight hitbox.

Test Plan:
- Clicked "Show Changeset", reloaded, saw changeset visibility persisted.
- Selected changeset path text without issues.
- Clicked non-text header area to select/deselect changesets.

Maniphest Tasks: T13513

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

+45 -29
+22 -22
resources/celerity/map.php
··· 12 12 'core.pkg.css' => '1b80c45d', 13 13 'core.pkg.js' => '1e667bcb', 14 14 'dark-console.pkg.js' => '187792c2', 15 - 'differential.pkg.css' => '2d70b7b9', 16 - 'differential.pkg.js' => 'faa6e8ab', 15 + 'differential.pkg.css' => 'd71d4531', 16 + 'differential.pkg.js' => 'cf4f3263', 17 17 'diffusion.pkg.css' => '42c75c37', 18 18 'diffusion.pkg.js' => 'a98c0bf7', 19 19 'maniphest.pkg.css' => '35995d6d', ··· 63 63 'rsrc/css/application/diff/diff-tree-view.css' => 'e2d3e222', 64 64 'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d', 65 65 'rsrc/css/application/differential/add-comment.css' => '7e5900d9', 66 - 'rsrc/css/application/differential/changeset-view.css' => '5fb26c90', 66 + 'rsrc/css/application/differential/changeset-view.css' => 'a5cc67cf', 67 67 'rsrc/css/application/differential/core.css' => '7300a73e', 68 68 'rsrc/css/application/differential/phui-inline-comment.css' => '48acce5b', 69 69 'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d', ··· 379 379 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be', 380 380 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9', 381 381 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 382 - 'rsrc/js/application/diff/DiffChangeset.js' => 'a49dc31e', 382 + 'rsrc/js/application/diff/DiffChangeset.js' => '700bf848', 383 383 'rsrc/js/application/diff/DiffChangesetList.js' => '6992b85c', 384 384 'rsrc/js/application/diff/DiffInline.js' => 'db754a7b', 385 385 'rsrc/js/application/diff/DiffPathView.js' => '8207abf9', ··· 560 560 'conpherence-transaction-css' => '3a3f5e7e', 561 561 'd3' => '9d068042', 562 562 'diff-tree-view-css' => 'e2d3e222', 563 - 'differential-changeset-view-css' => '5fb26c90', 563 + 'differential-changeset-view-css' => 'a5cc67cf', 564 564 'differential-core-view-css' => '7300a73e', 565 565 'differential-revision-add-comment-css' => '7e5900d9', 566 566 'differential-revision-comment-css' => '7dbc8d1d', ··· 776 776 'phabricator-darklog' => '3b869402', 777 777 'phabricator-darkmessage' => '26cd4b73', 778 778 'phabricator-dashboard-css' => '5a205b9d', 779 - 'phabricator-diff-changeset' => 'a49dc31e', 779 + 'phabricator-diff-changeset' => '700bf848', 780 780 'phabricator-diff-changeset-list' => '6992b85c', 781 781 'phabricator-diff-inline' => 'db754a7b', 782 782 'phabricator-diff-path-view' => '8207abf9', ··· 1489 1489 '5faf27b9' => array( 1490 1490 'phuix-form-control-view', 1491 1491 ), 1492 - '5fb26c90' => array( 1493 - 'phui-inline-comment-view-css', 1494 - ), 1495 1492 '60cd9241' => array( 1496 1493 'javelin-behavior', 1497 1494 ), ··· 1555 1552 'javelin-install', 1556 1553 'javelin-util', 1557 1554 ), 1555 + '700bf848' => array( 1556 + 'javelin-dom', 1557 + 'javelin-util', 1558 + 'javelin-stratcom', 1559 + 'javelin-install', 1560 + 'javelin-workflow', 1561 + 'javelin-router', 1562 + 'javelin-behavior-device', 1563 + 'javelin-vector', 1564 + 'phabricator-diff-inline', 1565 + 'phabricator-diff-path-view', 1566 + 'phuix-button-view', 1567 + ), 1558 1568 70245195 => array( 1559 1569 'javelin-behavior', 1560 1570 'javelin-stratcom', ··· 1853 1863 'javelin-stratcom', 1854 1864 'javelin-vector', 1855 1865 ), 1856 - 'a49dc31e' => array( 1857 - 'javelin-dom', 1858 - 'javelin-util', 1859 - 'javelin-stratcom', 1860 - 'javelin-install', 1861 - 'javelin-workflow', 1862 - 'javelin-router', 1863 - 'javelin-behavior-device', 1864 - 'javelin-vector', 1865 - 'phabricator-diff-inline', 1866 - 'phabricator-diff-path-view', 1867 - 'phuix-button-view', 1868 - ), 1869 1866 'a4aa75c4' => array( 1870 1867 'phui-button-css', 1871 1868 'phui-button-simple-css', ··· 1873 1870 'a5257c4e' => array( 1874 1871 'javelin-install', 1875 1872 'javelin-dom', 1873 + ), 1874 + 'a5cc67cf' => array( 1875 + 'phui-inline-comment-view-css', 1876 1876 ), 1877 1877 'a77e2cbd' => array( 1878 1878 'javelin-behavior',
+7 -1
src/applications/differential/view/DifferentialChangesetDetailView.php
··· 278 278 ), 279 279 array( 280 280 $icon, 281 - $display_filename, 281 + javelin_tag( 282 + 'span', 283 + array( 284 + 'class' => 'differential-changeset-path-name', 285 + 'sigil' => 'changeset-header-path-name', 286 + ), 287 + $display_filename), 282 288 )), 283 289 javelin_tag( 284 290 'div',
+5
webroot/rsrc/css/application/differential/changeset-view.css
··· 319 319 cursor: pointer; 320 320 } 321 321 322 + .differential-changeset .differential-file-icon-header 323 + .differential-changeset-path-name { 324 + cursor: auto; 325 + } 326 + 322 327 .device-phone .differential-changeset .differential-file-icon-header { 323 328 word-break: break-word; 324 329 margin-right: 8px;
+11 -6
webroot/rsrc/js/application/diff/DiffChangeset.js
··· 886 886 }, 887 887 888 888 _onClickHeader: function(e) { 889 + // If the user clicks the actual path name text, don't count this as 890 + // a selection action: we want to let them select the path. 891 + var path_name = e.getNode('changeset-header-path-name'); 892 + if (path_name) { 893 + return; 894 + } 895 + 889 896 e.prevent(); 890 897 891 898 if (this._isSelected) { ··· 986 993 987 994 _onClickShowButton: function(e) { 988 995 e.prevent(); 989 - this.setVisible(true); 996 + 997 + // We're always showing the changeset, but want to make sure the state 998 + // change is persisted on the server. 999 + this.toggleVisibility(); 990 1000 }, 991 1001 992 1002 isVisible: function() { 993 1003 return this._visible; 994 - }, 995 - 996 - _onundo: function(e) { 997 - e.kill(); 998 - this.toggleVisibility(); 999 1004 }, 1000 1005 1001 1006 getPathView: function() {