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

Let users escape more easily from the autosuggester after typing "[" or "("

Summary:
Ref T13077. The autosuggester is a little too eager right now, and will eat carriage returns after typing `[` if you never activate the tokenizer.

To fix this, try just canceling sooner. If that doesn't work, we might need to cancel more eagerly by testing to see if the tokenizer is actually open.

Test Plan: Typed `[x]<return>`, got my return instead of getting trapped by the autosuggester.

Maniphest Tasks: T13077

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

+20 -20
+8 -8
resources/celerity/map.php
··· 528 528 'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9', 529 529 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 530 530 'rsrc/js/phuix/PHUIXActionView.js' => '442efd08', 531 - 'rsrc/js/phuix/PHUIXAutocomplete.js' => '623a766b', 531 + 'rsrc/js/phuix/PHUIXAutocomplete.js' => '7fa5c915', 532 532 'rsrc/js/phuix/PHUIXButtonView.js' => '8a91e1ac', 533 533 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '04b2ae03', 534 534 'rsrc/js/phuix/PHUIXExample.js' => '68af71ca', ··· 881 881 'phui-workpanel-view-css' => 'a3a63478', 882 882 'phuix-action-list-view' => 'b5c256b8', 883 883 'phuix-action-view' => '442efd08', 884 - 'phuix-autocomplete' => '623a766b', 884 + 'phuix-autocomplete' => '7fa5c915', 885 885 'phuix-button-view' => '8a91e1ac', 886 886 'phuix-dropdown-menu' => '04b2ae03', 887 887 'phuix-form-control-view' => '16ad6224', ··· 1407 1407 'javelin-magical-init', 1408 1408 'javelin-util', 1409 1409 ), 1410 - '623a766b' => array( 1411 - 'javelin-install', 1412 - 'javelin-dom', 1413 - 'phuix-icon-view', 1414 - 'phabricator-prefab', 1415 - ), 1416 1410 '628f59de' => array( 1417 1411 'phui-oi-list-view-css', 1418 1412 ), ··· 1562 1556 ), 1563 1557 '7f243deb' => array( 1564 1558 'javelin-install', 1559 + ), 1560 + '7fa5c915' => array( 1561 + 'javelin-install', 1562 + 'javelin-dom', 1563 + 'phuix-icon-view', 1564 + 'phabricator-prefab', 1565 1565 ), 1566 1566 '81144dfa' => array( 1567 1567 'javelin-behavior',
+12 -12
webroot/rsrc/js/phuix/PHUIXAutocomplete.js
··· 521 521 return; 522 522 } 523 523 524 + // Deactivate immediately if a user types a character that we are 525 + // reasonably sure means they don't want to use the autocomplete. For 526 + // example, "##" is almost certainly a header or monospaced text, not 527 + // a project autocompletion. 528 + var cancels = this._getCancelCharacters(); 529 + for (var ii = 0; ii < cancels.length; ii++) { 530 + if (text.indexOf(cancels[ii]) !== -1) { 531 + this._deactivate(); 532 + return; 533 + } 534 + } 535 + 524 536 var trim = this._trim(text); 525 537 526 538 // If this rule has a prefix pattern, like the "[[ document ]]" rule, ··· 540 552 // Store the current value now that we've finished mutating the text. 541 553 // This needs to match what we pass to the typeahead datasource. 542 554 this._value = trim; 543 - 544 - // Deactivate immediately if a user types a character that we are 545 - // reasonably sure means they don't want to use the autocomplete. For 546 - // example, "##" is almost certainly a header or monospaced text, not 547 - // a project autocompletion. 548 - var cancels = this._getCancelCharacters(); 549 - for (var ii = 0; ii < cancels.length; ii++) { 550 - if (trim.indexOf(cancels[ii]) !== -1) { 551 - this._deactivate(); 552 - return; 553 - } 554 - } 555 555 556 556 // Deactivate immediately if the user types an ignored token like ":)", 557 557 // the smiley face emoticon. Note that we test against "text", not