Page MenuHomePhabricator

D19109.diff
No OneTemporary

D19109.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -528,7 +528,7 @@
'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9',
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
'rsrc/js/phuix/PHUIXActionView.js' => '442efd08',
- 'rsrc/js/phuix/PHUIXAutocomplete.js' => 'bb19ed2c',
+ 'rsrc/js/phuix/PHUIXAutocomplete.js' => '623a766b',
'rsrc/js/phuix/PHUIXButtonView.js' => '8a91e1ac',
'rsrc/js/phuix/PHUIXDropdownMenu.js' => '04b2ae03',
'rsrc/js/phuix/PHUIXExample.js' => '68af71ca',
@@ -881,7 +881,7 @@
'phui-workpanel-view-css' => 'a3a63478',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '442efd08',
- 'phuix-autocomplete' => 'bb19ed2c',
+ 'phuix-autocomplete' => '623a766b',
'phuix-button-view' => '8a91e1ac',
'phuix-dropdown-menu' => '04b2ae03',
'phuix-form-control-view' => '16ad6224',
@@ -1407,6 +1407,12 @@
'javelin-magical-init',
'javelin-util',
),
+ '623a766b' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'phuix-icon-view',
+ 'phabricator-prefab',
+ ),
'628f59de' => array(
'phui-oi-list-view-css',
),
@@ -1868,12 +1874,6 @@
'javelin-uri',
'phabricator-notification',
),
- 'bb19ed2c' => array(
- 'javelin-install',
- 'javelin-dom',
- 'phuix-icon-view',
- 'phabricator-prefab',
- ),
'bcaccd64' => array(
'javelin-behavior',
'javelin-behavior-device',
diff --git a/src/applications/phurl/typeahead/PhabricatorPhurlURLDatasource.php b/src/applications/phurl/typeahead/PhabricatorPhurlURLDatasource.php
--- a/src/applications/phurl/typeahead/PhabricatorPhurlURLDatasource.php
+++ b/src/applications/phurl/typeahead/PhabricatorPhurlURLDatasource.php
@@ -24,6 +24,7 @@
->setDisplayName($url->getName())
->setName($url->getName()." ".$url->getAlias())
->setPHID($url->getPHID())
+ ->setAutocomplete('(('.$url->getAlias().'))')
->addAttribute($url->getLongURL());
$results[] = $result;
diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php
--- a/src/view/form/control/PhabricatorRemarkupControl.php
+++ b/src/view/form/control/PhabricatorRemarkupControl.php
@@ -73,6 +73,7 @@
));
$phriction_datasource = new PhrictionDocumentDatasource();
+ $phurl_datasource = new PhabricatorPhurlURLDatasource();
Javelin::initBehavior(
'phabricator-remarkup-assist',
@@ -130,7 +131,17 @@
'|',
']',
),
- 'prefix' => '^\\[*',
+ 'prefix' => '^\\[',
+ ),
+ 40 => array( // "("
+ 'datasourceURI' => $phurl_datasource->getDatasourceURI(),
+ 'headerIcon' => 'fa-compress',
+ 'headerText' => pht('Find Phurl:'),
+ 'hintText' => $phurl_datasource->getPlaceholderText(),
+ 'cancel' => array(
+ ')',
+ ),
+ 'prefix' => '^\\(',
),
),
));
diff --git a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
--- a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
+++ b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
@@ -107,6 +107,12 @@
prior = '<start>';
}
+ // If this is a repeating sequence and the previous character is the
+ // same as the one the user just typed, like "((", don't reactivate.
+ if (prior === String.fromCharCode(code)) {
+ return;
+ }
+
switch (prior) {
case '<start>':
case ' ':

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 5:32 AM (15 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6996069
Default Alt Text
D19109.diff (3 KB)

Event Timeline