Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15420195
D18045.id43401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D18045.id43401.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
@@ -12,8 +12,8 @@
'core.pkg.css' => 'e9717bf2',
'core.pkg.js' => '1475bd91',
'darkconsole.pkg.js' => '1f9a31bc',
- 'differential.pkg.css' => '9ebe4f44',
- 'differential.pkg.js' => 'df1e385f',
+ 'differential.pkg.css' => 'a2755617',
+ 'differential.pkg.js' => '340b2cc9',
'diffusion.pkg.css' => 'b93d9b8c',
'diffusion.pkg.js' => '84c8f8fd',
'favicon.ico' => '30672e08',
@@ -64,7 +64,7 @@
'rsrc/css/application/dashboard/dashboard.css' => 'fe5b1869',
'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a',
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40',
- 'rsrc/css/application/differential/changeset-view.css' => '2971e2a2',
+ 'rsrc/css/application/differential/changeset-view.css' => '983751ee',
'rsrc/css/application/differential/core.css' => '5b7b8ff4',
'rsrc/css/application/differential/phui-inline-comment.css' => 'ffd1a542',
'rsrc/css/application/differential/revision-comment.css' => '14b8565a',
@@ -391,9 +391,9 @@
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173',
'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' => 'e7e7a357',
- 'rsrc/js/application/diff/DiffChangesetList.js' => 'b42eb5ff',
- 'rsrc/js/application/diff/DiffInline.js' => '45d37835',
+ 'rsrc/js/application/diff/DiffChangeset.js' => 'ba91f706',
+ 'rsrc/js/application/diff/DiffChangesetList.js' => '85abc805',
+ 'rsrc/js/application/diff/DiffInline.js' => '1d17130f',
'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',
@@ -566,7 +566,7 @@
'conpherence-thread-manager' => '4d863052',
'conpherence-transaction-css' => '85129c68',
'd3' => 'a11a5ff2',
- 'differential-changeset-view-css' => '2971e2a2',
+ 'differential-changeset-view-css' => '983751ee',
'differential-core-view-css' => '5b7b8ff4',
'differential-revision-add-comment-css' => 'c47f8c40',
'differential-revision-comment-css' => '14b8565a',
@@ -777,9 +777,9 @@
'phabricator-darklog' => 'c8e1ffe3',
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
- 'phabricator-diff-changeset' => 'e7e7a357',
- 'phabricator-diff-changeset-list' => 'b42eb5ff',
- 'phabricator-diff-inline' => '45d37835',
+ 'phabricator-diff-changeset' => 'ba91f706',
+ 'phabricator-diff-changeset-list' => '85abc805',
+ 'phabricator-diff-inline' => '1d17130f',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4',
'phabricator-fatal-config-template-css' => '8f18fa41',
@@ -1019,6 +1019,9 @@
'javelin-request',
'javelin-uri',
),
+ '1d17130f' => array(
+ 'javelin-dom',
+ ),
'1def2711' => array(
'javelin-install',
'javelin-dom',
@@ -1072,9 +1075,6 @@
'javelin-install',
'javelin-util',
),
- '2971e2a2' => array(
- 'phui-inline-comment-view-css',
- ),
'2ae077e1' => array(
'javelin-behavior',
'javelin-dom',
@@ -1192,9 +1192,6 @@
'javelin-behavior',
'javelin-dom',
),
- '45d37835' => array(
- 'javelin-dom',
- ),
'469c0d9e' => array(
'javelin-behavior',
'javelin-dom',
@@ -1530,6 +1527,9 @@
'javelin-dom',
'javelin-stratcom',
),
+ '85abc805' => array(
+ 'javelin-install',
+ ),
'85ee8ce6' => array(
'aphront-dialog-view-css',
),
@@ -1641,6 +1641,9 @@
'javelin-mask',
'phabricator-drag-and-drop-file-upload',
),
+ '983751ee' => array(
+ 'phui-inline-comment-view-css',
+ ),
'988040b4' => array(
'javelin-install',
'javelin-dom',
@@ -1808,9 +1811,6 @@
'b3e7d692' => array(
'javelin-install',
),
- 'b42eb5ff' => array(
- 'javelin-install',
- ),
'b59e1e96' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1846,6 +1846,17 @@
'javelin-uri',
'phabricator-notification',
),
+ 'ba91f706' => array(
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-install',
+ 'javelin-workflow',
+ 'javelin-router',
+ 'javelin-behavior-device',
+ 'javelin-vector',
+ 'phabricator-diff-inline',
+ ),
'bb1dd507' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -2129,17 +2140,6 @@
'javelin-workflow',
'javelin-magical-init',
),
- 'e7e7a357' => array(
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-install',
- 'javelin-workflow',
- 'javelin-router',
- 'javelin-behavior-device',
- 'javelin-vector',
- 'phabricator-diff-inline',
- ),
'e9581f08' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css
--- a/webroot/rsrc/css/application/differential/changeset-view.css
+++ b/webroot/rsrc/css/application/differential/changeset-view.css
@@ -408,3 +408,8 @@
.diff-banner-path {
color: {$greytext};
}
+
+.diff-banner-has-unsaved,
+.diff-banner-has-unsubmitted {
+ background: {$sh-yellowbackground};
+}
diff --git a/webroot/rsrc/js/application/diff/DiffChangeset.js b/webroot/rsrc/js/application/diff/DiffChangeset.js
--- a/webroot/rsrc/js/application/diff/DiffChangeset.js
+++ b/webroot/rsrc/js/application/diff/DiffChangeset.js
@@ -673,6 +673,11 @@
return null;
},
+ getInlines: function() {
+ this._rebuildAllInlines();
+ return this._inlines;
+ },
+
_rebuildAllInlines: function() {
var rows = JX.DOM.scry(this._node, 'tr');
for (var ii = 0; ii < rows.length; ii++) {
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
@@ -818,6 +818,11 @@
this._redrawSelection();
this._redrawHover();
+ // Force a banner redraw after a resize event. Particularly, this makes
+ // sure the inline state updates immediately after an inline edit
+ // operation, even if the changeset itself has not changed.
+ this._bannerChangeset = null;
+
this._redrawBanner();
},
@@ -1278,6 +1283,43 @@
return;
}
+ var changesets = this._changesets;
+ var unsaved = [];
+ var unsubmitted = [];
+ var undone = [];
+ var all = [];
+
+ for (var ii = 0; ii < changesets.length; ii++) {
+ var inlines = changesets[ii].getInlines();
+ for (var jj = 0; jj < inlines.length; jj++) {
+ var inline = inlines[jj];
+
+ if (inline.isDeleted()) {
+ continue;
+ }
+
+ all.push(inline);
+
+ if (inline.isEditing()) {
+ unsaved.push(inline);
+ } else if (inline.isDraft()) {
+ unsubmitted.push(inline);
+ } else if (!inline.isDone()) {
+ undone.push(inline);
+ }
+ }
+ }
+
+ JX.DOM.alterClass(
+ node,
+ 'diff-banner-has-unsaved',
+ !!unsaved.length);
+
+ JX.DOM.alterClass(
+ node,
+ 'diff-banner-has-unsubmitted',
+ !!unsubmitted.length);
+
var icon = new JX.PHUIXIconView()
.setIcon(changeset.getIcon())
.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
@@ -81,6 +81,22 @@
return this;
},
+ isDraft: function() {
+ return this._isDraft;
+ },
+
+ isDone: function() {
+ return this._isFixed;
+ },
+
+ isEditing: function() {
+ return this._isEditing;
+ },
+
+ isDeleted: function() {
+ return this._isDeleted;
+ },
+
bindToRange: function(data) {
this._displaySide = data.displaySide;
this._number = parseInt(data.number, 10);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 22, 12:06 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705491
Default Alt Text
D18045.id43401.diff (8 KB)
Attached To
Mode
D18045: Add a class to the Differential banner when unsubmitted/unsaved changes are present
Attached
Detach File
Event Timeline
Log In to Comment