mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-13 00:01:03 +01:00
Fix reticle for diff-of-diffs
Summary: The older logic was incorrect: - It chose `change.left` for `data.on_right` being true. - 'O' and 'N' mean 'old' and 'new', not 'left' and 'right'. In diff-of-diffs, both sides are 'N'. So, select the changeset ID correctly (pick the right side one for on_right), and select the new file prefix correctly (N for new, O for old). Test Plan: Waved my mouse over some inline comments in a diff-of-diffs, got reasonable-looking reticles. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran Maniphest Tasks: T1076 Differential Revision: https://secure.phabricator.com/D2138
This commit is contained in:
parent
7507981f22
commit
869f24bf33
2 changed files with 23 additions and 26 deletions
|
@ -569,7 +569,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-differential-edit-inline-comments' =>
|
||||
array(
|
||||
'uri' => '/res/d95624e2/rsrc/js/application/differential/behavior-edit-inline-comments.js',
|
||||
'uri' => '/res/5e29ada1/rsrc/js/application/differential/behavior-edit-inline-comments.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -2127,7 +2127,7 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/18be02e0/differential.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'b2139675' =>
|
||||
'79ad666a' =>
|
||||
array(
|
||||
'name' => 'differential.pkg.js',
|
||||
'symbols' =>
|
||||
|
@ -2150,7 +2150,7 @@ celerity_register_resource_map(array(
|
|||
15 => 'javelin-behavior-differential-dropdown-menus',
|
||||
16 => 'javelin-behavior-buoyant',
|
||||
),
|
||||
'uri' => '/res/pkg/b2139675/differential.pkg.js',
|
||||
'uri' => '/res/pkg/79ad666a/differential.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'4ccda8a6' =>
|
||||
|
@ -2240,7 +2240,7 @@ celerity_register_resource_map(array(
|
|||
'aphront-typeahead-control-css' => '803864a4',
|
||||
'differential-changeset-view-css' => '18be02e0',
|
||||
'differential-core-view-css' => '18be02e0',
|
||||
'differential-inline-comment-editor' => 'b2139675',
|
||||
'differential-inline-comment-editor' => '79ad666a',
|
||||
'differential-local-commits-view-css' => '18be02e0',
|
||||
'differential-revision-add-comment-css' => '18be02e0',
|
||||
'differential-revision-comment-css' => '18be02e0',
|
||||
|
@ -2251,27 +2251,27 @@ celerity_register_resource_map(array(
|
|||
'diffusion-commit-view-css' => '4ccda8a6',
|
||||
'javelin-behavior' => '4fbae2af',
|
||||
'javelin-behavior-aphront-basic-tokenizer' => '2af849fb',
|
||||
'javelin-behavior-aphront-drag-and-drop' => 'b2139675',
|
||||
'javelin-behavior-aphront-drag-and-drop-textarea' => 'b2139675',
|
||||
'javelin-behavior-aphront-drag-and-drop' => '79ad666a',
|
||||
'javelin-behavior-aphront-drag-and-drop-textarea' => '79ad666a',
|
||||
'javelin-behavior-aphront-form-disable-on-submit' => '21d01ed8',
|
||||
'javelin-behavior-buoyant' => 'b2139675',
|
||||
'javelin-behavior-differential-accept-with-errors' => 'b2139675',
|
||||
'javelin-behavior-differential-add-reviewers-and-ccs' => 'b2139675',
|
||||
'javelin-behavior-differential-comment-jump' => 'b2139675',
|
||||
'javelin-behavior-differential-diff-radios' => 'b2139675',
|
||||
'javelin-behavior-differential-dropdown-menus' => 'b2139675',
|
||||
'javelin-behavior-differential-edit-inline-comments' => 'b2139675',
|
||||
'javelin-behavior-differential-feedback-preview' => 'b2139675',
|
||||
'javelin-behavior-differential-keyboard-navigation' => 'b2139675',
|
||||
'javelin-behavior-differential-populate' => 'b2139675',
|
||||
'javelin-behavior-differential-show-more' => 'b2139675',
|
||||
'javelin-behavior-buoyant' => '79ad666a',
|
||||
'javelin-behavior-differential-accept-with-errors' => '79ad666a',
|
||||
'javelin-behavior-differential-add-reviewers-and-ccs' => '79ad666a',
|
||||
'javelin-behavior-differential-comment-jump' => '79ad666a',
|
||||
'javelin-behavior-differential-diff-radios' => '79ad666a',
|
||||
'javelin-behavior-differential-dropdown-menus' => '79ad666a',
|
||||
'javelin-behavior-differential-edit-inline-comments' => '79ad666a',
|
||||
'javelin-behavior-differential-feedback-preview' => '79ad666a',
|
||||
'javelin-behavior-differential-keyboard-navigation' => '79ad666a',
|
||||
'javelin-behavior-differential-populate' => '79ad666a',
|
||||
'javelin-behavior-differential-show-more' => '79ad666a',
|
||||
'javelin-behavior-maniphest-batch-selector' => '86fc0b0c',
|
||||
'javelin-behavior-maniphest-transaction-controls' => '86fc0b0c',
|
||||
'javelin-behavior-maniphest-transaction-expand' => '86fc0b0c',
|
||||
'javelin-behavior-maniphest-transaction-preview' => '86fc0b0c',
|
||||
'javelin-behavior-phabricator-autofocus' => '21d01ed8',
|
||||
'javelin-behavior-phabricator-keyboard-shortcuts' => '21d01ed8',
|
||||
'javelin-behavior-phabricator-object-selector' => 'b2139675',
|
||||
'javelin-behavior-phabricator-object-selector' => '79ad666a',
|
||||
'javelin-behavior-phabricator-watch-anchor' => '21d01ed8',
|
||||
'javelin-behavior-refresh-csrf' => '21d01ed8',
|
||||
'javelin-behavior-workflow' => '21d01ed8',
|
||||
|
@ -2299,7 +2299,7 @@ celerity_register_resource_map(array(
|
|||
'phabricator-core-buttons-css' => '803864a4',
|
||||
'phabricator-core-css' => '803864a4',
|
||||
'phabricator-directory-css' => '803864a4',
|
||||
'phabricator-drag-and-drop-file-upload' => 'b2139675',
|
||||
'phabricator-drag-and-drop-file-upload' => '79ad666a',
|
||||
'phabricator-dropdown-menu' => '21d01ed8',
|
||||
'phabricator-jump-nav' => '803864a4',
|
||||
'phabricator-keyboard-shortcut' => '21d01ed8',
|
||||
|
@ -2308,7 +2308,7 @@ celerity_register_resource_map(array(
|
|||
'phabricator-object-selector-css' => '18be02e0',
|
||||
'phabricator-paste-file-upload' => '21d01ed8',
|
||||
'phabricator-remarkup-css' => '803864a4',
|
||||
'phabricator-shaped-request' => 'b2139675',
|
||||
'phabricator-shaped-request' => '79ad666a',
|
||||
'phabricator-standard-page-view' => '803864a4',
|
||||
'phabricator-transaction-view-css' => '803864a4',
|
||||
'syntax-highlighting-css' => '803864a4',
|
||||
|
|
|
@ -170,12 +170,9 @@ JX.behavior('differential-edit-inline-comments', function(config) {
|
|||
var data = e.getNodeData('differential-inline-comment');
|
||||
var change = e.getNodeData('differential-changeset');
|
||||
|
||||
var prefix;
|
||||
if (data.on_right) {
|
||||
prefix = 'C' + (change.left) + 'NL';
|
||||
} else {
|
||||
prefix = 'C' + (change.right) + 'OL';
|
||||
}
|
||||
var id_part = data.on_right ? change.right : change.left;
|
||||
var new_part = isNewFile(e.getTarget()) ? 'N' : 'O';
|
||||
var prefix = 'C' + id_part + new_part + 'L';
|
||||
|
||||
origin = JX.$(prefix + data.number);
|
||||
target = JX.$(prefix + (parseInt(data.number, 10) +
|
||||
|
|
Loading…
Reference in a new issue