diff --git a/resources/celerity/map.php b/resources/celerity/map.php index e9c8389d95..543395b7db 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '1e667bcb', 'dark-console.pkg.js' => '187792c2', 'differential.pkg.css' => '2d70b7b9', - 'differential.pkg.js' => '22ec6f26', + 'differential.pkg.js' => 'faa6e8ab', 'diffusion.pkg.css' => '42c75c37', 'diffusion.pkg.js' => 'a98c0bf7', 'maniphest.pkg.css' => '35995d6d', @@ -433,7 +433,7 @@ return array( 'rsrc/js/application/releeph/releeph-preview-branch.js' => '75184d68', 'rsrc/js/application/releeph/releeph-request-state-change.js' => '9f081f05', 'rsrc/js/application/releeph/releeph-request-typeahead.js' => 'aa3a100c', - 'rsrc/js/application/repository/repository-crossreference.js' => '1c95ea63', + 'rsrc/js/application/repository/repository-crossreference.js' => '6337cf26', 'rsrc/js/application/search/behavior-reorder-profile-menu-items.js' => 'e5bdb730', 'rsrc/js/application/search/behavior-reorder-queries.js' => 'b86f297f', 'rsrc/js/application/transactions/behavior-comment-actions.js' => '4dffaeb2', @@ -685,7 +685,7 @@ return array( 'javelin-behavior-reorder-applications' => 'aa371860', 'javelin-behavior-reorder-columns' => '8ac32fd9', 'javelin-behavior-reorder-profile-menu-items' => 'e5bdb730', - 'javelin-behavior-repository-crossreference' => '1c95ea63', + 'javelin-behavior-repository-crossreference' => '6337cf26', 'javelin-behavior-scrollbar' => '92388bae', 'javelin-behavior-search-reorder-queries' => 'b86f297f', 'javelin-behavior-select-content' => 'e8240b50', @@ -1049,12 +1049,6 @@ return array( 'javelin-install', 'javelin-util', ), - '1c95ea63' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-uri', - ), '1cab0e9a' => array( 'javelin-behavior', 'javelin-dom', @@ -1501,6 +1495,12 @@ return array( '60cd9241' => array( 'javelin-behavior', ), + '6337cf26' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-uri', + ), '65bb0011' => array( 'javelin-behavior', 'javelin-dom', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index f487c0e90d..db8fdb0487 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -3593,6 +3593,7 @@ phutil_register_library_map(array( 'PhabricatorInfrastructureTestCase' => '__tests__/PhabricatorInfrastructureTestCase.php', 'PhabricatorInlineComment' => 'infrastructure/diff/interface/PhabricatorInlineComment.php', 'PhabricatorInlineCommentController' => 'infrastructure/diff/PhabricatorInlineCommentController.php', + 'PhabricatorInlineCommentInterface' => 'applications/transactions/interface/PhabricatorInlineCommentInterface.php', 'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php', 'PhabricatorInstructionsEditField' => 'applications/transactions/editfield/PhabricatorInstructionsEditField.php', 'PhabricatorIntConfigType' => 'applications/config/type/PhabricatorIntConfigType.php', @@ -6789,7 +6790,10 @@ phutil_register_library_map(array( 'DifferentialTestPlanField' => 'DifferentialCoreCustomField', 'DifferentialTitleCommitMessageField' => 'DifferentialCommitMessageField', 'DifferentialTransaction' => 'PhabricatorModularTransaction', - 'DifferentialTransactionComment' => 'PhabricatorApplicationTransactionComment', + 'DifferentialTransactionComment' => array( + 'PhabricatorApplicationTransactionComment', + 'PhabricatorInlineCommentInterface', + ), 'DifferentialTransactionEditor' => 'PhabricatorApplicationTransactionEditor', 'DifferentialTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'DifferentialTransactionView' => 'PhabricatorApplicationTransactionView', @@ -8599,7 +8603,10 @@ phutil_register_library_map(array( 'PhabricatorAuditStatusConstants' => 'Phobject', 'PhabricatorAuditSynchronizeManagementWorkflow' => 'PhabricatorAuditManagementWorkflow', 'PhabricatorAuditTransaction' => 'PhabricatorModularTransaction', - 'PhabricatorAuditTransactionComment' => 'PhabricatorApplicationTransactionComment', + 'PhabricatorAuditTransactionComment' => array( + 'PhabricatorApplicationTransactionComment', + 'PhabricatorInlineCommentInterface', + ), 'PhabricatorAuditTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorAuditTransactionView' => 'PhabricatorApplicationTransactionView', 'PhabricatorAuditUpdateOwnersManagementWorkflow' => 'PhabricatorAuditManagementWorkflow', diff --git a/src/applications/audit/storage/PhabricatorAuditTransactionComment.php b/src/applications/audit/storage/PhabricatorAuditTransactionComment.php index 693dc2f9be..01f173bd9a 100644 --- a/src/applications/audit/storage/PhabricatorAuditTransactionComment.php +++ b/src/applications/audit/storage/PhabricatorAuditTransactionComment.php @@ -1,7 +1,9 @@ getContent()); } + public function newInlineCommentObject() { + return PhabricatorAuditInlineComment::newFromModernComment($this); + } + } diff --git a/src/applications/differential/storage/DifferentialTransactionComment.php b/src/applications/differential/storage/DifferentialTransactionComment.php index bbbf1abc5a..f5cb772d48 100644 --- a/src/applications/differential/storage/DifferentialTransactionComment.php +++ b/src/applications/differential/storage/DifferentialTransactionComment.php @@ -1,7 +1,9 @@ getContent()); } + public function newInlineCommentObject() { + return DifferentialInlineComment::newFromModernComment($this); + } + } diff --git a/src/applications/transactions/interface/PhabricatorInlineCommentInterface.php b/src/applications/transactions/interface/PhabricatorInlineCommentInterface.php new file mode 100644 index 0000000000..a319f4cc8b --- /dev/null +++ b/src/applications/transactions/interface/PhabricatorInlineCommentInterface.php @@ -0,0 +1,7 @@ +getInlineComments(); foreach ($inlines as $key => $inline) { - // TODO: This is real, real gross. - - if ($inline instanceof DifferentialTransactionComment) { - $inlines[$key] = DifferentialInlineComment::newFromModernComment( - $inline); - } else { - $inlines[$key] = PhabricatorAuditInlineComment::newFromModernComment( - $inline); - } + $inlines[$key] = $inline->newInlineCommentObject(); } $engine = new PhabricatorMarkupEngine(); diff --git a/webroot/rsrc/js/application/repository/repository-crossreference.js b/webroot/rsrc/js/application/repository/repository-crossreference.js index ba522d5b47..8158e71485 100644 --- a/webroot/rsrc/js/application/repository/repository-crossreference.js +++ b/webroot/rsrc/js/application/repository/repository-crossreference.js @@ -219,7 +219,7 @@ JX.behavior('repository-crossreference', function(config, statics) { } function getPath(target) { - // This method works in Differential, when browsing a changset. + // This method works in Differential, when browsing a changeset. var changeset; try { changeset = JX.DOM.findAbove(target, 'div', 'differential-changeset');