Update InlineCommentSummary UI

Summary: Minor spring cleaning, improve the visual feel of the comments table, more consistent structure.

Test Plan:
Test multiple comments, long comments, short comments, and multiple lines.

{F282462}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11666
This commit is contained in:
Chad Little
2015-02-09 08:38:51 -08:00
parent e7c2754b69
commit cdd8dcbf17
3 changed files with 39 additions and 42 deletions

View File

@@ -15,20 +15,7 @@ final class PhabricatorInlineSummaryView extends AphrontView {
public function render() {
require_celerity_resource('inline-comment-summary-css');
return hsprintf('%s%s', $this->renderHeader(), $this->renderTable());
}
private function renderHeader() {
$icon = id(new PHUIIconView())
->setIconFont('fa-comment bluegrey msr');
$header = phutil_tag_div(
'phabricator-inline-summary',
array(
$icon,
pht('Inline Comments'),
));
return $header;
return hsprintf('%s', $this->renderTable());
}
private function renderTable() {
@@ -43,10 +30,17 @@ final class PhabricatorInlineSummaryView extends AphrontView {
}
}
$rows[] = phutil_tag(
'tr',
array(),
phutil_tag('th', array('colspan' => 3), $group));
$icon = id(new PHUIIconView())
->setIconFont('fa-file-code-o darkbluetext mmr');
$header = phutil_tag(
'th',
array(
'colspan' => 3,
),
array(
$icon,
$group,));
$rows[] = phutil_tag('tr', array(), $header);
foreach ($items as $item) {
$line = $item['line'];
@@ -69,7 +63,7 @@ final class PhabricatorInlineSummaryView extends AphrontView {
if ($href) {
$icon = id(new PHUIIconView())
->setIconFont('fa-share white msr');
->setIconFont('fa-share darkbluetext mmr');
$lines = phutil_tag(
'a',