1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

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
This commit is contained in:
epriestley 2015-03-06 05:11:29 -08:00
parent 0af80c1d90
commit 1088d34e58
8 changed files with 18 additions and 11 deletions

View file

@ -375,10 +375,8 @@ phutil_register_library_map(array(
'DifferentialHunkTestCase' => 'applications/differential/storage/__tests__/DifferentialHunkTestCase.php',
'DifferentialInlineComment' => 'applications/differential/storage/DifferentialInlineComment.php',
'DifferentialInlineCommentEditController' => 'applications/differential/controller/DifferentialInlineCommentEditController.php',
'DifferentialInlineCommentEditView' => 'applications/differential/view/DifferentialInlineCommentEditView.php',
'DifferentialInlineCommentPreviewController' => 'applications/differential/controller/DifferentialInlineCommentPreviewController.php',
'DifferentialInlineCommentQuery' => 'applications/differential/query/DifferentialInlineCommentQuery.php',
'DifferentialInlineCommentView' => 'applications/differential/view/DifferentialInlineCommentView.php',
'DifferentialJIRAIssuesField' => 'applications/differential/customfield/DifferentialJIRAIssuesField.php',
'DifferentialLandingActionMenuEventListener' => 'applications/differential/landing/DifferentialLandingActionMenuEventListener.php',
'DifferentialLandingStrategy' => 'applications/differential/landing/DifferentialLandingStrategy.php',
@ -1138,6 +1136,9 @@ phutil_register_library_map(array(
'PHUIColorPalletteExample' => 'applications/uiexample/examples/PHUIColorPalletteExample.php',
'PHUICrumbView' => 'view/phui/PHUICrumbView.php',
'PHUICrumbsView' => 'view/phui/PHUICrumbsView.php',
'PHUIDiffInlineCommentDetailView' => 'infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php',
'PHUIDiffInlineCommentEditView' => 'infrastructure/diff/view/PHUIDiffInlineCommentEditView.php',
'PHUIDiffInlineCommentView' => 'infrastructure/diff/view/PHUIDiffInlineCommentView.php',
'PHUIDocumentExample' => 'applications/uiexample/examples/PHUIDocumentExample.php',
'PHUIDocumentView' => 'view/phui/PHUIDocumentView.php',
'PHUIFeedStoryExample' => 'applications/uiexample/examples/PHUIFeedStoryExample.php',
@ -3518,10 +3519,8 @@ phutil_register_library_map(array(
'DifferentialHunkTestCase' => 'ArcanistPhutilTestCase',
'DifferentialInlineComment' => 'PhabricatorInlineCommentInterface',
'DifferentialInlineCommentEditController' => 'PhabricatorInlineCommentController',
'DifferentialInlineCommentEditView' => 'AphrontView',
'DifferentialInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
'DifferentialInlineCommentQuery' => 'PhabricatorOffsetPagedQuery',
'DifferentialInlineCommentView' => 'AphrontView',
'DifferentialJIRAIssuesField' => 'DifferentialStoredCustomField',
'DifferentialLandingActionMenuEventListener' => 'PhabricatorEventListener',
'DifferentialLegacyHunk' => 'DifferentialHunk',
@ -4366,6 +4365,9 @@ phutil_register_library_map(array(
'PHUIColorPalletteExample' => 'PhabricatorUIExample',
'PHUICrumbView' => 'AphrontView',
'PHUICrumbsView' => 'AphrontView',
'PHUIDiffInlineCommentDetailView' => 'PHUIDiffInlineCommentView',
'PHUIDiffInlineCommentEditView' => 'PHUIDiffInlineCommentView',
'PHUIDiffInlineCommentView' => 'AphrontView',
'PHUIDocumentExample' => 'PhabricatorUIExample',
'PHUIDocumentView' => 'AphrontTagView',
'PHUIFeedStoryExample' => 'PhabricatorUIExample',

View file

@ -430,7 +430,7 @@ abstract class DifferentialChangesetHTMLRenderer
&& $this->getShowEditAndReplyLinks();
$allow_reply = (bool)$user && $this->getShowEditAndReplyLinks();
return id(new DifferentialInlineCommentView())
return id(new PHUIDiffInlineCommentDetailView())
->setInlineComment($comment)
->setOnRight($on_right)
->setHandles($this->getHandles())

View file

@ -845,7 +845,7 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
$rows = array();
foreach ($inlines as $inline) {
$inline_view = id(new DifferentialInlineCommentView())
$inline_view = id(new PHUIDiffInlineCommentDetailView())
->setMarkupEngine($engine)
->setInlineComment($inline)
->render();

View file

@ -196,7 +196,7 @@ abstract class PhabricatorInlineCommentController
$request = $this->getRequest();
$user = $request->getUser();
$edit_dialog = id(new DifferentialInlineCommentEditView())
$edit_dialog = id(new PHUIDiffInlineCommentEditView())
->setUser($user)
->setSubmitURI($request->getRequestURI())
->setOnRight($this->getIsOnRight())
@ -233,7 +233,7 @@ abstract class PhabricatorInlineCommentController
$handles = $this->loadViewerHandles($phids);
$view = id(new DifferentialInlineCommentView())
$view = id(new PHUIDiffInlineCommentDetailView())
->setInlineComment($inline)
->setOnRight($on_right)
->setBuildScaffolding(true)

View file

@ -26,7 +26,7 @@ abstract class PhabricatorInlineCommentPreviewController
$views = array();
foreach ($inlines as $inline) {
$view = new DifferentialInlineCommentView();
$view = new PHUIDiffInlineCommentDetailView();
$view->setInlineComment($inline);
$view->setMarkupEngine($engine);
$view->setHandles($handles);

View file

@ -1,6 +1,7 @@
<?php
final class DifferentialInlineCommentView extends AphrontView {
final class PHUIDiffInlineCommentDetailView
extends PHUIDiffInlineCommentView {
private $inlineComment;
private $onRight;

View file

@ -1,6 +1,7 @@
<?php
final class DifferentialInlineCommentEditView extends AphrontView {
final class PHUIDiffInlineCommentEditView
extends PHUIDiffInlineCommentView {
private $inputs = array();
private $uri;

View file

@ -0,0 +1,3 @@
<?php
abstract class PHUIDiffInlineCommentView extends AphrontView {}