Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14351733
D12187.id29295.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Referenced Files
None
Subscribers
None
D12187.id29295.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -57,7 +57,7 @@
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40',
'rsrc/css/application/differential/changeset-view.css' => 'f36406b1',
'rsrc/css/application/differential/core.css' => '7ac3cabc',
- 'rsrc/css/application/differential/phui-inline-comment.css' => 'a96c315d',
+ 'rsrc/css/application/differential/phui-inline-comment.css' => '0cdae426',
'rsrc/css/application/differential/results-table.css' => '181aa9d9',
'rsrc/css/application/differential/revision-comment.css' => '024dda6b',
'rsrc/css/application/differential/revision-history.css' => '0e8eb855',
@@ -790,7 +790,7 @@
'phui-image-mask-css' => '5a8b09c8',
'phui-info-panel-css' => '27ea50a1',
'phui-info-view-css' => 'c6f0aef8',
- 'phui-inline-comment-view-css' => 'a96c315d',
+ 'phui-inline-comment-view-css' => '0cdae426',
'phui-list-view-css' => '2e25ebfb',
'phui-object-box-css' => 'd68ce5dc',
'phui-object-item-list-view-css' => '9db65899',
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
@@ -260,25 +260,40 @@
$classes[] = 'inline-state-is-draft';
}
- $done_input = javelin_tag(
- 'input',
- array(
- 'type' => 'checkbox',
- 'checked' => ($is_done ? 'checked' : null),
- 'disabled' => ($this->getCanMarkDone() ? null : 'disabled'),
- 'class' => 'differential-inline-done',
- 'sigil' => 'differential-inline-done',
- ));
- $done_button = phutil_tag(
- 'label',
- array(
- 'class' => 'differential-inline-done-label '.
- ($this->getCanMarkDone() ? null : 'done-is-disabled'),
- ),
- array(
- $done_input,
- pht('Done'),
- ));
+ if ($this->getCanMarkDone()) {
+ $done_input = javelin_tag(
+ 'input',
+ array(
+ 'type' => 'checkbox',
+ 'checked' => ($is_done ? 'checked' : null),
+ 'disabled' => ($this->getCanMarkDone() ? null : 'disabled'),
+ 'class' => 'differential-inline-done',
+ 'sigil' => 'differential-inline-done',
+ ));
+ $done_button = phutil_tag(
+ 'label',
+ array(
+ 'class' => 'differential-inline-done-label '.
+ ($this->getCanMarkDone() ? null : 'done-is-disabled'),
+ ),
+ array(
+ $done_input,
+ pht('Done'),
+ ));
+ } else {
+ $done_button = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setColor(PHUIButtonView::SIMPLE)
+ ->addClass('mml');
+ if ($is_done) {
+ $done_button->setIconFont('fa-check');
+ $done_button->setText(pht('Done'));
+ $done_button->addClass('button-done');
+ } else {
+ $done_button->addClass('button-not-done');
+ $done_button->setText(pht('Not Done'));
+ }
+ }
}
$content = $this->markupEngine->getOutput(
@@ -299,7 +314,7 @@
}
if ($inline->isDraft() && !$is_synthetic) {
- $classes[] = 'differential-inline-comment-unsaved-draft';
+ $classes[] = 'inline-state-is-draft';
}
if ($is_synthetic) {
$classes[] = 'differential-inline-comment-synthetic';
diff --git a/webroot/rsrc/css/application/differential/phui-inline-comment.css b/webroot/rsrc/css/application/differential/phui-inline-comment.css
--- a/webroot/rsrc/css/application/differential/phui-inline-comment.css
+++ b/webroot/rsrc/css/application/differential/phui-inline-comment.css
@@ -39,8 +39,8 @@
border-radius: 3px;
}
-.differential-inline-comment-unsaved-draft {
- border: 1px solid {$lightgreyborder};
+.inline-state-is-draft {
+ border: 1px dashed {$greyborder};
}
.differential-inline-comment-head {
@@ -61,8 +61,8 @@
padding: 12px;
}
-.differential-inline-comment-unsaved-draft .differential-inline-comment-head {
- border-bottom: 1px solid {$lightgreyborder};
+.inline-state-is-draft .differential-inline-comment-head {
+ border-bottom: 1px dashed {$lightgreyborder};
background-color: {$lightgreybackground};
}
@@ -164,11 +164,11 @@
font-size: 14px;
}
-.differential-inline-comment-unsaved-draft .phui-button-bar .button {
+.inline-state-is-draft .phui-button-bar .button {
border-color: {$lightgreyborder};
}
-.differential-inline-comment-unsaved-draft .phui-button-bar .phui-icon-view {
+.inline-state-is-draft .phui-button-bar .phui-icon-view {
color: {$lightgreytext};
}
@@ -210,20 +210,20 @@
color: {$sh-yellowicon};
}
-.differential-inline-comment.differential-inline-comment-unsaved-draft
+.differential-inline-comment.inline-state-is-draft
.differential-inline-done-label,
-.differential-inline-comment.differential-inline-comment-unsaved-draft
+.differential-inline-comment.inline-state-is-draft
.button.simple {
border-color: {$lightgreyborder};
color: {$lightgreytext};
}
-.differential-inline-comment.differential-inline-comment-unsaved-draft
+.differential-inline-comment.inline-state-is-draft
.button.simple .phui-icon-view {
color: {$lightgreytext};
}
-.device-desktop .differential-inline-comment-unsaved-draft
+.device-desktop .inline-state-is-draft
a.button.simple:hover {
border-color: {$lightgreyborder};
}
@@ -244,21 +244,12 @@
cursor: pointer;
}
-.inline-state-is-draft .differential-inline-done-label {
- /* TODO: Placeholder style. */
- border-style: dashed;
-}
-
.differential-inline-done-label .differential-inline-done {
margin: 0 6px 0 0;
display: inline;
cursor: pointer;
}
-input.differential-inline-done[disabled="disabled"] {
- cursor: auto;
-}
-
.device-desktop .differential-inline-comment.inline-is-done
.differential-inline-done-label:hover,
.device-desktop .differential-inline-comment
@@ -268,44 +259,11 @@
border-color: {$lightblueborder};
}
-.differential-inline-comment .differential-inline-comment-head
- .differential-inline-done-label.done-is-disabled {
- color: {$sh-yellowtext};
- border-color: {$sh-yellowborder};
- opacity: .5;
-}
-
-.differential-inline-comment.differential-inline-comment-unsaved-draft
- .differential-inline-done-label.done-is-disabled {
- color: {$lightgreytext};
- border-color: {$lightgreyborder};
- opacity: .5;
-}
-
-.device-desktop
- .differential-inline-comment.differential-inline-comment-unsaved-draft
- .differential-inline-done-label.done-is-disabled:hover {
- background-color: transparent;
- cursor: auto;
-}
-
-.differential-inline-comment
- .differential-inline-done-label.done-is-disabled {
- border-color: {$sh-lightyellowborder};
- color: {$sh-yellowtext};
-}
-
-.device-desktop .differential-inline-comment
- .differential-inline-done-label.done-is-disabled:hover {
- background-color: transparent;
- cursor: auto;
-}
-
.differential-inline-comment.inline-is-done
.differential-inline-done-label {
background-color: #fff;
border-color: {$lightblueborder};
- color: {$sky} !important;
+ color: {$sky};
opacity: 1;
}
@@ -315,6 +273,26 @@
color: {$sky};
}
+.differential-inline-comment.inline-state-is-draft
+ .button-not-done:hover {
+ color: {$lightgreytext} !important;
+ background-color: transparent;
+ border-color: {$lightgreyborder};
+ cursor: auto;
+}
+
+.differential-inline-comment.inline-is-done .differential-inline-comment-head
+ .button.simple.button-done {
+ background-color: #fff;
+ color: {$sky};
+ border-color: {$sky};
+}
+
+.differential-inline-comment.inline-is-done .differential-inline-comment-head
+ .button.simple.button-done .phui-icon-view {
+ color: {$sky};
+}
+
/* - Inline Is Done -----------------------------------------------------------
@@ -333,13 +311,18 @@
}
.differential-inline-comment.inline-is-done .differential-inline-comment-head
- .button.simple,
-.differential-inline-comment.inline-is-done .differential-inline-comment-head
- .differential-inline-done-label {
+ .button.simple {
border-color: {$lightgreyborder};
color: {$lightgreytext};
}
+.differential-inline-comment.inline-is-done .differential-inline-comment-head
+ .differential-inline-done-label {
+ color: {$sky};
+ background-color: #fff;
+ border-color: {$sky};
+}
+
.differential-inline-comment.inline-is-done
.button.simple .phui-icon-view {
color: {$lightgreytext};
@@ -347,7 +330,7 @@
-/* - Unsaved Draft ------------------------------------------------------------
+/* - Inline State is Draft ----------------------------------------------------
The Unsubmitted state of the comment / done checkbox styles.
@@ -357,11 +340,14 @@
display: none;
}
-.differential-inline-comment.differential-inline-comment-unsaved-draft
- .inline-draft-text {
+.differential-inline-comment.inline-state-is-draft .inline-draft-text {
display: inline-block;
}
+.inline-state-is-draft .differential-inline-done-label {
+ border-style: dashed;
+}
+
/* - Undo ---------------------------------------------------------------------
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 9:55 AM (14 m, 54 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6910116
Default Alt Text
D12187.id29295.diff (9 KB)
Attached To
Mode
D12187: Polish up Done Button UI States
Attached
Detach File
Event Timeline
Log In to Comment