Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15367463
D12018.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12018.diff
View Options
diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php
--- a/src/infrastructure/diff/PhabricatorInlineCommentController.php
+++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php
@@ -130,8 +130,10 @@
$this->renderTextArea(
nonempty($text, $inline->getContent())));
+ $view = $this->buildScaffoldForView($edit_dialog);
+
return id(new AphrontAjaxResponse())
- ->setContent($edit_dialog->render());
+ ->setContent($view->render());
case 'create':
$text = $this->getCommentText();
@@ -184,8 +186,10 @@
$text_area = $this->renderTextArea($this->getCommentText());
$edit_dialog->appendChild($text_area);
+ $view = $this->buildScaffoldForView($edit_dialog);
+
return id(new AphrontAjaxResponse())
- ->setContent($edit_dialog->render());
+ ->setContent($view->render());
}
}
@@ -276,12 +280,7 @@
->setHandles($handles)
->setEditable(true);
- $renderer = DifferentialChangesetHTMLRenderer::getHTMLRendererByKey(
- $this->getRenderer());
-
- $view = $renderer->getRowScaffoldForInline($view);
- $view = id(new PHUIDiffInlineCommentTableScaffold())
- ->addRowScaffold($view);
+ $view = $this->buildScaffoldForView($view);
return id(new AphrontAjaxResponse())
->setContent(
@@ -300,4 +299,14 @@
->setDisableFullScreen(true);
}
+ private function buildScaffoldForView(PHUIDiffInlineCommentView $view) {
+ $renderer = DifferentialChangesetHTMLRenderer::getHTMLRendererByKey(
+ $this->getRenderer());
+
+ $view = $renderer->getRowScaffoldForInline($view);
+
+ return id(new PHUIDiffInlineCommentTableScaffold())
+ ->addRowScaffold($view);
+ }
+
}
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
@@ -104,32 +104,7 @@
$this->renderBody(),
));
- if ($this->renderer == '1up') {
- $cells = array(
- phutil_tag('th', array()),
- phutil_tag('th', array()),
- phutil_tag(
- 'td',
- array('colspan' => 3, 'class' => 'right3'),
- $content),
- );
- } else {
- $cells = array(
- phutil_tag('th', array()),
- phutil_tag(
- 'td',
- array('class' => 'left'),
- $this->onRight ? null : $content),
- phutil_tag('th', array()),
- phutil_tag(
- 'td',
- array('colspan' => 3, 'class' => 'right3'),
- $this->onRight ? $content : null),
- );
- }
-
- $row = phutil_tag('tr', array('class' => 'inline-comment-splint'), $cells);
- return phutil_tag('table', array(), $row);
+ return $content;
}
private function renderInputs() {
diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css
--- a/webroot/rsrc/css/application/differential/changeset-view.css
+++ b/webroot/rsrc/css/application/differential/changeset-view.css
@@ -423,13 +423,6 @@
text-decoration: none;
}
-/* Create a wide band of color behind the inline edit interface so it is easy
- to find by skimming the page while scrolling.
-*/
-tr.inline-comment-splint {
- background: #f9f1d5;
-}
-
tr.differential-inline-hidden {
display: none;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 6:51 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7222865
Default Alt Text
D12018.diff (3 KB)
Attached To
Mode
D12018: Reduce code duplication on comment editing UI
Attached
Detach File
Event Timeline
Log In to Comment