mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Give unposted comments a distinct visual style
Summary: See attached tasks. See D459 for the ability to merge tasks. Test Plan: Looked at posted and unposted inline comments. Reviewed By: aran Reviewers: edward, viyer, aran, jungejason, tuomaspelkonen CC: aran, epriestley Differential Revision: 461
This commit is contained in:
parent
a187b2cedc
commit
0a749ad51b
3 changed files with 50 additions and 27 deletions
|
@ -145,7 +145,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'differential-changeset-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/27f196e3/rsrc/css/application/differential/changeset-view.css',
|
||||
'uri' => '/res/2a59525c/rsrc/css/application/differential/changeset-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -1116,23 +1116,6 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/03ef179e/diffusion.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'0e6e36aa' =>
|
||||
array (
|
||||
'name' => 'differential.pkg.css',
|
||||
'symbols' =>
|
||||
array (
|
||||
0 => 'differential-core-view-css',
|
||||
1 => 'differential-changeset-view-css',
|
||||
2 => 'differential-revision-detail-css',
|
||||
3 => 'differential-revision-history-css',
|
||||
4 => 'differential-table-of-contents-css',
|
||||
5 => 'differential-revision-comment-css',
|
||||
6 => 'differential-revision-add-comment-css',
|
||||
7 => 'differential-revision-comment-list-css',
|
||||
),
|
||||
'uri' => '/res/pkg/0e6e36aa/differential.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'2892314d' =>
|
||||
array (
|
||||
'name' => 'typeahead.pkg.js',
|
||||
|
@ -1165,6 +1148,23 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/861d7db0/workflow.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'8f3a55d1' =>
|
||||
array (
|
||||
'name' => 'differential.pkg.css',
|
||||
'symbols' =>
|
||||
array (
|
||||
0 => 'differential-core-view-css',
|
||||
1 => 'differential-changeset-view-css',
|
||||
2 => 'differential-revision-detail-css',
|
||||
3 => 'differential-revision-history-css',
|
||||
4 => 'differential-table-of-contents-css',
|
||||
5 => 'differential-revision-comment-css',
|
||||
6 => 'differential-revision-add-comment-css',
|
||||
7 => 'differential-revision-comment-list-css',
|
||||
),
|
||||
'uri' => '/res/pkg/8f3a55d1/differential.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'acfddc38' =>
|
||||
array (
|
||||
'name' => 'core.pkg.css',
|
||||
|
@ -1234,14 +1234,14 @@ celerity_register_resource_map(array(
|
|||
'aphront-table-view-css' => 'acfddc38',
|
||||
'aphront-tokenizer-control-css' => 'acfddc38',
|
||||
'aphront-typeahead-control-css' => 'acfddc38',
|
||||
'differential-changeset-view-css' => '0e6e36aa',
|
||||
'differential-core-view-css' => '0e6e36aa',
|
||||
'differential-revision-add-comment-css' => '0e6e36aa',
|
||||
'differential-revision-comment-css' => '0e6e36aa',
|
||||
'differential-revision-comment-list-css' => '0e6e36aa',
|
||||
'differential-revision-detail-css' => '0e6e36aa',
|
||||
'differential-revision-history-css' => '0e6e36aa',
|
||||
'differential-table-of-contents-css' => '0e6e36aa',
|
||||
'differential-changeset-view-css' => '8f3a55d1',
|
||||
'differential-core-view-css' => '8f3a55d1',
|
||||
'differential-revision-add-comment-css' => '8f3a55d1',
|
||||
'differential-revision-comment-css' => '8f3a55d1',
|
||||
'differential-revision-comment-list-css' => '8f3a55d1',
|
||||
'differential-revision-detail-css' => '8f3a55d1',
|
||||
'differential-revision-history-css' => '8f3a55d1',
|
||||
'differential-table-of-contents-css' => '8f3a55d1',
|
||||
'diffusion-commit-view-css' => '03ef179e',
|
||||
'javelin-behavior' => 'db95a6d0',
|
||||
'javelin-behavior-aphront-basic-tokenizer' => '2892314d',
|
||||
|
|
|
@ -88,6 +88,12 @@ final class DifferentialInlineCommentView extends AphrontView {
|
|||
|
||||
$links = array();
|
||||
|
||||
$is_draft = false;
|
||||
if (!$inline->getCommentID()) {
|
||||
$links[] = 'Unsaved Draft';
|
||||
$is_draft = true;
|
||||
}
|
||||
|
||||
if (!$this->preview) {
|
||||
$links[] = javelin_render_tag(
|
||||
'a',
|
||||
|
@ -163,10 +169,18 @@ final class DifferentialInlineCommentView extends AphrontView {
|
|||
),
|
||||
'');
|
||||
|
||||
$classes = array(
|
||||
'differential-inline-comment',
|
||||
);
|
||||
if ($is_draft) {
|
||||
$classes[] = 'differential-inline-comment-unsaved-draft';
|
||||
}
|
||||
$classes = implode(' ', $classes);
|
||||
|
||||
$markup = javelin_render_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'differential-inline-comment',
|
||||
'class' => $classes,
|
||||
'sigil' => $sigil,
|
||||
'meta' => $metadata,
|
||||
),
|
||||
|
|
|
@ -145,6 +145,11 @@
|
|||
white-space: normal;
|
||||
}
|
||||
|
||||
.differential-inline-comment-unsaved-draft {
|
||||
background: #f1f1f1;
|
||||
border: 1px dashed #666666;
|
||||
}
|
||||
|
||||
.differential-inline-comment-head {
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
@ -153,6 +158,10 @@
|
|||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.differential-inline-comment-unsaved-draft .differential-inline-comment-head {
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
}
|
||||
|
||||
.differential-inline-comment-links,
|
||||
.differential-inline-comment-line {
|
||||
font-weight: normal;
|
||||
|
|
Loading…
Reference in a new issue