Only show tribute menu after a minlength of 3 characters.

- Fixes #562
pull/574/head
Dessalines 2020-03-03 16:36:11 -05:00
parent c430bdfcd7
commit 876bab17eb
3 changed files with 8 additions and 5 deletions

2
ui/package.json vendored
View File

@ -43,7 +43,7 @@
"terser": "^4.6.3", "terser": "^4.6.3",
"tippy.js": "^6.0.0", "tippy.js": "^6.0.0",
"toastify-js": "^1.6.2", "toastify-js": "^1.6.2",
"tributejs": "^4.1.1", "tributejs": "^5.0.0",
"twemoji": "^12.1.2", "twemoji": "^12.1.2",
"ws": "^7.0.0" "ws": "^7.0.0"
}, },

3
ui/src/utils.ts vendored
View File

@ -446,6 +446,7 @@ export function setupTribute(): Tribute {
allowSpaces: false, allowSpaces: false,
autocompleteMode: true, autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit, menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
}, },
// Users // Users
{ {
@ -459,6 +460,7 @@ export function setupTribute(): Tribute {
allowSpaces: false, allowSpaces: false,
autocompleteMode: true, autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit, menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
}, },
// Communities // Communities
@ -473,6 +475,7 @@ export function setupTribute(): Tribute {
allowSpaces: false, allowSpaces: false,
autocompleteMode: true, autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit, menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
}, },
], ],
}); });

8
ui/yarn.lock vendored
View File

@ -4506,10 +4506,10 @@ tough-cookie@~2.4.3:
psl "^1.1.24" psl "^1.1.24"
punycode "^1.4.1" punycode "^1.4.1"
tributejs@^4.1.1: tributejs@^5.0.0:
version "4.1.1" version "5.0.0"
resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-4.1.1.tgz#f169a4ad12e485241140ec1ab987b460950c974c" resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-5.0.0.tgz#2c5301a79c19d7a72d23e995bf7c9f47c2a34f23"
integrity sha512-jc+PcaiNzMjCn2LAQb3i4ic94EsSfLW8Jlk1sK2cb6hLcZFalU9ThcF8rxuKkTUKv1GIvTwN8XseLzCXLxB4lw== integrity sha512-aPUpq4+NTXRq1OcdoeiFg9d+wM+J0b7dpL7MNVxqo8JIgChtkx8HnsPVl/uZ4Z1ChTF9UI1ffbvTfJRHqJjjAw==
ts-node@^8.6.2: ts-node@^8.6.2:
version "8.6.2" version "8.6.2"