Skip to content

Commit 1088d34

Browse files
author
epriestley
committed
Rename inline comment views to "PHUIDiff" and give them a base class
Summary: Ref T2009. These classes are "Differential" now, but are used elsewhere in diff infrastructure (e.g., Diffusion). - Rename them to "PHUIDiff". - Move them to "src/infrastructure/". - Give them a base class. Test Plan: Interacted with inlines in unified and side-by-side views. Reviewers: btrahan Subscribers: epriestley Maniphest Tasks: T2009 Differential Revision: https://secure.phabricator.com/D11996
1 parent 0af80c1 commit 1088d34

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
lines changed

src/__phutil_library_map__.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,8 @@
375375
'DifferentialHunkTestCase' => 'applications/differential/storage/__tests__/DifferentialHunkTestCase.php',
376376
'DifferentialInlineComment' => 'applications/differential/storage/DifferentialInlineComment.php',
377377
'DifferentialInlineCommentEditController' => 'applications/differential/controller/DifferentialInlineCommentEditController.php',
378-
'DifferentialInlineCommentEditView' => 'applications/differential/view/DifferentialInlineCommentEditView.php',
379378
'DifferentialInlineCommentPreviewController' => 'applications/differential/controller/DifferentialInlineCommentPreviewController.php',
380379
'DifferentialInlineCommentQuery' => 'applications/differential/query/DifferentialInlineCommentQuery.php',
381-
'DifferentialInlineCommentView' => 'applications/differential/view/DifferentialInlineCommentView.php',
382380
'DifferentialJIRAIssuesField' => 'applications/differential/customfield/DifferentialJIRAIssuesField.php',
383381
'DifferentialLandingActionMenuEventListener' => 'applications/differential/landing/DifferentialLandingActionMenuEventListener.php',
384382
'DifferentialLandingStrategy' => 'applications/differential/landing/DifferentialLandingStrategy.php',
@@ -1138,6 +1136,9 @@
11381136
'PHUIColorPalletteExample' => 'applications/uiexample/examples/PHUIColorPalletteExample.php',
11391137
'PHUICrumbView' => 'view/phui/PHUICrumbView.php',
11401138
'PHUICrumbsView' => 'view/phui/PHUICrumbsView.php',
1139+
'PHUIDiffInlineCommentDetailView' => 'infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php',
1140+
'PHUIDiffInlineCommentEditView' => 'infrastructure/diff/view/PHUIDiffInlineCommentEditView.php',
1141+
'PHUIDiffInlineCommentView' => 'infrastructure/diff/view/PHUIDiffInlineCommentView.php',
11411142
'PHUIDocumentExample' => 'applications/uiexample/examples/PHUIDocumentExample.php',
11421143
'PHUIDocumentView' => 'view/phui/PHUIDocumentView.php',
11431144
'PHUIFeedStoryExample' => 'applications/uiexample/examples/PHUIFeedStoryExample.php',
@@ -3518,10 +3519,8 @@
35183519
'DifferentialHunkTestCase' => 'ArcanistPhutilTestCase',
35193520
'DifferentialInlineComment' => 'PhabricatorInlineCommentInterface',
35203521
'DifferentialInlineCommentEditController' => 'PhabricatorInlineCommentController',
3521-
'DifferentialInlineCommentEditView' => 'AphrontView',
35223522
'DifferentialInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
35233523
'DifferentialInlineCommentQuery' => 'PhabricatorOffsetPagedQuery',
3524-
'DifferentialInlineCommentView' => 'AphrontView',
35253524
'DifferentialJIRAIssuesField' => 'DifferentialStoredCustomField',
35263525
'DifferentialLandingActionMenuEventListener' => 'PhabricatorEventListener',
35273526
'DifferentialLegacyHunk' => 'DifferentialHunk',
@@ -4366,6 +4365,9 @@
43664365
'PHUIColorPalletteExample' => 'PhabricatorUIExample',
43674366
'PHUICrumbView' => 'AphrontView',
43684367
'PHUICrumbsView' => 'AphrontView',
4368+
'PHUIDiffInlineCommentDetailView' => 'PHUIDiffInlineCommentView',
4369+
'PHUIDiffInlineCommentEditView' => 'PHUIDiffInlineCommentView',
4370+
'PHUIDiffInlineCommentView' => 'AphrontView',
43694371
'PHUIDocumentExample' => 'PhabricatorUIExample',
43704372
'PHUIDocumentView' => 'AphrontTagView',
43714373
'PHUIFeedStoryExample' => 'PhabricatorUIExample',

src/applications/differential/render/DifferentialChangesetHTMLRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ protected function buildInlineComment(
430430
&& $this->getShowEditAndReplyLinks();
431431
$allow_reply = (bool)$user && $this->getShowEditAndReplyLinks();
432432

433-
return id(new DifferentialInlineCommentView())
433+
return id(new PHUIDiffInlineCommentDetailView())
434434
->setInlineComment($comment)
435435
->setOnRight($on_right)
436436
->setHandles($this->getHandles())

src/applications/diffusion/controller/DiffusionBrowseFileController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ private function renderInlines(
845845

846846
$rows = array();
847847
foreach ($inlines as $inline) {
848-
$inline_view = id(new DifferentialInlineCommentView())
848+
$inline_view = id(new PHUIDiffInlineCommentDetailView())
849849
->setMarkupEngine($engine)
850850
->setInlineComment($inline)
851851
->render();

src/infrastructure/diff/PhabricatorInlineCommentController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private function buildEditDialog() {
196196
$request = $this->getRequest();
197197
$user = $request->getUser();
198198

199-
$edit_dialog = id(new DifferentialInlineCommentEditView())
199+
$edit_dialog = id(new PHUIDiffInlineCommentEditView())
200200
->setUser($user)
201201
->setSubmitURI($request->getRequestURI())
202202
->setOnRight($this->getIsOnRight())
@@ -233,7 +233,7 @@ private function buildRenderedCommentResponse(
233233

234234
$handles = $this->loadViewerHandles($phids);
235235

236-
$view = id(new DifferentialInlineCommentView())
236+
$view = id(new PHUIDiffInlineCommentDetailView())
237237
->setInlineComment($inline)
238238
->setOnRight($on_right)
239239
->setBuildScaffolding(true)

src/infrastructure/diff/PhabricatorInlineCommentPreviewController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function processRequest() {
2626

2727
$views = array();
2828
foreach ($inlines as $inline) {
29-
$view = new DifferentialInlineCommentView();
29+
$view = new PHUIDiffInlineCommentDetailView();
3030
$view->setInlineComment($inline);
3131
$view->setMarkupEngine($engine);
3232
$view->setHandles($handles);

src/applications/differential/view/DifferentialInlineCommentView.php renamed to src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

3-
final class DifferentialInlineCommentView extends AphrontView {
3+
final class PHUIDiffInlineCommentDetailView
4+
extends PHUIDiffInlineCommentView {
45

56
private $inlineComment;
67
private $onRight;

src/applications/differential/view/DifferentialInlineCommentEditView.php renamed to src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

3-
final class DifferentialInlineCommentEditView extends AphrontView {
3+
final class PHUIDiffInlineCommentEditView
4+
extends PHUIDiffInlineCommentView {
45

56
private $inputs = array();
67
private $uri;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
abstract class PHUIDiffInlineCommentView extends AphrontView {}

0 commit comments

Comments
 (0)