From 42d9fa34e21b86bdea6b7699896db07db04c0407 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 14 Jan 2014 15:15:47 -0800 Subject: [PATCH] Use RemarkupControl in Differential inline comment UI Summary: Fixes T4317. Update the "inline comment" control to a RemarkupControl. This could maybe use some padding/spacing/design touches eventually but seems OK for the moment. Test Plan: {F101825} Reviewers: chad, btrahan Reviewed By: chad CC: chad, aran Maniphest Tasks: T4317 Differential Revision: https://secure.phabricator.com/D7969 --- .../view/DifferentialInlineCommentEditView.php | 11 ----------- .../diff/PhabricatorInlineCommentController.php | 13 +++++-------- .../css/application/differential/changeset-view.css | 5 ++--- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/applications/differential/view/DifferentialInlineCommentEditView.php b/src/applications/differential/view/DifferentialInlineCommentEditView.php index a2318eb069..88c1b176ff 100644 --- a/src/applications/differential/view/DifferentialInlineCommentEditView.php +++ b/src/applications/differential/view/DifferentialInlineCommentEditView.php @@ -104,16 +104,6 @@ final class DifferentialInlineCommentEditView extends AphrontView { ), pht('Cancel')); - $formatting = phutil_tag( - 'a', - array( - 'href' => PhabricatorEnv::getDoclink( - 'article/Remarkup_Reference.html'), - 'tabindex' => '-1', - 'target' => '_blank', - ), - pht('Formatting Reference')); - $title = phutil_tag( 'div', array( @@ -134,7 +124,6 @@ final class DifferentialInlineCommentEditView extends AphrontView { 'class' => 'differential-inline-comment-edit-buttons', ), array( - $formatting, $buttons, phutil_tag('div', array('style' => 'clear: both'), ''), )); diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index 77b3bfe19e..22550936cf 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -235,14 +235,11 @@ abstract class PhabricatorInlineCommentController } private function renderTextArea($text) { - return javelin_tag( - 'textarea', - array( - 'class' => 'differential-inline-comment-edit-textarea', - 'sigil' => 'differential-inline-comment-edit-textarea', - 'name' => 'text', - ), - $text); + return id(new PhabricatorRemarkupControl()) + ->setUser($this->getRequest()->getUser()) + ->setSigil('differential-inline-comment-edit-textarea') + ->setName('text') + ->setValue($text); } } diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css index a71c72cc9f..902d3ae16e 100644 --- a/webroot/rsrc/css/application/differential/changeset-view.css +++ b/webroot/rsrc/css/application/differential/changeset-view.css @@ -287,10 +287,9 @@ td.cov-X { font-style: normal; } - -.differential-inline-comment-edit-textarea { +.differential-inline-comment-edit-body .aphront-form-input { + margin: 0; width: 100%; - height: 12em; } .differential-changeset-buttons {