Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15451110
D17937.id43141.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D17937.id43141.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' => '0f87a6eb',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => 'ea471cb0',
- 'differential.pkg.js' => '4a466790',
+ 'differential.pkg.js' => '9ff5b8d2',
'diffusion.pkg.css' => 'b93d9b8c',
'diffusion.pkg.js' => '84c8f8fd',
'favicon.ico' => '30672e08',
@@ -390,7 +390,7 @@
'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' => '68758d99',
+ 'rsrc/js/application/diff/DiffChangeset.js' => 'dc969d3e',
'rsrc/js/application/diff/DiffChangesetList.js' => '796922e0',
'rsrc/js/application/diff/DiffInline.js' => '1afe9760',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
@@ -777,7 +777,7 @@
'phabricator-darklog' => 'c8e1ffe3',
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
- 'phabricator-diff-changeset' => '68758d99',
+ 'phabricator-diff-changeset' => 'dc969d3e',
'phabricator-diff-changeset-list' => '796922e0',
'phabricator-diff-inline' => '1afe9760',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
@@ -1403,17 +1403,6 @@
'javelin-dom',
'phabricator-notification',
),
- '68758d99' => array(
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-install',
- 'javelin-workflow',
- 'javelin-router',
- 'javelin-behavior-device',
- 'javelin-vector',
- 'phabricator-diff-inline',
- ),
'6882e80a' => array(
'javelin-dom',
),
@@ -2066,6 +2055,17 @@
'javelin-util',
'phabricator-shaped-request',
),
+ 'dc969d3e' => array(
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-install',
+ 'javelin-workflow',
+ 'javelin-router',
+ 'javelin-behavior-device',
+ 'javelin-vector',
+ 'phabricator-diff-inline',
+ ),
'de2e896f' => array(
'javelin-behavior',
'javelin-dom',
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
@@ -581,11 +581,19 @@
},
getInlineByID: function(id) {
- // TODO: Currently, this will only find inlines which the user has
- // already interacted with! Inlines are built lazily as events arrive.
- // This can not yet find inlines which are passively present in the
- // document.
+ // First, look for the inline in the objects we've already built.
+ var inline = this._findInlineByID(id);
+ if (inline) {
+ return inline;
+ }
+
+ // If we haven't found a matching inline yet, rebuild all the inlines
+ // present in the document, then look again.
+ this._rebuildAllInlines();
+ return this._findInlineByID(id);
+ },
+ _findInlineByID: function(id) {
for (var ii = 0; ii < this._inlines.length; ii++) {
var inline = this._inlines[ii];
if (inline.getID() == id) {
@@ -594,8 +602,21 @@
}
return null;
- }
+ },
+
+ _rebuildAllInlines: function() {
+ var rows = JX.DOM.scry(this._node, 'tr');
+ for (var ii = 0; ii < rows.length; ii++) {
+ var row = rows[ii];
+ if (this._getRowType(row) != 'comment') {
+ continue;
+ }
+ // As a side effect, this builds any missing inline objects and adds
+ // them to this Changeset's list of inlines.
+ this.getInlineForRow(row);
+ }
+ }
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 29, 8:11 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7715455
Default Alt Text
D17937.id43141.diff (3 KB)
Attached To
Mode
D17937: Allow any inline in the document to be queried by ID
Attached
Detach File
Event Timeline
Log In to Comment