Page MenuHomePhabricator

D18103.id43549.diff
No OneTemporary

D18103.id43549.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -13,7 +13,7 @@
'core.pkg.js' => '1475bd91',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '1ccbf3a9',
- 'differential.pkg.js' => '889ab0ab',
+ 'differential.pkg.js' => 'be47a9c3',
'diffusion.pkg.css' => 'b93d9b8c',
'diffusion.pkg.js' => '84c8f8fd',
'favicon.ico' => '30672e08',
@@ -394,8 +394,8 @@
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
'rsrc/js/application/diff/DiffChangeset.js' => 'd498bddb',
- 'rsrc/js/application/diff/DiffChangesetList.js' => '0db8cdca',
- 'rsrc/js/application/diff/DiffInline.js' => '1d17130f',
+ 'rsrc/js/application/diff/DiffChangesetList.js' => '29bbc02c',
+ 'rsrc/js/application/diff/DiffInline.js' => '20553f71',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1',
@@ -773,8 +773,8 @@
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
'phabricator-diff-changeset' => 'd498bddb',
- 'phabricator-diff-changeset-list' => '0db8cdca',
- 'phabricator-diff-inline' => '1d17130f',
+ 'phabricator-diff-changeset-list' => '29bbc02c',
+ 'phabricator-diff-inline' => '20553f71',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4',
'phabricator-fatal-config-template-css' => '8f18fa41',
@@ -960,10 +960,6 @@
'javelin-dom',
'javelin-router',
),
- '0db8cdca' => array(
- 'javelin-install',
- 'phuix-button-view',
- ),
'0f764c35' => array(
'javelin-install',
'javelin-util',
@@ -1021,9 +1017,6 @@
'javelin-request',
'javelin-uri',
),
- '1d17130f' => array(
- 'javelin-dom',
- ),
'1e911d0f' => array(
'javelin-stratcom',
'javelin-request',
@@ -1047,6 +1040,9 @@
'javelin-install',
'javelin-dom',
),
+ '20553f71' => array(
+ 'javelin-dom',
+ ),
'2290aeef' => array(
'javelin-install',
'javelin-dom',
@@ -1072,6 +1068,10 @@
'javelin-install',
'javelin-util',
),
+ '29bbc02c' => array(
+ 'javelin-install',
+ 'phuix-button-view',
+ ),
'2ae077e1' => array(
'javelin-behavior',
'javelin-dom',
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
@@ -107,6 +107,11 @@
break;
}
+ $is_synthetic = false;
+ if ($inline->getSyntheticAuthor()) {
+ $is_synthetic = true;
+ }
+
$metadata = array(
'id' => $inline->getID(),
'phid' => $inline->getPHID(),
@@ -120,6 +125,7 @@
'isDraft' => $inline->isDraft(),
'isFixed' => $is_fixed,
'isGhost' => $inline->getIsGhost(),
+ 'isSynthetic' => $is_synthetic,
);
$sigil = 'differential-inline-comment';
@@ -136,11 +142,6 @@
$links = array();
- $is_synthetic = false;
- if ($inline->getSyntheticAuthor()) {
- $is_synthetic = true;
- }
-
$draft_text = null;
if (!$is_synthetic) {
// This display is controlled by CSS
diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js
--- a/webroot/rsrc/js/application/diff/DiffChangesetList.js
+++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js
@@ -1352,8 +1352,16 @@
continue;
}
+ if (inline.isSynthetic()) {
+ continue;
+ }
+
if (inline.isEditing()) {
unsaved.push(inline);
+ } else if (!inline.getID()) {
+ // These are new comments which have been cancelled, and do not
+ // count as anything.
+ continue;
} else if (inline.isDraft()) {
unsubmitted.push(inline);
} else if (!inline.isDone()) {
@@ -1395,13 +1403,28 @@
}
if (done.length || undone.length) {
- done_button.setText([
- done.length,
- ' / ',
- (done.length + undone.length),
- ' ',
- pht('Comments')
- ]);
+ // If you haven't marked any comments as "Done", we just show text
+ // like "3 Comments". If you've marked at least one done, we show
+ // "1 / 3 Comments".
+
+ var done_text;
+ if (done.length) {
+ done_text = [
+ done.length,
+ ' / ',
+ (done.length + undone.length),
+ ' ',
+ pht('Comments')
+ ];
+ } else {
+ done_text = [
+ undone.length,
+ ' ',
+ pht('Comments')
+ ];
+ }
+
+ done_button.setText(done_text);
JX.DOM.show(done_button.getNode());
diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js
--- a/webroot/rsrc/js/application/diff/DiffInline.js
+++ b/webroot/rsrc/js/application/diff/DiffInline.js
@@ -34,6 +34,7 @@
_isFixed: null,
_isEditing: false,
_isNew: false,
+ _isSynthetic: false,
bindToRow: function(row) {
this._row = row;
@@ -71,6 +72,7 @@
this._isDraft = data.isDraft;
this._isFixed = data.isFixed;
this._isGhost = data.isGhost;
+ this._isSynthetic = data.isSynthetic;
this._changesetID = data.changesetID;
this._isNew = false;
@@ -97,6 +99,10 @@
return this._isDeleted;
},
+ isSynthetic: function() {
+ return this._isSynthetic;
+ },
+
bindToRange: function(data) {
this._displaySide = data.displaySide;
this._number = parseInt(data.number, 10);

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 1, 9:02 AM (5 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7312992
Default Alt Text
D18103.id43549.diff (6 KB)

Event Timeline