@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.

Restore highlighting when jumping to transactions using URI anchors

Summary:
At some point, the highlighting behavior for the timeline broke. When you follow a link to a particular timeline story, the story should be highlighted.

Prior to this change, the `<a />` tag itself highlights, but there's no associated CSS and it's too deep in the tree to do anything useful.

(Since this change is fairly straightforward, I gave up digging for the root cause before finding it.)

Test Plan:
- Clicked a timeline story anchor, saw the story highlight.

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

+35 -19
+12 -12
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '0e3cf785', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => '589cd2fe', 13 - 'core.pkg.js' => '49814bac', 12 + 'core.pkg.css' => 'f5ebbd7d', 13 + 'core.pkg.js' => '632fb8f5', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => '2d70b7b9', 16 16 'differential.pkg.js' => 'c8f88d74', ··· 178 178 'rsrc/css/phui/phui-spacing.css' => 'b05cadc3', 179 179 'rsrc/css/phui/phui-status.css' => 'e5ff8be0', 180 180 'rsrc/css/phui/phui-tag-view.css' => '8519160a', 181 - 'rsrc/css/phui/phui-timeline-view.css' => '1e348e4b', 181 + 'rsrc/css/phui/phui-timeline-view.css' => '2d32d7a9', 182 182 'rsrc/css/phui/phui-two-column-view.css' => 'f96d319f', 183 183 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'e86de308', 184 184 'rsrc/css/phui/workboards/phui-workboard.css' => '74fc9d98', ··· 508 508 'rsrc/js/core/behavior-tokenizer.js' => '3b4899b0', 509 509 'rsrc/js/core/behavior-tooltip.js' => '73ecc1f8', 510 510 'rsrc/js/core/behavior-user-menu.js' => '60cd9241', 511 - 'rsrc/js/core/behavior-watch-anchor.js' => '3972dadb', 511 + 'rsrc/js/core/behavior-watch-anchor.js' => 'e55a1db5', 512 512 'rsrc/js/core/behavior-workflow.js' => '9623adc1', 513 513 'rsrc/js/core/darkconsole/DarkLog.js' => '3b869402', 514 514 'rsrc/js/core/darkconsole/DarkMessage.js' => '26cd4b73', ··· 658 658 'javelin-behavior-phabricator-tooltips' => '73ecc1f8', 659 659 'javelin-behavior-phabricator-transaction-comment-form' => '2bdadf1a', 660 660 'javelin-behavior-phabricator-transaction-list' => '9cec214e', 661 - 'javelin-behavior-phabricator-watch-anchor' => '3972dadb', 661 + 'javelin-behavior-phabricator-watch-anchor' => 'e55a1db5', 662 662 'javelin-behavior-pholio-mock-edit' => '3eed1f2b', 663 663 'javelin-behavior-pholio-mock-view' => '5aa1544e', 664 664 'javelin-behavior-phui-dropdown-menu' => '5cf0501a', ··· 878 878 'phui-status-list-view-css' => 'e5ff8be0', 879 879 'phui-tag-view-css' => '8519160a', 880 880 'phui-theme-css' => '35883b37', 881 - 'phui-timeline-view-css' => '1e348e4b', 881 + 'phui-timeline-view-css' => '2d32d7a9', 882 882 'phui-two-column-view-css' => 'f96d319f', 883 883 'phui-workboard-color-css' => 'e86de308', 884 884 'phui-workboard-view-css' => '74fc9d98', ··· 1227 1227 'javelin-install', 1228 1228 'javelin-dom', 1229 1229 ), 1230 - '3972dadb' => array( 1231 - 'javelin-behavior', 1232 - 'javelin-stratcom', 1233 - 'javelin-dom', 1234 - 'javelin-vector', 1235 - ), 1236 1230 '398fdf13' => array( 1237 1231 'javelin-behavior', 1238 1232 'trigger-rule-editor', ··· 2127 2121 'javelin-stratcom', 2128 2122 'javelin-dom', 2129 2123 'phuix-dropdown-menu', 2124 + ), 2125 + 'e55a1db5' => array( 2126 + 'javelin-behavior', 2127 + 'javelin-stratcom', 2128 + 'javelin-dom', 2129 + 'javelin-vector', 2130 2130 ), 2131 2131 'e5bdb730' => array( 2132 2132 'javelin-behavior',
+5 -5
src/view/phui/PHUITimelineEventView.php
··· 516 516 $outer_classes[] = 'phui-timeline-'.$color; 517 517 } 518 518 519 - $sigil = null; 519 + $sigils = array(); 520 520 $meta = null; 521 521 if ($this->getTransactionPHID()) { 522 - $sigil = 'transaction'; 522 + $sigils[] = 'transaction'; 523 523 $meta = array( 524 524 'phid' => $this->getTransactionPHID(), 525 525 'anchor' => $this->anchor, ··· 534 534 'class' => 'phui-timeline-event-view '. 535 535 'phui-timeline-spacer '. 536 536 'phui-timeline-spacer-bold', 537 - '', 538 537 )); 539 538 } 540 539 540 + $sigils[] = 'anchor-container'; 541 + 541 542 return array( 542 543 javelin_tag( 543 544 'div', 544 545 array( 545 546 'class' => implode(' ', $outer_classes), 546 - 'id' => $this->anchor ? 'anchor-'.$this->anchor : null, 547 - 'sigil' => $sigil, 547 + 'sigil' => implode(' ', $sigils), 548 548 'meta' => $meta, 549 549 ), 550 550 phutil_tag(
+3
webroot/rsrc/css/phui/phui-timeline-view.css
··· 329 329 330 330 .phui-timeline-shell.anchor-target { 331 331 background: {$lightyellow}; 332 + border-width: 0 1px 0 0; 333 + border-style: solid; 334 + border-color: {$yellow}; 332 335 padding: 4px; 333 336 margin: -4px; 334 337 }
+15 -2
webroot/rsrc/js/core/behavior-watch-anchor.js
··· 23 23 var wait_ms = 100; 24 24 25 25 var target; 26 + var display_target; 26 27 var retry_ms; 27 28 28 29 function try_anchor() { ··· 74 75 // If we already have an anchor highlighted, unhighlight it and throw 75 76 // it away if it doesn't match the new target. 76 77 if (target && (target !== node)) { 77 - JX.DOM.alterClass(target, 'anchor-target', false); 78 + JX.DOM.alterClass(display_target, 'anchor-target', false); 78 79 target = null; 80 + display_target = null; 79 81 } 80 82 81 83 // If we didn't find a matching anchor, try again soon. This allows ··· 92 94 // If we've found a new target, highlight it. 93 95 if (target !== node) { 94 96 target = node; 95 - JX.DOM.alterClass(target, 'anchor-target', true); 97 + 98 + // If there's an "anchor-container" parent element, we'll make the 99 + // display adjustment to that node instead. For example, this is used 100 + // by the timeline to highlight timeline stories. 101 + var container = JX.DOM.findAbove(node, null, 'anchor-container'); 102 + if (container) { 103 + display_target = container; 104 + } else { 105 + display_target = node; 106 + } 107 + 108 + JX.DOM.alterClass(display_target, 'anchor-target', true); 96 109 } 97 110 98 111 // Try to scroll to the new target.