From 63450cc48eca9761f3cd292e6e33716a9b0de74a Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 8 May 2017 10:00:33 -0700 Subject: [PATCH] Remove "Show All Context" button from Diffusion Summary: Ref T12616. Diffusion, only, has a "Show All Context" button which expands the full context on all changes. I don't remember the exact history on this, but it hasn't existed in Differential for some time and no one has complained. I suspect that the "View Options > Show All Context" on each file may replace it. I can't really come up with good reasons to use it, offhand. If we want to restore it, I think global options after T1591 is promising. {F4945561} Test Plan: - Loaded a commit in Diffusion, no longer saw a button. - Grepped for relevant sigils. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12616 Differential Revision: https://secure.phabricator.com/D17843 --- resources/celerity/map.php | 30 +++++++++---------- .../view/PHUIDiffTableOfContentsListView.php | 19 +----------- .../differential/behavior-dropdown-menus.js | 14 --------- 3 files changed, 16 insertions(+), 47 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 70636c688e..6107ae0e71 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '2ff7879f', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '90b30783', - 'differential.pkg.js' => '7e4a9c9c', + 'differential.pkg.js' => 'ef6c7cfc', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '84c8f8fd', 'favicon.ico' => '30672e08', @@ -397,7 +397,7 @@ return array( 'rsrc/js/application/differential/behavior-comment-jump.js' => '4fdb476d', 'rsrc/js/application/differential/behavior-comment-preview.js' => 'b064af76', 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', - 'rsrc/js/application/differential/behavior-dropdown-menus.js' => 'f45a2836', + 'rsrc/js/application/differential/behavior-dropdown-menus.js' => 'c3d216cb', 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => 'c0f1c3b5', 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '92904457', 'rsrc/js/application/differential/behavior-populate.js' => '00d88bc4', @@ -624,7 +624,7 @@ return array( 'javelin-behavior-diff-preview-link' => '051c7832', 'javelin-behavior-differential-comment-jump' => '4fdb476d', 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', - 'javelin-behavior-differential-dropdown-menus' => 'f45a2836', + 'javelin-behavior-differential-dropdown-menus' => 'c3d216cb', 'javelin-behavior-differential-edit-inline-comments' => 'c0f1c3b5', 'javelin-behavior-differential-feedback-preview' => 'b064af76', 'javelin-behavior-differential-keyboard-navigation' => '92904457', @@ -1942,6 +1942,18 @@ return array( 'javelin-vector', 'differential-inline-comment-editor', ), + 'c3d216cb' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-workflow', + 'phuix-dropdown-menu', + 'phuix-action-list-view', + 'phuix-action-view', + 'phabricator-phtize', + 'phabricator-diff-changeset', + ), 'c420b0b9' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -2199,18 +2211,6 @@ return array( 'f12cbc9f' => array( 'phui-oi-list-view-css', ), - 'f45a2836' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-workflow', - 'phuix-dropdown-menu', - 'phuix-action-list-view', - 'phuix-action-view', - 'phabricator-phtize', - 'phabricator-diff-changeset', - ), 'f50152ad' => array( 'phui-timeline-view-css', ), diff --git a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php index e6ca6cc53d..47c8f633e7 100644 --- a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php +++ b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php @@ -103,22 +103,6 @@ final class PHUIDiffTableOfContentsListView extends AphrontView { } } - $reveal_link = javelin_tag( - 'a', - array( - 'sigil' => 'differential-reveal-all', - 'mustcapture' => true, - 'class' => 'button differential-toc-reveal-all', - ), - pht('Show All Context')); - - $buttons = phutil_tag( - 'div', - array( - 'class' => 'differential-toc-buttons grouped', - ), - $reveal_link); - $table = id(new AphrontTableView($rows)) ->setRowClasses($rowc) ->setHeaders( @@ -185,8 +169,7 @@ final class PHUIDiffTableOfContentsListView extends AphrontView { ->setHeader($header) ->setBackground($this->background) ->setTable($table) - ->appendChild($anchor) - ->appendChild($buttons); + ->appendChild($anchor); if ($this->infoView) { $box->setInfoView($this->infoView); diff --git a/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js b/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js index ab91818143..822f1b5ac4 100644 --- a/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js +++ b/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js @@ -31,20 +31,6 @@ JX.behavior('differential-dropdown-menus', function(config) { } } - JX.Stratcom.listen( - 'click', - 'differential-reveal-all', - function(e) { - var containers = JX.DOM.scry( - JX.$('differential-review-stage'), - 'div', - 'differential-changeset'); - for (var i=0; i < containers.length; i++) { - show_more(containers[i]); - } - e.kill(); - }); - var buildmenu = function(e) { var button = e.getNode('differential-view-options'); var data = JX.Stratcom.getData(button);