diff --git a/resources/celerity/map.php b/resources/celerity/map.php index c724382016..fb20ebfa55 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '5d80e0db', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '45951e9e', - 'differential.pkg.js' => '414ada25', + 'differential.pkg.js' => 'b71b8c5d', 'diffusion.pkg.css' => 'a2d17c7d', 'diffusion.pkg.js' => '6134c5a1', 'favicon.ico' => '30672e08', @@ -398,7 +398,7 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd', - 'rsrc/js/application/diff/DiffChangesetList.js' => 'cb1570cb', + 'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c', 'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', @@ -778,7 +778,7 @@ return array( 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', 'phabricator-diff-changeset' => '99abf4cd', - 'phabricator-diff-changeset-list' => 'cb1570cb', + 'phabricator-diff-changeset-list' => '8f1cd52c', 'phabricator-diff-inline' => 'e83d28f3', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', @@ -1567,6 +1567,10 @@ return array( '8e1baf68' => array( 'phui-button-css', ), + '8f1cd52c' => array( + 'javelin-install', + 'phuix-button-view', + ), '8ff5e24c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1950,10 +1954,6 @@ return array( 'cae95e89' => array( 'syntax-default-css', ), - 'cb1570cb' => array( - 'javelin-install', - 'phuix-button-view', - ), 'ccf1cbf8' => array( 'javelin-install', 'javelin-dom', diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index 2787356bd2..307d424b0e 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -298,6 +298,9 @@ final class DifferentialChangesetListView extends AphrontView { 'Show All Inlines' => pht('Show All Inlines'), 'List Inline Comments' => pht('List Inline Comments'), + + 'Hide or show all inline comments.' => + pht('Hide or show all inline comments.'), ), )); diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index 89a18a9a8b..3f47f1ed35 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -190,6 +190,10 @@ JX.install('DiffChangesetList', { label = pht('Collapse or expand inline comment.'); this._installKey('q', label, this._onkeycollapse); + + label = pht('Hide or show all inline comments.'); + this._installKey('A', label, this._onkeyhideall); + }, isAsleep: function() { @@ -448,6 +452,15 @@ JX.install('DiffChangesetList', { this._warnUser(pht('You must select a comment to hide.')); }, + _onkeyhideall: function() { + var inlines = this._getInlinesByType(); + if (inlines.visible.length) { + this._toggleInlines('all'); + } else { + this._toggleInlines('show'); + } + }, + _warnUser: function(message) { new JX.Notification() .setContent(message) @@ -1701,6 +1714,10 @@ JX.install('DiffChangesetList', { this._dropdownMenu.close(); e.prevent(); + this._toggleInlines(type); + }, + + _toggleInlines: function(type) { var inlines = this._getInlinesByType(); // Clear the selection state since we end up in a weird place if the