mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
Improve type and icon information in typeahead
Summary: Ref T10289. This probably doesn't cover everything but should do a little bit better. Although we should mabye just exlude milestones from this menu completely? Test Plan: {F1093937} Reviewers: chad Reviewed By: chad Maniphest Tasks: T10289 Differential Revision: https://secure.phabricator.com/D15191
This commit is contained in:
parent
5092bcf533
commit
4132ba0853
5 changed files with 31 additions and 16 deletions
|
@ -8,7 +8,7 @@
|
|||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'e33b14a4',
|
||||
'core.pkg.js' => '7214314b',
|
||||
'core.pkg.js' => 'ef5e33db',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '2de124c9',
|
||||
'differential.pkg.js' => '5c2ba922',
|
||||
|
@ -490,7 +490,7 @@ return array(
|
|||
'rsrc/js/core/behavior-reorder-applications.js' => '76b9fc3e',
|
||||
'rsrc/js/core/behavior-reveal-content.js' => '60821bc7',
|
||||
'rsrc/js/core/behavior-scrollbar.js' => '834a1173',
|
||||
'rsrc/js/core/behavior-search-typeahead.js' => '0b7a4f6e',
|
||||
'rsrc/js/core/behavior-search-typeahead.js' => '06c32383',
|
||||
'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6',
|
||||
'rsrc/js/core/behavior-time-typeahead.js' => 'f80d6bf0',
|
||||
'rsrc/js/core/behavior-toggle-class.js' => '5d7c9f33',
|
||||
|
@ -640,7 +640,7 @@ return array(
|
|||
'javelin-behavior-phabricator-oncopy' => '2926fff2',
|
||||
'javelin-behavior-phabricator-remarkup-assist' => '340c8eff',
|
||||
'javelin-behavior-phabricator-reveal-content' => '60821bc7',
|
||||
'javelin-behavior-phabricator-search-typeahead' => '0b7a4f6e',
|
||||
'javelin-behavior-phabricator-search-typeahead' => '06c32383',
|
||||
'javelin-behavior-phabricator-show-older-transactions' => 'dbbf48b6',
|
||||
'javelin-behavior-phabricator-tooltips' => '3ee3408b',
|
||||
'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6',
|
||||
|
@ -909,6 +909,17 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
),
|
||||
'06c32383' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-typeahead-ondemand-source',
|
||||
'javelin-typeahead',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'phabricator-prefab',
|
||||
'phuix-icon-view',
|
||||
),
|
||||
'087e919c' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
@ -922,16 +933,6 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-router',
|
||||
),
|
||||
'0b7a4f6e' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-typeahead-ondemand-source',
|
||||
'javelin-typeahead',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'phabricator-prefab',
|
||||
),
|
||||
'0f764c35' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
|
|
@ -47,7 +47,10 @@ final class DiffusionSymbolDatasource
|
|||
->setPHID(md5($symbol->getURI())) // Just needs to be unique.
|
||||
->setDisplayName($name)
|
||||
->setDisplayType(strtoupper($lang).' '.ucwords($type).' ('.$repo.')')
|
||||
->setPriorityType('symb');
|
||||
->setPriorityType('symb')
|
||||
->setImageSprite(
|
||||
'phabricator-search-icon phui-font-fa phui-icon-view fa-code '.
|
||||
'lightgreytext');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
|||
$this->getPHID());
|
||||
|
||||
$all_strings = ipull($slugs, 'slug');
|
||||
$all_strings[] = $this->getName();
|
||||
$all_strings[] = $this->getDisplayName();
|
||||
$all_strings = implode(' ', $all_strings);
|
||||
|
||||
$tokens = PhabricatorTypeaheadDatasource::tokenizeString($all_strings);
|
||||
|
|
|
@ -70,7 +70,7 @@ final class PhabricatorProjectDatasource
|
|||
$proj_result = id(new PhabricatorTypeaheadResult())
|
||||
->setName($all_strings)
|
||||
->setDisplayName($proj->getDisplayName())
|
||||
->setDisplayType(pht('Project'))
|
||||
->setDisplayType($proj->getDisplayIconName())
|
||||
->setURI($proj->getURI())
|
||||
->setPHID($proj->getPHID())
|
||||
->setIcon($proj->getDisplayIconIcon())
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* javelin-util
|
||||
* javelin-stratcom
|
||||
* phabricator-prefab
|
||||
* phuix-icon-view
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-search-typeahead', function(config) {
|
||||
|
@ -25,12 +26,22 @@ JX.behavior('phabricator-search-typeahead', function(config) {
|
|||
attr.style = {backgroundImage: 'url('+object.imageURI+')'};
|
||||
}
|
||||
|
||||
var icon = null;
|
||||
if (object.icon) {
|
||||
icon = new JX.PHUIXIconView()
|
||||
.setIcon(object.icon)
|
||||
.setColor('lightgreytext')
|
||||
.getNode();
|
||||
icon = [icon, ' '];
|
||||
}
|
||||
|
||||
var render = JX.$N(
|
||||
'span',
|
||||
attr,
|
||||
[
|
||||
JX.$N('span', {className: object.sprite}),
|
||||
JX.$N('span', {className: 'result-name'}, object.displayName),
|
||||
icon,
|
||||
JX.$N('span', {className: 'result-type'}, object.type)
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue