From 3a188de328765cb160918775b5aa99195ae9d60e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Fri, 28 Feb 2014 08:40:02 -0800 Subject: [PATCH] Align textarea in diff comment Summary: Better aligns the text area when leaving an inline comment. Also, phts Test Plan: reload page, view new padding. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8370 --- resources/celerity/map.php | 6 +++--- .../view/DifferentialInlineCommentEditView.php | 2 +- .../diff/PhabricatorInlineCommentController.php | 10 +++++----- .../css/application/differential/changeset-view.css | 4 ++++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 97a4983233..aba99b523f 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -10,7 +10,7 @@ return array( 'core.pkg.css' => 'f12d87a6', 'core.pkg.js' => 'b7bdab05', 'darkconsole.pkg.js' => 'ca8671ce', - 'differential.pkg.css' => '5db87a66', + 'differential.pkg.css' => 'd1b3a605', 'differential.pkg.js' => 'e0d3b0da', 'diffusion.pkg.css' => '3783278d', 'diffusion.pkg.js' => '5b4010f4', @@ -55,7 +55,7 @@ return array( 'rsrc/css/application/countdown/timer.css' => '86b7b0a0', 'rsrc/css/application/diff/inline-comment-summary.css' => '14a91639', 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', - 'rsrc/css/application/differential/changeset-view.css' => '82431767', + 'rsrc/css/application/differential/changeset-view.css' => 'e710a360', 'rsrc/css/application/differential/core.css' => '7ac3cabc', 'rsrc/css/application/differential/local-commits-view.css' => '19649019', 'rsrc/css/application/differential/results-table.css' => '239924f9', @@ -503,7 +503,7 @@ return array( 'conpherence-notification-css' => '403cf598', 'conpherence-update-css' => '1099a660', 'conpherence-widget-pane-css' => '87b12e0c', - 'differential-changeset-view-css' => '82431767', + 'differential-changeset-view-css' => 'e710a360', 'differential-core-view-css' => '7ac3cabc', 'differential-inline-comment-editor' => 'f2441746', 'differential-local-commits-view-css' => '19649019', diff --git a/src/applications/differential/view/DifferentialInlineCommentEditView.php b/src/applications/differential/view/DifferentialInlineCommentEditView.php index 88c1b176ff..4e0f4814cf 100644 --- a/src/applications/differential/view/DifferentialInlineCommentEditView.php +++ b/src/applications/differential/view/DifferentialInlineCommentEditView.php @@ -95,7 +95,7 @@ final class DifferentialInlineCommentEditView extends AphrontView { private function renderBody() { $buttons = array(); - $buttons[] = phutil_tag('button', array(), 'Ready'); + $buttons[] = phutil_tag('button', array(), pht('Ready')); $buttons[] = javelin_tag( 'button', array( diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index 3315925ad4..7bb547a756 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -72,14 +72,14 @@ abstract class PhabricatorInlineCommentController $dialog->setUser($user); $dialog->setSubmitURI($request->getRequestURI()); - $dialog->setTitle('Really delete this comment?'); + $dialog->setTitle(pht('Really delete this comment?')); $dialog->addHiddenInput('id', $this->getCommentID()); $dialog->addHiddenInput('op', 'delete'); $dialog->appendChild( phutil_tag('p', array(), pht('Delete this inline comment?'))); $dialog->addCancelButton('#'); - $dialog->addSubmitButton('Delete'); + $dialog->addSubmitButton(pht('Delete')); return id(new AphrontDialogResponse())->setDialog($dialog); case 'edit': @@ -101,7 +101,7 @@ abstract class PhabricatorInlineCommentController } $edit_dialog = $this->buildEditDialog(); - $edit_dialog->setTitle('Edit Inline Comment'); + $edit_dialog->setTitle(pht('Edit Inline Comment')); $edit_dialog->addHiddenInput('id', $this->getCommentID()); $edit_dialog->addHiddenInput('op', 'edit'); @@ -139,13 +139,13 @@ abstract class PhabricatorInlineCommentController if ($this->getOperation() == 'reply') { $inline = $this->loadComment($this->getCommentID()); - $edit_dialog->setTitle('Reply to Inline Comment'); + $edit_dialog->setTitle(pht('Reply to Inline Comment')); $changeset = $inline->getChangesetID(); $is_new = $inline->getIsNewFile(); $number = $inline->getLineNumber(); $length = $inline->getLineLength(); } else { - $edit_dialog->setTitle('New Inline Comment'); + $edit_dialog->setTitle(pht('New Inline Comment')); $changeset = $this->getChangesetID(); $is_new = $this->getIsNewFile(); $number = $this->getLineNumber(); diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css index 902d3ae16e..69db1cbc8d 100644 --- a/webroot/rsrc/css/application/differential/changeset-view.css +++ b/webroot/rsrc/css/application/differential/changeset-view.css @@ -246,6 +246,10 @@ td.cov-X { white-space: normal; } +.differential-inline-comment-edit .aphront-form-control-textarea { + padding: 0; +} + .differential-inline-comment-unsaved-draft { background: #f1f1f1; border: 1px dashed {$greytext};