@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 rendering of project slugs in tokenizer UI

Summary: Fixes T5659. When building a token after a user selection, we currently use the `value` as the token text, but sometimes that's an internal name which doesn't make much sense to users. For projects, it is now "sluga slugb Proper Display Name". If available, use `displayName` instead.

Test Plan: Typed some projects into a tokenizer, got display names only.

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5659

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

+24 -22
+15 -15
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'c2c68e64', 11 - 'core.pkg.js' => 'dc4959a8', 11 + 'core.pkg.js' => 'ba6a742f', 12 12 'darkconsole.pkg.js' => 'df001cab', 13 13 'differential.pkg.css' => '4a93db37', 14 14 'differential.pkg.js' => '7528cfc9', ··· 450 450 'rsrc/js/core/KeyboardShortcutManager.js' => 'ad7a69ca', 451 451 'rsrc/js/core/MultirowRowManager.js' => '41e47dea', 452 452 'rsrc/js/core/Notification.js' => '0c6946e7', 453 - 'rsrc/js/core/Prefab.js' => 'c11bac49', 453 + 'rsrc/js/core/Prefab.js' => 'bbae734c', 454 454 'rsrc/js/core/ShapedRequest.js' => '7cbe244b', 455 455 'rsrc/js/core/TextAreaUtils.js' => 'b3ec3cfc', 456 456 'rsrc/js/core/ToolTip.js' => '3915d490', ··· 737 737 'phabricator-notification-menu-css' => '8ae4a008', 738 738 'phabricator-object-selector-css' => '029a133d', 739 739 'phabricator-phtize' => 'd254d646', 740 - 'phabricator-prefab' => 'c11bac49', 740 + 'phabricator-prefab' => 'bbae734c', 741 741 'phabricator-profile-css' => 'b459416e', 742 742 'phabricator-remarkup-css' => 'ad4c0676', 743 743 'phabricator-search-results-css' => 'f240504c', ··· 1626 1626 1 => 'javelin-stratcom', 1627 1627 2 => 'javelin-dom', 1628 1628 ), 1629 + 'bbae734c' => array( 1630 + 0 => 'javelin-install', 1631 + 1 => 'javelin-util', 1632 + 2 => 'javelin-dom', 1633 + 3 => 'javelin-typeahead', 1634 + 4 => 'javelin-tokenizer', 1635 + 5 => 'javelin-typeahead-preloaded-source', 1636 + 6 => 'javelin-typeahead-ondemand-source', 1637 + 7 => 'javelin-dom', 1638 + 8 => 'javelin-stratcom', 1639 + 9 => 'javelin-util', 1640 + ), 1629 1641 'bd4c8dca' => array( 1630 1642 0 => 'javelin-install', 1631 1643 1 => 'javelin-util', ··· 1651 1663 1 => 'javelin-dom', 1652 1664 2 => 'javelin-util', 1653 1665 3 => 'phabricator-shaped-request', 1654 - ), 1655 - 'c11bac49' => array( 1656 - 0 => 'javelin-install', 1657 - 1 => 'javelin-util', 1658 - 2 => 'javelin-dom', 1659 - 3 => 'javelin-typeahead', 1660 - 4 => 'javelin-tokenizer', 1661 - 5 => 'javelin-typeahead-preloaded-source', 1662 - 6 => 'javelin-typeahead-ondemand-source', 1663 - 7 => 'javelin-dom', 1664 - 8 => 'javelin-stratcom', 1665 - 9 => 'javelin-util', 1666 1666 ), 1667 1667 'c4569c05' => array( 1668 1668 0 => 'javelin-magical-init',
+1
src/__phutil_library_map__.php
··· 4610 4610 'PhabricatorMetaMTAMailingList' => array( 4611 4611 0 => 'PhabricatorMetaMTADAO', 4612 4612 1 => 'PhabricatorPolicyInterface', 4613 + 2 => 'PhabricatorDestructableInterface', 4613 4614 ), 4614 4615 'PhabricatorMetaMTAMemberQuery' => 'PhabricatorQuery', 4615 4616 'PhabricatorMetaMTAPermanentFailureException' => 'Exception',
+8 -7
webroot/rsrc/js/core/Prefab.js
··· 155 155 var tokenizer = new JX.Tokenizer(root); 156 156 tokenizer.setTypeahead(typeahead); 157 157 tokenizer.setRenderTokenCallback(function(value, key) { 158 - var icon = datasource.getResult(key); 159 - if (icon) { 160 - icon = icon.icon; 158 + var result = datasource.getResult(key); 159 + 160 + var icon; 161 + if (result) { 162 + icon = result.icon; 163 + value = result.displayName; 161 164 } else { 162 165 icon = config.icons[key]; 163 166 } 164 167 165 - if (!icon) { 166 - return value; 168 + if (icon) { 169 + icon = JX.Prefab._renderIcon(icon); 167 170 } 168 - 169 - icon = JX.Prefab._renderIcon(icon); 170 171 171 172 // TODO: Maybe we should render these closed tags in grey? Figure out 172 173 // how we're going to use color.