Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15383265
D18126.id43620.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
13 KB
Referenced Files
None
Subscribers
None
D18126.id43620.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' => '1475bd91',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '4e99863c',
- 'differential.pkg.js' => 'b7504037',
+ 'differential.pkg.js' => 'ee50e5ae',
'diffusion.pkg.css' => 'b93d9b8c',
'diffusion.pkg.js' => '6134c5a1',
'favicon.ico' => '30672e08',
@@ -395,9 +395,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' => 'd498bddb',
- 'rsrc/js/application/diff/DiffChangesetList.js' => '29bbc02c',
- 'rsrc/js/application/diff/DiffInline.js' => '20553f71',
+ 'rsrc/js/application/diff/DiffChangeset.js' => '94f81a34',
+ 'rsrc/js/application/diff/DiffChangesetList.js' => 'fc6e482d',
+ 'rsrc/js/application/diff/DiffInline.js' => 'a386f83c',
'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',
@@ -774,9 +774,9 @@
'phabricator-darklog' => 'c8e1ffe3',
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
- 'phabricator-diff-changeset' => 'd498bddb',
- 'phabricator-diff-changeset-list' => '29bbc02c',
- 'phabricator-diff-inline' => '20553f71',
+ 'phabricator-diff-changeset' => '94f81a34',
+ 'phabricator-diff-changeset-list' => 'fc6e482d',
+ 'phabricator-diff-inline' => 'a386f83c',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4',
'phabricator-fatal-config-template-css' => '8f18fa41',
@@ -1039,9 +1039,6 @@
'javelin-install',
'javelin-dom',
),
- '20553f71' => array(
- 'javelin-dom',
- ),
'2290aeef' => array(
'javelin-install',
'javelin-dom',
@@ -1067,10 +1064,6 @@
'javelin-install',
'javelin-util',
),
- '29bbc02c' => array(
- 'javelin-install',
- 'phuix-button-view',
- ),
'2ae077e1' => array(
'javelin-behavior',
'javelin-dom',
@@ -1619,6 +1612,17 @@
'javelin-resource',
'javelin-routable',
),
+ '94f81a34' => array(
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-install',
+ 'javelin-workflow',
+ 'javelin-router',
+ 'javelin-behavior-device',
+ 'javelin-vector',
+ 'phabricator-diff-inline',
+ ),
'960f6a39' => array(
'javelin-behavior',
'javelin-dom',
@@ -1663,6 +1667,9 @@
'javelin-install',
'javelin-dom',
),
+ 'a386f83c' => array(
+ 'javelin-dom',
+ ),
'a3a63478' => array(
'phui-workcard-view-css',
),
@@ -1986,17 +1993,6 @@
'javelin-uri',
'javelin-util',
),
- 'd498bddb' => array(
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-install',
- 'javelin-workflow',
- 'javelin-router',
- 'javelin-behavior-device',
- 'javelin-vector',
- 'phabricator-diff-inline',
- ),
'd4eecc63' => array(
'javelin-behavior',
'javelin-dom',
@@ -2158,6 +2154,10 @@
'javelin-behavior-device',
'phabricator-keyboard-shortcut',
),
+ 'fc6e482d' => array(
+ 'javelin-install',
+ 'phuix-button-view',
+ ),
'fc91ab6c' => array(
'javelin-behavior',
'javelin-dom',
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
@@ -257,15 +257,15 @@
'You must select a comment to mark done.' =>
pht('You must select a comment to mark done.'),
- 'Hide or show inline comment.' =>
- pht('Hide or show inline comment.'),
+ 'Collapse or expand inline comment.' =>
+ pht('Collapse or expand inline comment.'),
'You must select a comment to hide.' =>
pht('You must select a comment to hide.'),
- 'Jump to next inline comment, including hidden comments.' =>
- pht('Jump to next inline comment, including hidden comments.'),
- 'Jump to previous inline comment, including hidden comments.' =>
- pht('Jump to previous inline comment, including hidden comments.'),
+ 'Jump to next inline comment, including collapsed comments.' =>
+ pht('Jump to next inline comment, including collapsed comments.'),
+ 'Jump to previous inline comment, including collapsed comments.' =>
+ pht('Jump to previous inline comment, including collapsed comments.'),
'This file content has been collapsed.' =>
pht('This file content has been collapsed.'),
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
@@ -265,7 +265,7 @@
if (!$this->preview && $this->canHide()) {
$action_buttons[] = id(new PHUIButtonView())
->setTag('a')
- ->setTooltip(pht('Hide Comment'))
+ ->setTooltip(pht('Collapse'))
->setIcon('fa-times')
->addSigil('hide-inline')
->setMustCapture(true);
diff --git a/src/infrastructure/diff/view/PHUIDiffRevealIconView.php b/src/infrastructure/diff/view/PHUIDiffRevealIconView.php
--- a/src/infrastructure/diff/view/PHUIDiffRevealIconView.php
+++ b/src/infrastructure/diff/view/PHUIDiffRevealIconView.php
@@ -8,7 +8,7 @@
->addSigil('has-tooltip')
->setMetadata(
array(
- 'tip' => pht('Show Hidden Comment'),
+ 'tip' => pht('Expand'),
'align' => 'E',
'size' => 275,
));
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
@@ -446,7 +446,7 @@
type: block.type,
changeset: this,
target: inline,
- hidden: inline.isHidden(),
+ collapsed: inline.isCollapsed(),
deleted: !inline.getID() && !inline.isEditing(),
nodes: {
begin: block.items[jj],
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
@@ -19,11 +19,11 @@
var onmenu = JX.bind(this, this._ifawake, this._onmenu);
JX.Stratcom.listen('click', 'differential-view-options', onmenu);
- var onhide = JX.bind(this, this._ifawake, this._onhide);
- JX.Stratcom.listen('click', 'hide-inline', onhide);
+ var oncollapse = JX.bind(this, this._ifawake, this._oncollapse, true);
+ JX.Stratcom.listen('click', 'hide-inline', oncollapse);
- var onreveal = JX.bind(this, this._ifawake, this._onreveal);
- JX.Stratcom.listen('click', 'reveal-inline', onreveal);
+ var onexpand = JX.bind(this, this._ifawake, this._oncollapse, false);
+ JX.Stratcom.listen('click', 'reveal-inline', onexpand);
var onedit = JX.bind(this, this._ifawake, this._onaction, 'edit');
JX.Stratcom.listen(
@@ -158,11 +158,11 @@
label = pht('Jump to previous inline comment.');
this._installJumpKey('p', label, -1, 'comment');
- label = pht('Jump to next inline comment, including hidden comments.');
+ label = pht('Jump to next inline comment, including collapsed comments.');
this._installJumpKey('N', label, 1, 'comment', true);
label = pht(
- 'Jump to previous inline comment, including hidden comments.');
+ 'Jump to previous inline comment, including collapsed comments.');
this._installJumpKey('P', label, -1, 'comment', true);
label = pht('Hide or show the current file.');
@@ -183,8 +183,8 @@
label = pht('Mark or unmark selected inline comment as done.');
this._installKey('w', label, this._onkeydone);
- label = pht('Hide or show inline comment.');
- this._installKey('q', label, this._onkeyhide);
+ label = pht('Collapse or expand inline comment.');
+ this._installKey('q', label, this._onkeycollapse);
},
isAsleep: function() {
@@ -261,12 +261,12 @@
.register();
},
- _installJumpKey: function(key, label, delta, filter, show_hidden) {
+ _installJumpKey: function(key, label, delta, filter, show_collapsed) {
filter = filter || null;
var options = {
filter: filter,
- hidden: show_hidden
+ collapsed: show_collapsed
};
var handler = JX.bind(this, this._onjumpkey, delta, options);
@@ -424,16 +424,16 @@
this._warnUser(pht('You must select a file to hide or show.'));
},
- _onkeyhide: function() {
+ _onkeycollapse: function() {
var cursor = this._cursorItem;
if (cursor) {
if (cursor.type == 'comment') {
var inline = cursor.target;
- if (inline.canHide()) {
+ if (inline.canCollapse()) {
this.setFocus(null);
- inline.setHidden(!inline.isHidden());
+ inline.setCollapsed(!inline.isCollapsed());
return;
}
}
@@ -455,7 +455,7 @@
var state = this._getSelectionState();
var filter = options.filter || null;
- var hidden = options.hidden || false;
+ var collapsed = options.collapsed || false;
var wrap = options.wrap || false;
var attribute = options.attribute || null;
@@ -507,10 +507,10 @@
}
}
- // If the item is hidden, don't select it when iterating with jump
+ // If the item is collapsed, don't select it when iterating with jump
// keys. It can still potentially be selected in other ways.
- if (!hidden) {
- if (items[cursor].hidden) {
+ if (!collapsed) {
+ if (items[cursor].collapsed) {
continue;
}
}
@@ -851,20 +851,12 @@
menu.open();
},
- _onhide: function(e) {
- this._onhidereveal(e, true);
- },
-
- _onreveal: function(e) {
- this._onhidereveal(e, false);
- },
-
- _onhidereveal: function(e, is_hide) {
+ _oncollapse: function(is_collapse, e) {
e.kill();
var inline = this._getInlineForEvent(e);
- inline.setHidden(is_hide);
+ inline.setCollapsed(is_collapse);
},
_onresize: function() {
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
@@ -14,7 +14,6 @@
_phid: null,
_changesetID: null,
_row: null,
- _hidden: false,
_number: null,
_length: null,
_displaySide: null,
@@ -30,6 +29,7 @@
_changeset: null,
+ _isCollapsed: false,
_isDraft: null,
_isFixed: null,
_isEditing: false,
@@ -41,7 +41,7 @@
var row_data = JX.Stratcom.getData(row);
row_data.inline = this;
- this._hidden = row_data.hidden || false;
+ this._isCollapsed = row_data.hidden || false;
// TODO: Get smarter about this once we do more editing, this is pretty
// hacky.
@@ -225,7 +225,7 @@
return true;
},
- canHide: function() {
+ canCollapse: function() {
if (!JX.DOM.scry(this._row, 'a', 'hide-inline').length) {
return false;
}
@@ -254,20 +254,18 @@
this._id = null;
this._phid = null;
- this._hidden = false;
+ this._isCollapsed = false;
this._originalText = null;
return row;
},
- setHidden: function(hidden) {
- this._hidden = hidden;
-
- JX.DOM.alterClass(this._row, 'inline-hidden', this._hidden);
+ setCollapsed: function(collapsed) {
+ this._isCollapsed = collapsed;
var op;
- if (hidden) {
+ if (collapsed) {
op = 'hide';
} else {
op = 'show';
@@ -280,11 +278,12 @@
.setHandler(JX.bag)
.start();
+ this._redraw();
this._didUpdate(true);
},
- isHidden: function() {
- return this._hidden;
+ isCollapsed: function() {
+ return this._isCollapsed;
},
toggleDone: function() {
@@ -703,11 +702,13 @@
_redraw: function() {
var is_invisible = (this._isInvisible || this._isDeleted);
- var is_loading = (this._isLoading);
+ var is_loading = this._isLoading;
+ var is_collapsed = this._isCollapsed;
var row = this._row;
JX.DOM.alterClass(row, 'differential-inline-hidden', is_invisible);
JX.DOM.alterClass(row, 'differential-inline-loading', is_loading);
+ JX.DOM.alterClass(row, 'inline-hidden', is_collapsed);
},
_removeRow: function(row) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 3:59 PM (6 d, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7561107
Default Alt Text
D18126.id43620.diff (13 KB)
Attached To
Mode
D18126: In the UI, rename "Hide Inline" to "Collapse Inline"
Attached
Detach File
Event Timeline
Log In to Comment