@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix a diff objective issue where objectives could appear in the wrong place

Summary:
Ref T12733. When creating a new comment, the objective could appear to far up in the scrollbar because we were anchoring it to an invisible row.

Instead, anchor to the "edit" row while editing.

Test Plan: Created a new comment at the very top of a file, saw "File, Star" icons instead of "Star, File".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

Differential Revision: https://secure.phabricator.com/D17978

+29 -18
+15 -15
resources/celerity/map.php
··· 13 13 'core.pkg.js' => '599698a7', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '7d4cfa59', 16 - 'differential.pkg.js' => 'f94e941c', 16 + 'differential.pkg.js' => 'fc6a23eb', 17 17 'diffusion.pkg.css' => 'b93d9b8c', 18 18 'diffusion.pkg.js' => '84c8f8fd', 19 19 'favicon.ico' => '30672e08', ··· 392 392 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 393 393 'rsrc/js/application/diff/DiffChangeset.js' => 'cf4e2140', 394 394 'rsrc/js/application/diff/DiffChangesetList.js' => 'a716ca27', 395 - 'rsrc/js/application/diff/DiffInline.js' => 'fa07d36e', 396 - 'rsrc/js/application/diff/ScrollObjective.js' => '2e069f79', 395 + 'rsrc/js/application/diff/DiffInline.js' => '93cbb03f', 396 + 'rsrc/js/application/diff/ScrollObjective.js' => '9df4e4e2', 397 397 'rsrc/js/application/diff/ScrollObjectiveList.js' => '085dd101', 398 398 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 399 399 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', ··· 779 779 'phabricator-dashboard-css' => 'fe5b1869', 780 780 'phabricator-diff-changeset' => 'cf4e2140', 781 781 'phabricator-diff-changeset-list' => 'a716ca27', 782 - 'phabricator-diff-inline' => 'fa07d36e', 782 + 'phabricator-diff-inline' => '93cbb03f', 783 783 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 784 784 'phabricator-draggable-list' => 'bea6e7f4', 785 785 'phabricator-fatal-config-template-css' => '8f18fa41', ··· 799 799 'phabricator-phtize' => 'd254d646', 800 800 'phabricator-prefab' => 'c5af80a2', 801 801 'phabricator-remarkup-css' => 'd1a5e11e', 802 - 'phabricator-scroll-objective' => '2e069f79', 802 + 'phabricator-scroll-objective' => '9df4e4e2', 803 803 'phabricator-scroll-objective-list' => '085dd101', 804 804 'phabricator-search-results-css' => 'f87d23ad', 805 805 'phabricator-shaped-request' => '7cbe244b', ··· 1113 1113 'javelin-install', 1114 1114 'javelin-event', 1115 1115 ), 1116 - '2e069f79' => array( 1117 - 'javelin-dom', 1118 - 'javelin-util', 1119 - 'javelin-stratcom', 1120 - 'javelin-install', 1121 - 'javelin-workflow', 1122 - ), 1123 1116 '2ee659ce' => array( 1124 1117 'javelin-install', 1125 1118 ), ··· 1611 1604 'javelin-stratcom', 1612 1605 'javelin-dom', 1613 1606 ), 1607 + '93cbb03f' => array( 1608 + 'javelin-dom', 1609 + ), 1614 1610 '93d0c9e3' => array( 1615 1611 'javelin-behavior', 1616 1612 'javelin-stratcom', ··· 1675 1671 '9d9685d6' => array( 1676 1672 'phui-oi-list-view-css', 1677 1673 ), 1674 + '9df4e4e2' => array( 1675 + 'javelin-dom', 1676 + 'javelin-util', 1677 + 'javelin-stratcom', 1678 + 'javelin-install', 1679 + 'javelin-workflow', 1680 + ), 1678 1681 '9f36c42d' => array( 1679 1682 'javelin-behavior', 1680 1683 'javelin-stratcom', ··· 2204 2207 'f829edb3' => array( 2205 2208 'javelin-view', 2206 2209 'javelin-install', 2207 - 'javelin-dom', 2208 - ), 2209 - 'fa07d36e' => array( 2210 2210 'javelin-dom', 2211 2211 ), 2212 2212 'fbe497e7' => array(
+13 -3
webroot/rsrc/js/application/diff/DiffInline.js
··· 74 74 75 75 this._changesetID = data.changesetID; 76 76 77 + this.setInvisible(false); 78 + 77 79 this.updateObjective(); 78 - this.setInvisible(false); 79 80 80 81 return this; 81 82 }, ··· 166 167 this._changeset = changeset; 167 168 168 169 var objectives = changeset.getChangesetList().getObjectives(); 170 + 171 + // Create this inline's objective, but don't show it yet. 169 172 this._objective = objectives.newObjective() 170 - .setCallback(JX.bind(this, this._onobjective)); 171 - this.updateObjective(); 173 + .setCallback(JX.bind(this, this._onobjective)) 174 + .hide(); 172 175 173 176 return this; 174 177 }, ··· 206 209 var icon = 'fa-comment'; 207 210 var color = 'bluegrey'; 208 211 var tooltip = null; 212 + var anchor = this._row; 209 213 210 214 if (this._isEditing) { 211 215 icon = 'fa-star'; 212 216 color = 'pink'; 213 217 tooltip = pht('Editing Comment'); 218 + 219 + // If we're editing, anchor to the row with the editor instead of the 220 + // actual comment row (which is invisible and can have a misleading 221 + // position). 222 + anchor = this._row.nextSibling; 214 223 } else if (this._isDraft) { 215 224 // This inline is an unsubmitted draft. 216 225 icon = 'fa-pencil'; ··· 225 234 } 226 235 227 236 objective 237 + .setAnchor(anchor) 228 238 .setIcon(icon) 229 239 .setColor(color) 230 240 .setTooltip(tooltip)
+1
webroot/rsrc/js/application/diff/ScrollObjective.js
··· 111 111 112 112 hide: function() { 113 113 this._visible = false; 114 + return this; 114 115 }, 115 116 116 117 isVisible: function() {