Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409531
D18774.id45049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D18774.id45049.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
@@ -13,7 +13,7 @@
'core.pkg.js' => '4c79d74f',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e',
- 'differential.pkg.js' => 'ae6460e0',
+ 'differential.pkg.js' => '500a75c5',
'diffusion.pkg.css' => 'a2d17c7d',
'diffusion.pkg.js' => '6134c5a1',
'favicon.ico' => '30672e08',
@@ -396,7 +396,7 @@
'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' => '99abf4cd',
- 'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c',
+ 'rsrc/js/application/diff/DiffChangesetList.js' => '3b77efdd',
'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
@@ -775,7 +775,7 @@
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
'phabricator-diff-changeset' => '99abf4cd',
- 'phabricator-diff-changeset-list' => '8f1cd52c',
+ 'phabricator-diff-changeset-list' => '3b77efdd',
'phabricator-diff-inline' => 'e83d28f3',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4',
@@ -1137,6 +1137,10 @@
'javelin-dom',
'javelin-magical-init',
),
+ '3b77efdd' => array(
+ 'javelin-install',
+ 'phuix-button-view',
+ ),
'3cb0b2fc' => array(
'javelin-behavior',
'javelin-dom',
@@ -1610,10 +1614,6 @@
'8e1baf68' => array(
'phui-button-css',
),
- '8f1cd52c' => array(
- 'javelin-install',
- 'phuix-button-view',
- ),
'8f29b364' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php
--- a/src/applications/differential/view/DifferentialChangesetListView.php
+++ b/src/applications/differential/view/DifferentialChangesetListView.php
@@ -301,6 +301,9 @@
'Hide or show all inline comments.' =>
pht('Hide or show all inline comments.'),
+
+ 'Finish editing inline comments before changing display modes.' =>
+ pht('Finish editing inline comments before changing display modes.'),
),
));
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
@@ -465,7 +465,7 @@
new JX.Notification()
.setContent(message)
.alterClassName('jx-notification-alert', true)
- .setDuration(1000)
+ .setDuration(3000)
.show();
},
@@ -691,6 +691,7 @@
'div',
'differential-changeset');
+ var changeset_list = this;
var changeset = this.getChangesetForNode(node);
var menu = new JX.PHUIXDropdownMenu(button);
@@ -738,6 +739,22 @@
var up_item = new JX.PHUIXActionView()
.setHandler(function(e) {
if (changeset.isLoaded()) {
+
+ // Don't let the user swap display modes if a comment is being
+ // edited, since they might lose their work. See PHI180.
+ var inlines = changeset.getInlines();
+ for (var ii = 0; ii < inlines.length; ii++) {
+ if (inlines[ii].isEditing()) {
+ changeset_list._warnUser(
+ pht(
+ 'Finish editing inline comments before changing display ' +
+ 'modes.'));
+ e.prevent();
+ menu.close();
+ return;
+ }
+ }
+
var renderer = changeset.getRenderer();
if (renderer == '1up') {
renderer = '2up';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 4:39 AM (4 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704590
Default Alt Text
D18774.id45049.diff (4 KB)
Attached To
Mode
D18774: Warn and prevent 1-up/2-up switch in Differential if the user is editing an inline
Attached
Detach File
Event Timeline
Log In to Comment