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

Allow users to swipe away stacked actions on mobile

Summary:
Ref T10004. This might be a little too funky or magical, but is probably not necessary too often and easier than doing new layout with the CSS.

Also make the desktop icons a little meatier.

Test Plan: Swiped things away on mobile. Clicked things away on desktop.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

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

+49 -16
+14 -13
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '357b84b0', 10 + 'core.pkg.css' => 'a419cf4b', 11 11 'core.pkg.js' => 'cf262309', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 132 132 'rsrc/css/phui/phui-document.css' => 'a4a1c3b9', 133 133 'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23', 134 134 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 135 - 'rsrc/css/phui/phui-form-view.css' => 'cf7da606', 135 + 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 136 'rsrc/css/phui/phui-form.css' => '0b98e572', 137 137 'rsrc/css/phui/phui-header-view.css' => '55bb32dd', 138 138 'rsrc/css/phui/phui-icon.css' => 'b0a6b1b6', ··· 427 427 'rsrc/js/application/repository/repository-crossreference.js' => 'e5339c43', 428 428 'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08', 429 429 'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f', 430 - 'rsrc/js/application/transactions/behavior-comment-actions.js' => 'd885b622', 430 + 'rsrc/js/application/transactions/behavior-comment-actions.js' => 'b65559c0', 431 431 'rsrc/js/application/transactions/behavior-reorder-configs.js' => 'd7a74243', 432 432 'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96', 433 433 'rsrc/js/application/transactions/behavior-show-older-transactions.js' => 'dbbf48b6', ··· 572 572 'javelin-behavior-audit-preview' => 'd835b03a', 573 573 'javelin-behavior-bulk-job-reload' => 'edf8a145', 574 574 'javelin-behavior-choose-control' => 'dfaafb14', 575 - 'javelin-behavior-comment-actions' => 'd885b622', 575 + 'javelin-behavior-comment-actions' => 'b65559c0', 576 576 'javelin-behavior-config-reorder-fields' => 'b6993408', 577 577 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 578 578 'javelin-behavior-conpherence-menu' => '1d45c74d', ··· 807 807 'phui-font-icon-base-css' => 'ecbbb4c2', 808 808 'phui-fontkit-css' => '9cda225e', 809 809 'phui-form-css' => '0b98e572', 810 - 'phui-form-view-css' => 'cf7da606', 810 + 'phui-form-view-css' => '4a1a0f5e', 811 811 'phui-header-view-css' => '55bb32dd', 812 812 'phui-icon-view-css' => 'b0a6b1b6', 813 813 'phui-image-mask-css' => '5a8b09c8', ··· 1721 1721 'javelin-dom', 1722 1722 'javelin-util', 1723 1723 ), 1724 + 'b65559c0' => array( 1725 + 'javelin-behavior', 1726 + 'javelin-stratcom', 1727 + 'javelin-workflow', 1728 + 'javelin-dom', 1729 + 'phuix-form-control-view', 1730 + 'phuix-icon-view', 1731 + 'javelin-behavior-phabricator-gesture', 1732 + ), 1724 1733 'b6993408' => array( 1725 1734 'javelin-behavior', 1726 1735 'javelin-stratcom', ··· 1861 1870 'javelin-dom', 1862 1871 'javelin-util', 1863 1872 'phabricator-shaped-request', 1864 - ), 1865 - 'd885b622' => array( 1866 - 'javelin-behavior', 1867 - 'javelin-stratcom', 1868 - 'javelin-workflow', 1869 - 'javelin-dom', 1870 - 'phuix-form-control-view', 1871 - 'phuix-icon-view', 1872 1873 ), 1873 1874 'dbbf48b6' => array( 1874 1875 'javelin-behavior',
+9
webroot/rsrc/css/phui/phui-form-view.css
··· 531 531 .aphront-form-preview-hidden { 532 532 opacity: 0.5; 533 533 } 534 + 535 + .aphront-form-error .phui-icon-view { 536 + color: {$lightgreyborder}; 537 + font-size: 16px; 538 + } 539 + 540 + .device-desktop .aphront-form-error .phui-icon-view:hover { 541 + color: {$darkgreyborder}; 542 + }
+26 -3
webroot/rsrc/js/application/transactions/behavior-comment-actions.js
··· 6 6 * javelin-dom 7 7 * phuix-form-control-view 8 8 * phuix-icon-view 9 + * javelin-behavior-phabricator-gesture 9 10 */ 10 11 11 12 JX.behavior('comment-actions', function(config) { ··· 60 61 .setControl(action.type, action.spec); 61 62 var node = control.getNode(); 62 63 63 - rows[action.key] = control; 64 + JX.Stratcom.addSigil(node, 'touchable'); 64 65 65 - JX.DOM.listen(remove, 'click', null, function(e) { 66 - e.kill(); 66 + var remove_action = function() { 67 67 JX.DOM.remove(node); 68 68 delete rows[action.key]; 69 69 option.disabled = false; 70 + }; 71 + 72 + JX.DOM.listen(node, 'gesture.swipe.end', null, function(e) { 73 + var data = e.getData(); 74 + 75 + if (data.direction != 'left') { 76 + // Didn't swipe left. 77 + return; 78 + } 79 + 80 + if (data.length <= (JX.Vector.getDim(node).x / 2)) { 81 + // Didn't swipe far enough. 82 + return; 83 + } 84 + 85 + remove_action(); 86 + }); 87 + 88 + rows[action.key] = control; 89 + 90 + JX.DOM.listen(remove, 'click', null, function(e) { 91 + e.kill(); 92 + remove_action(); 70 93 }); 71 94 72 95 place_node.parentNode.insertBefore(node, place_node);