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

Make closed objects in global typeahead look closed

Summary:
Fixes T6906.

I found the code in `behavior-search-typeahead.js` that was throwing away the closedness-detction work done in `Prejab.js::transformDatasourceResults`. Modified it to re-add the correct class name to the `phabricator-main-search-typeahead-result` elements.

Then I found some CSS in `typeahead-browse.css` and completely flailed around until realizing that particular CSS only gets loaded when hitting the typeahead endpoint directly. Copied the relevant bit of CSS over to `main-menu-view.css` (but maybe it should be removed from `typeahead-browse.css`?).

This is my first JS/CSS change, so please don't assume I did anything right.

Test Plan: {F4975800}

Reviewers: #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: epriestley

Maniphest Tasks: T6906

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

+42 -38
+22 -22
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'ff161f2d', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => '71865bdf', 13 - 'core.pkg.js' => '599698a7', 12 + 'core.pkg.css' => 'd556e3e2', 13 + 'core.pkg.js' => '21d34805', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '7d4cfa59', 16 16 'differential.pkg.js' => '1d120743', ··· 35 35 'rsrc/css/aphront/table-view.css' => '34cf86b4', 36 36 'rsrc/css/aphront/tokenizer.css' => '9a8cb501', 37 37 'rsrc/css/aphront/tooltip.css' => '173b9431', 38 - 'rsrc/css/aphront/typeahead-browse.css' => '8904346a', 38 + 'rsrc/css/aphront/typeahead-browse.css' => '4f82e510', 39 39 'rsrc/css/aphront/typeahead.css' => '8a84cc7d', 40 40 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 41 41 'rsrc/css/application/auth/auth.css' => '0877ed6e', 42 - 'rsrc/css/application/base/main-menu-view.css' => '5294060f', 42 + 'rsrc/css/application/base/main-menu-view.css' => 'de9fe8c4', 43 43 'rsrc/css/application/base/notification-menu.css' => '6a697e43', 44 44 'rsrc/css/application/base/phui-theme.css' => '9f261c6b', 45 45 'rsrc/css/application/base/standard-page-view.css' => 'eb5b80c5', ··· 514 514 'rsrc/js/core/behavior-reorder-applications.js' => '76b9fc3e', 515 515 'rsrc/js/core/behavior-reveal-content.js' => '60821bc7', 516 516 'rsrc/js/core/behavior-scrollbar.js' => '834a1173', 517 - 'rsrc/js/core/behavior-search-typeahead.js' => 'eded9ee8', 517 + 'rsrc/js/core/behavior-search-typeahead.js' => 'd0a99ab4', 518 518 'rsrc/js/core/behavior-select-content.js' => 'bf5374ef', 519 519 'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', 520 520 'rsrc/js/core/behavior-setup-check-https.js' => '491416b3', ··· 668 668 'javelin-behavior-phabricator-oncopy' => '2926fff2', 669 669 'javelin-behavior-phabricator-remarkup-assist' => 'acd29eee', 670 670 'javelin-behavior-phabricator-reveal-content' => '60821bc7', 671 - 'javelin-behavior-phabricator-search-typeahead' => 'eded9ee8', 671 + 'javelin-behavior-phabricator-search-typeahead' => 'd0a99ab4', 672 672 'javelin-behavior-phabricator-show-older-transactions' => 'ae95d984', 673 673 'javelin-behavior-phabricator-tooltips' => 'c420b0b9', 674 674 'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6', ··· 792 792 'phabricator-flag-css' => 'bba8f811', 793 793 'phabricator-keyboard-shortcut' => '1ae869f2', 794 794 'phabricator-keyboard-shortcut-manager' => 'c19dd9b9', 795 - 'phabricator-main-menu-view' => '5294060f', 795 + 'phabricator-main-menu-view' => 'de9fe8c4', 796 796 'phabricator-nav-view-css' => 'faf6a6fc', 797 797 'phabricator-notification' => 'ccf1cbf8', 798 798 'phabricator-notification-css' => '3f6c89c9', ··· 914 914 'syntax-default-css' => '9923583c', 915 915 'syntax-highlighting-css' => 'cae95e89', 916 916 'tokens-css' => '3d0f239e', 917 - 'typeahead-browse-css' => '8904346a', 917 + 'typeahead-browse-css' => '4f82e510', 918 918 'unhandled-exception-css' => '4c96257a', 919 919 ), 920 920 'requires' => array( ··· 1306 1306 'javelin-stratcom', 1307 1307 'javelin-vector', 1308 1308 'javelin-typeahead-static-source', 1309 - ), 1310 - '5294060f' => array( 1311 - 'phui-theme-css', 1312 1309 ), 1313 1310 '54b612ba' => array( 1314 1311 'javelin-color', ··· 2016 2013 'javelin-vector', 2017 2014 'phabricator-diff-inline', 2018 2015 ), 2016 + 'd0a99ab4' => array( 2017 + 'javelin-behavior', 2018 + 'javelin-typeahead-ondemand-source', 2019 + 'javelin-typeahead', 2020 + 'javelin-dom', 2021 + 'javelin-uri', 2022 + 'javelin-util', 2023 + 'javelin-stratcom', 2024 + 'phabricator-prefab', 2025 + 'phuix-icon-view', 2026 + ), 2019 2027 'd0c516d5' => array( 2020 2028 'javelin-behavior', 2021 2029 'javelin-dom', ··· 2087 2095 'javelin-typeahead', 2088 2096 'javelin-typeahead-ondemand-source', 2089 2097 'javelin-dom', 2098 + ), 2099 + 'de9fe8c4' => array( 2100 + 'phui-theme-css', 2090 2101 ), 2091 2102 'e0ec7f2f' => array( 2092 2103 'javelin-behavior', ··· 2156 2167 'javelin-workflow', 2157 2168 'javelin-dom', 2158 2169 'phabricator-draggable-list', 2159 - ), 2160 - 'eded9ee8' => array( 2161 - 'javelin-behavior', 2162 - 'javelin-typeahead-ondemand-source', 2163 - 'javelin-typeahead', 2164 - 'javelin-dom', 2165 - 'javelin-uri', 2166 - 'javelin-util', 2167 - 'javelin-stratcom', 2168 - 'phabricator-prefab', 2169 - 'phuix-icon-view', 2170 2170 ), 2171 2171 'edf8a145' => array( 2172 2172 'javelin-behavior',
-16
webroot/rsrc/css/aphront/typeahead-browse.css
··· 64 64 margin-top: 1px; 65 65 margin-left: 6px; 66 66 } 67 - 68 - .typeahead-browse-item .phabricator-main-search-typeahead-result { 69 - margin: 2px 0; 70 - padding: 0 8px; 71 - } 72 - 73 - .typeahead-browse-item .phabricator-main-search-typeahead-result.has-image { 74 - padding-left: 48px; 75 - } 76 - 77 - .typeahead-browse-item 78 - .phabricator-main-search-typeahead-result.result-closed 79 - .result-name { 80 - text-decoration: line-through; 81 - color: {$lightgreytext}; 82 - }
+16
webroot/rsrc/css/application/base/main-menu-view.css
··· 309 309 color: {$darkgreytext}; 310 310 } 311 311 312 + .phabricator-main-search-typeahead-result.result-closed { 313 + opacity: .8; 314 + -webkit-filter: grayscale(100%); 315 + filter: grayscale(100%); 316 + } 317 + 318 + .phabricator-main-search-typeahead-result.result-closed 319 + .result-name { 320 + text-decoration: line-through; 321 + color: {$lightgreytext}; 322 + } 323 + 324 + .phabricator-main-search-typeahead-result.has-image { 325 + padding-left: 48px; 326 + } 327 + 312 328 .phabricator-main-search-typeahead-result .result-type { 313 329 color: {$lightgreytext}; 314 330 font-size: {$smallestfontsize};
+4
webroot/rsrc/js/core/behavior-search-typeahead.js
··· 45 45 JX.$N('span', {className: 'result-type'}, object.type) 46 46 ]); 47 47 48 + if (object.closed) { 49 + JX.DOM.alterClass(render, 'result-closed', true); 50 + } 51 + 48 52 object.display = render; 49 53 50 54 return object;