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; }