mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-27 06:58:17 +01:00
Fix inline reticles and dialogs for new scrollbars
Summary: Fixes T7054. Fixes T7049. - Stop scrolling Differential reticles when the page scrolls. - Make dialogs aware of multi-panel UI. Test Plan: - Dialogs pop up in the right place. - Inline + scroll now longer leaves the inline in a fixed position. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7049, T7054 Differential Revision: https://secure.phabricator.com/D11523
This commit is contained in:
parent
893243b789
commit
41dcd7420b
3 changed files with 40 additions and 32 deletions
|
@ -8,10 +8,10 @@
|
|||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'f020a5d6',
|
||||
'core.pkg.js' => '55716d41',
|
||||
'core.pkg.js' => 'df35fdde',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => '8af45893',
|
||||
'differential.pkg.js' => 'f437e70e',
|
||||
'differential.pkg.js' => '5c1f3896',
|
||||
'diffusion.pkg.css' => '591664fa',
|
||||
'diffusion.pkg.js' => 'bfc0737b',
|
||||
'maniphest.pkg.css' => 'e34dfbec',
|
||||
|
@ -201,7 +201,7 @@ return array(
|
|||
'rsrc/externals/javelin/lib/URI.js' => '6eff08aa',
|
||||
'rsrc/externals/javelin/lib/Vector.js' => 'cc1bd0b0',
|
||||
'rsrc/externals/javelin/lib/WebSocket.js' => '3f840822',
|
||||
'rsrc/externals/javelin/lib/Workflow.js' => '24b7d5a8',
|
||||
'rsrc/externals/javelin/lib/Workflow.js' => 'a2ccdfec',
|
||||
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
|
||||
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
|
||||
'rsrc/externals/javelin/lib/__tests__/JSON.js' => '837a7d68',
|
||||
|
@ -358,7 +358,7 @@ return array(
|
|||
'rsrc/js/application/differential/behavior-comment-preview.js' => '6932def3',
|
||||
'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1',
|
||||
'rsrc/js/application/differential/behavior-dropdown-menus.js' => 'e33d4bc5',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '00861799',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '65936067',
|
||||
'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => 'bdb3e4d0',
|
||||
'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf',
|
||||
|
@ -561,7 +561,7 @@ return array(
|
|||
'javelin-behavior-differential-comment-jump' => '4fdb476d',
|
||||
'javelin-behavior-differential-diff-radios' => 'e1ff79b1',
|
||||
'javelin-behavior-differential-dropdown-menus' => 'e33d4bc5',
|
||||
'javelin-behavior-differential-edit-inline-comments' => '00861799',
|
||||
'javelin-behavior-differential-edit-inline-comments' => '65936067',
|
||||
'javelin-behavior-differential-feedback-preview' => '6932def3',
|
||||
'javelin-behavior-differential-keyboard-navigation' => '2c426492',
|
||||
'javelin-behavior-differential-populate' => 'bdb3e4d0',
|
||||
|
@ -687,7 +687,7 @@ return array(
|
|||
'javelin-view-renderer' => '6c2b09a2',
|
||||
'javelin-view-visitor' => 'efe49472',
|
||||
'javelin-websocket' => '3f840822',
|
||||
'javelin-workflow' => '24b7d5a8',
|
||||
'javelin-workflow' => 'a2ccdfec',
|
||||
'lightbox-attachment-css' => '7acac05d',
|
||||
'maniphest-batch-editor' => '8f380ebc',
|
||||
'maniphest-report-css' => '6fc16517',
|
||||
|
@ -820,14 +820,6 @@ return array(
|
|||
'unhandled-exception-css' => '37d4f9a2',
|
||||
),
|
||||
'requires' => array(
|
||||
'00861799' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-vector',
|
||||
'differential-inline-comment-editor',
|
||||
),
|
||||
'029a133d' => array(
|
||||
'aphront-dialog-view-css',
|
||||
),
|
||||
|
@ -947,17 +939,6 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-util',
|
||||
),
|
||||
'24b7d5a8' => array(
|
||||
'javelin-stratcom',
|
||||
'javelin-request',
|
||||
'javelin-dom',
|
||||
'javelin-vector',
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
'javelin-mask',
|
||||
'javelin-uri',
|
||||
'javelin-routable',
|
||||
),
|
||||
'2818f5ce' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
@ -1257,6 +1238,14 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-fx',
|
||||
),
|
||||
65936067 => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-vector',
|
||||
'differential-inline-comment-editor',
|
||||
),
|
||||
'6882e80a' => array(
|
||||
'javelin-dom',
|
||||
),
|
||||
|
@ -1567,6 +1556,17 @@ return array(
|
|||
'javelin-vector',
|
||||
'javelin-magical-init',
|
||||
),
|
||||
'a2ccdfec' => array(
|
||||
'javelin-stratcom',
|
||||
'javelin-request',
|
||||
'javelin-dom',
|
||||
'javelin-vector',
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
'javelin-mask',
|
||||
'javelin-uri',
|
||||
'javelin-routable',
|
||||
),
|
||||
'a4ae61bf' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
|
|
@ -171,10 +171,12 @@ JX.install('Workflow', {
|
|||
'didSyntheticSubmit',
|
||||
[],
|
||||
JX.Workflow._onsyntheticsubmit);
|
||||
document.body.appendChild(this._root);
|
||||
|
||||
var frame = JX.DOM.getContentFrame();
|
||||
frame.appendChild(this._root);
|
||||
var d = JX.Vector.getDim(this._root);
|
||||
var v = JX.Vector.getViewport();
|
||||
var s = JX.Vector.getScroll();
|
||||
var v = JX.Vector.getDim(frame);
|
||||
var s = JX.Vector.getAggregateScrollForNode(frame);
|
||||
|
||||
// Normally, we position dialogs 100px from the top of the screen.
|
||||
// Use more space if the dialog is large (at least roughly the size
|
||||
|
|
|
@ -13,7 +13,6 @@ JX.behavior('differential-edit-inline-comments', function(config) {
|
|||
var selecting = false;
|
||||
var reticle = JX.$N('div', {className: 'differential-reticle'});
|
||||
JX.DOM.hide(reticle);
|
||||
document.body.appendChild(reticle);
|
||||
|
||||
var origin = null;
|
||||
var target = null;
|
||||
|
@ -23,6 +22,8 @@ JX.behavior('differential-edit-inline-comments', function(config) {
|
|||
var editor = null;
|
||||
|
||||
function updateReticle() {
|
||||
JX.DOM.getContentFrame().appendChild(reticle);
|
||||
|
||||
var top = origin;
|
||||
var bot = target;
|
||||
if (JX.$V(top).y > JX.$V(bot).y) {
|
||||
|
@ -32,12 +33,17 @@ JX.behavior('differential-edit-inline-comments', function(config) {
|
|||
}
|
||||
var code = target.nextSibling;
|
||||
|
||||
var pos = JX.$V(top).add(1 + JX.Vector.getDim(target).x, 0);
|
||||
var pos = JX.$V(top)
|
||||
.add(JX.Vector.getAggregateScrollForNode(top))
|
||||
.add(1 + JX.Vector.getDim(target).x, 0);
|
||||
var dim = JX.Vector.getDim(code).add(-4, 0);
|
||||
if (isOnRight(target)) {
|
||||
dim.x += JX.Vector.getDim(code.nextSibling).x;
|
||||
}
|
||||
dim.y = (JX.$V(bot).y - pos.y) + JX.Vector.getDim(bot).y;
|
||||
|
||||
var bpos = JX.$V(bot)
|
||||
.add(JX.Vector.getAggregateScrollForNode(bot));
|
||||
dim.y = (bpos.y - pos.y) + JX.Vector.getDim(bot).y;
|
||||
|
||||
pos.setPos(reticle);
|
||||
dim.setDim(reticle);
|
||||
|
@ -217,7 +223,7 @@ JX.behavior('differential-edit-inline-comments', function(config) {
|
|||
// Furthermore, deleting a comment in the preview does not automatically
|
||||
// delete other occurrences of the same comment, so do that manually.
|
||||
var nodes = JX.DOM.scry(
|
||||
document.body,
|
||||
JX.DOM.getContentFrame(),
|
||||
'div',
|
||||
'differential-inline-comment');
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue