Page MenuHomePhabricator

D16886.diff
No OneTemporary

D16886.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -10,7 +10,7 @@
'conpherence.pkg.css' => '0b64e988',
'conpherence.pkg.js' => '6249a1cf',
'core.pkg.css' => '2f1ecc57',
- 'core.pkg.js' => '56f967a5',
+ 'core.pkg.js' => 'f0648ee7',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => 'a4ba74b5',
'differential.pkg.js' => '634399e9',
@@ -261,7 +261,7 @@
'rsrc/externals/javelin/lib/behavior.js' => '61cbc29a',
'rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js' => '8d3bc1b2',
'rsrc/externals/javelin/lib/control/typeahead/Typeahead.js' => '70baed2f',
- 'rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js' => 'e6e25838',
+ 'rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js' => '185bbd53',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadCompositeSource.js' => '503e17fd',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js' => '013ffff9',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js' => '54f314a0',
@@ -747,7 +747,7 @@
'javelin-tokenizer' => '8d3bc1b2',
'javelin-typeahead' => '70baed2f',
'javelin-typeahead-composite-source' => '503e17fd',
- 'javelin-typeahead-normalizer' => 'e6e25838',
+ 'javelin-typeahead-normalizer' => '185bbd53',
'javelin-typeahead-ondemand-source' => '013ffff9',
'javelin-typeahead-preloaded-source' => '54f314a0',
'javelin-typeahead-source' => '0fcf201c',
@@ -1037,6 +1037,9 @@
'javelin-workflow',
'javelin-workboard-controller',
),
+ '185bbd53' => array(
+ 'javelin-install',
+ ),
'1aa4c968' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -2121,9 +2124,6 @@
'javelin-workflow',
'javelin-magical-init',
),
- 'e6e25838' => array(
- 'javelin-install',
- ),
'e9581f08' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/applications/project/typeahead/PhabricatorProjectDatasource.php b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
--- a/src/applications/project/typeahead/PhabricatorProjectDatasource.php
+++ b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
@@ -103,15 +103,10 @@
$all_strings = array();
$all_strings[] = $proj->getDisplayName();
-
- // Add an extra space after the name so that the original project
- // sorts ahead of milestones. This is kind of a hack but ehh?
- $all_strings[] = null;
-
foreach ($proj->getSlugs() as $project_slug) {
$all_strings[] = $project_slug->getSlug();
}
- $all_strings = implode(' ', $all_strings);
+ $all_strings = implode("\n", $all_strings);
$proj_result = id(new PhabricatorTypeaheadResult())
->setName($all_strings)
diff --git a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
--- a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
+++ b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
@@ -311,6 +311,11 @@
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form);
+ // Make "\n" delimiters more visible.
+ foreach ($content as $key => $row) {
+ $content[$key][0] = str_replace("\n", '<\n>', $row[0]);
+ }
+
$table = new AphrontTableView($content);
$table->setHeaders(
array(
diff --git a/webroot/rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js b/webroot/rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js
--- a/webroot/rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js
+++ b/webroot/rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js
@@ -18,6 +18,10 @@
// NOTE: We specifically normalize "(" and ")" into spaces so that
// we can match tokenizer functions like "members(project)".
+ // NOTE: We specifically do NOT normalize "\n" because it is used as
+ // a delimiter between components of typeahead result names, like the
+ // name of a project and its tags.
+
return ('' + str)
.toLocaleLowerCase()
.replace(/[\.,\/#!$%\^&\*;:{}=_`~]/g, '')

File Metadata

Mime Type
text/plain
Expires
Sat, May 18, 6:26 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6294182
Default Alt Text
D16886.diff (4 KB)

Event Timeline