From 2bd25d7399c53d07de54685352b7ffde6803cfae Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 8 May 2017 09:52:16 -0700 Subject: [PATCH] Rename "DifferentialChangesetViewManager" to "DiffChangeset" Summary: Ref T12616. This class is already mostly-reasonable as a representation of an individual changeset, so I plan to just adjust it a little bit. Test Plan: - Used `git grep` to search for `ChangesetViewManager`. - Used `git grep` to search for `changeset-view-manager`. - Browsed around and interacted with changesets. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12616 Differential Revision: https://secure.phabricator.com/D17842 --- resources/celerity/map.php | 99 ++++++++++--------- resources/celerity/packages.php | 3 +- .../DiffChangeset.js} | 6 +- .../js/application/diff/DiffChangesetList.js | 2 +- .../differential/behavior-dropdown-menus.js | 6 +- .../behavior-edit-inline-comments.js | 4 +- .../differential/behavior-populate.js | 4 +- 7 files changed, 63 insertions(+), 61 deletions(-) rename webroot/rsrc/js/application/{differential/ChangesetViewManager.js => diff/DiffChangeset.js} (98%) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 8029980969..70636c688e 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' => '8532657e', + 'differential.pkg.js' => '7e4a9c9c', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '84c8f8fd', 'favicon.ico' => '30672e08', @@ -390,17 +390,17 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173', '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/DiffChangesetList.js' => '9137a890', + 'rsrc/js/application/diff/DiffChangeset.js' => 'a1189df6', + 'rsrc/js/application/diff/DiffChangesetList.js' => '2329e40e', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', - 'rsrc/js/application/differential/ChangesetViewManager.js' => 'a2828756', 'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => '2e3f9738', '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' => '9a6b9324', - 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '4fbbc3e9', + 'rsrc/js/application/differential/behavior-dropdown-menus.js' => 'f45a2836', + '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' => 'cf707904', + 'rsrc/js/application/differential/behavior-populate.js' => '00d88bc4', 'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb', 'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d', 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3', @@ -557,7 +557,6 @@ return array( 'application-search-view-css' => '66ee5d46', 'auth-css' => '0877ed6e', 'bulk-job-css' => 'df9c1d4a', - 'changeset-view-manager' => 'a2828756', 'conduit-api-css' => '7bc725c4', 'config-options-css' => '0ede4c9b', 'config-page-css' => 'c1d5121b', @@ -625,11 +624,11 @@ 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' => '9a6b9324', - 'javelin-behavior-differential-edit-inline-comments' => '4fbbc3e9', + 'javelin-behavior-differential-dropdown-menus' => 'f45a2836', + 'javelin-behavior-differential-edit-inline-comments' => 'c0f1c3b5', 'javelin-behavior-differential-feedback-preview' => 'b064af76', 'javelin-behavior-differential-keyboard-navigation' => '92904457', - 'javelin-behavior-differential-populate' => 'cf707904', + 'javelin-behavior-differential-populate' => '00d88bc4', 'javelin-behavior-differential-toggle-files' => 'ca3f91eb', 'javelin-behavior-differential-user-select' => 'a8d8459d', 'javelin-behavior-diffusion-browse-file' => '054a0f0b', @@ -787,7 +786,8 @@ return array( 'phabricator-darklog' => 'c8e1ffe3', 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', - 'phabricator-diff-changeset-list' => '9137a890', + 'phabricator-diff-changeset' => 'a1189df6', + 'phabricator-diff-changeset-list' => '2329e40e', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', 'phabricator-fatal-config-template-css' => '8f18fa41', @@ -922,6 +922,14 @@ return array( 'unhandled-exception-css' => '4c96257a', ), 'requires' => array( + '00d88bc4' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'phabricator-tooltip', + 'phabricator-diff-changeset-list', + 'phabricator-diff-changeset', + ), '013ffff9' => array( 'javelin-install', 'javelin-util', @@ -1079,6 +1087,9 @@ return array( 'javelin-workflow', 'javelin-util', ), + '2329e40e' => array( + 'javelin-install', + ), 26167537 => array( 'javelin-install', 'javelin-dom', @@ -1296,14 +1307,6 @@ return array( 'javelin-stratcom', 'javelin-dom', ), - '4fbbc3e9' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-util', - 'javelin-vector', - 'differential-inline-comment-editor', - ), '4fdb476d' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1618,9 +1621,6 @@ return array( 'javelin-dom', 'javelin-request', ), - '9137a890' => array( - 'javelin-install', - ), 92904457 => array( 'javelin-behavior', 'javelin-dom', @@ -1669,18 +1669,6 @@ return array( 'javelin-dom', 'javelin-reactor-dom', ), - '9a6b9324' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-workflow', - 'phuix-dropdown-menu', - 'phuix-action-list-view', - 'phuix-action-view', - 'phabricator-phtize', - 'changeset-view-manager', - ), '9a6dd75c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1718,12 +1706,7 @@ return array( 'javelin-util', 'phabricator-keyboard-shortcut', ), - 'a155550f' => array( - 'javelin-install', - 'javelin-dom', - 'javelin-reactor-dom', - ), - 'a2828756' => array( + 'a1189df6' => array( 'javelin-dom', 'javelin-util', 'javelin-stratcom', @@ -1733,6 +1716,11 @@ return array( 'javelin-behavior-device', 'javelin-vector', ), + 'a155550f' => array( + 'javelin-install', + 'javelin-dom', + 'javelin-reactor-dom', + ), 'a3a63478' => array( 'phui-workcard-view-css', ), @@ -1946,6 +1934,14 @@ return array( 'javelin-install', 'javelin-dom', ), + 'c0f1c3b5' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-util', + 'javelin-vector', + 'differential-inline-comment-editor', + ), 'c420b0b9' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -2033,14 +2029,6 @@ return array( 'cd2b9b77' => array( 'phui-oi-list-view-css', ), - 'cf707904' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'phabricator-tooltip', - 'changeset-view-manager', - 'phabricator-diff-changeset-list', - ), 'd0c516d5' => array( 'javelin-behavior', 'javelin-dom', @@ -2211,6 +2199,18 @@ 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', ), @@ -2469,7 +2469,8 @@ return array( 'javelin-behavior-differential-toggle-files', 'javelin-behavior-differential-user-select', 'javelin-behavior-aphront-more', - 'changeset-view-manager', + 'phabricator-diff-changeset', + 'phabricator-diff-changeset-list', ), 'diffusion.pkg.css' => array( 'diffusion-icons-css', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index d906c738da..ed281822a8 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -208,7 +208,8 @@ return array( 'javelin-behavior-differential-toggle-files', 'javelin-behavior-differential-user-select', 'javelin-behavior-aphront-more', - 'changeset-view-manager', + 'phabricator-diff-changeset', + 'phabricator-diff-changeset-list', ), 'diffusion.pkg.css' => array( 'diffusion-icons-css', diff --git a/webroot/rsrc/js/application/differential/ChangesetViewManager.js b/webroot/rsrc/js/application/diff/DiffChangeset.js similarity index 98% rename from webroot/rsrc/js/application/differential/ChangesetViewManager.js rename to webroot/rsrc/js/application/diff/DiffChangeset.js index 0c23e18737..27058dbc42 100644 --- a/webroot/rsrc/js/application/differential/ChangesetViewManager.js +++ b/webroot/rsrc/js/application/diff/DiffChangeset.js @@ -1,5 +1,5 @@ /** - * @provides changeset-view-manager + * @provides phabricator-diff-changeset * @requires javelin-dom * javelin-util * javelin-stratcom @@ -11,7 +11,7 @@ */ -JX.install('ChangesetViewManager', { +JX.install('DiffChangeset', { construct : function(node) { this._node = node; @@ -389,7 +389,7 @@ JX.install('ChangesetViewManager', { getForNode: function(node) { var data = JX.Stratcom.getData(node); if (!data.changesetViewManager) { - data.changesetViewManager = new JX.ChangesetViewManager(node); + data.changesetViewManager = new JX.DiffChangeset(node); } return data.changesetViewManager; } diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index 132a911c6a..c8282dba32 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -31,7 +31,7 @@ JX.install('DiffChangesetList', { }, getChangesetForNode: function(node) { - return JX.ChangesetViewManager.getForNode(node); + return JX.DiffChangeset.getForNode(node); }, _ifawake: function(f) { diff --git a/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js b/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js index 1905e3a433..ab91818143 100644 --- a/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js +++ b/webroot/rsrc/js/application/differential/behavior-dropdown-menus.js @@ -9,14 +9,14 @@ * phuix-action-list-view * phuix-action-view * phabricator-phtize - * changeset-view-manager + * phabricator-diff-changeset */ JX.behavior('differential-dropdown-menus', function(config) { var pht = JX.phtize(config.pht); function show_more(container) { - var view = JX.ChangesetViewManager.getForNode(container); + var view = JX.DiffChangeset.getForNode(container); var nodes = JX.DOM.scry(container, 'tr', 'context-target'); for (var ii = 0; ii < nodes.length; ii++) { @@ -59,7 +59,7 @@ JX.behavior('differential-dropdown-menus', function(config) { 'div', 'differential-changeset'); - var view = JX.ChangesetViewManager.getForNode(changeset); + var view = JX.DiffChangeset.getForNode(changeset); var menu = new JX.PHUIXDropdownMenu(button); var list = new JX.PHUIXActionListView(); diff --git a/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js b/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js index 032b8cec68..1859ca1754 100644 --- a/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js +++ b/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js @@ -274,7 +274,7 @@ JX.behavior('differential-edit-inline-comments', function(config) { insert = target.parentNode; } - var view = JX.ChangesetViewManager.getForNode(root); + var view = JX.DiffChangeset.getForNode(root); editor = new JX.DifferentialInlineCommentEditor(config.uri) .setTemplates(view.getUndoTemplates()) @@ -390,7 +390,7 @@ JX.behavior('differential-edit-inline-comments', function(config) { node, 'div', 'differential-changeset'); - var view = JX.ChangesetViewManager.getForNode(changeset_root); + var view = JX.DiffChangeset.getForNode(changeset_root); editor = new JX.DifferentialInlineCommentEditor(config.uri) .setTemplates(view.getUndoTemplates()) diff --git a/webroot/rsrc/js/application/differential/behavior-populate.js b/webroot/rsrc/js/application/differential/behavior-populate.js index b3663b1119..4c6187189f 100644 --- a/webroot/rsrc/js/application/differential/behavior-populate.js +++ b/webroot/rsrc/js/application/differential/behavior-populate.js @@ -4,8 +4,8 @@ * javelin-dom * javelin-stratcom * phabricator-tooltip - * changeset-view-manager * phabricator-diff-changeset-list + * phabricator-diff-changeset * @javelin */ @@ -69,7 +69,7 @@ JX.behavior('differential-populate', function(config, statics) { for (var ii = 0; ii < config.changesetViewIDs.length; ii++) { var id = config.changesetViewIDs[ii]; - var view = JX.ChangesetViewManager.getForNode(JX.$(id)); + var view = JX.DiffChangeset.getForNode(JX.$(id)); if (view.shouldAutoload()) { view.setStabilize(true).load(); }