From a5331bce77d6cb04aa7af10007845a211da57d7c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 3 Mar 2020 16:36:11 -0500 Subject: Only show tribute menu after a minlength of 3 characters. - Fixes #562 --- ui/package.json | 2 +- ui/src/utils.ts | 3 +++ ui/yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/package.json b/ui/package.json index 8658d136..e3cabae5 100644 --- a/ui/package.json +++ b/ui/package.json @@ -43,7 +43,7 @@ "terser": "^4.6.3", "tippy.js": "^6.0.0", "toastify-js": "^1.6.2", - "tributejs": "^4.1.1", + "tributejs": "^5.0.0", "twemoji": "^12.1.2", "ws": "^7.0.0" }, diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 7ef3e303..d531a7ca 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -446,6 +446,7 @@ export function setupTribute(): Tribute { allowSpaces: false, autocompleteMode: true, menuItemLimit: mentionDropdownFetchLimit, + menuShowMinLength: 3, }, // Users { @@ -459,6 +460,7 @@ export function setupTribute(): Tribute { allowSpaces: false, autocompleteMode: true, menuItemLimit: mentionDropdownFetchLimit, + menuShowMinLength: 3, }, // Communities @@ -473,6 +475,7 @@ export function setupTribute(): Tribute { allowSpaces: false, autocompleteMode: true, menuItemLimit: mentionDropdownFetchLimit, + menuShowMinLength: 3, }, ], }); diff --git a/ui/yarn.lock b/ui/yarn.lock index 6c1f222b..d36bef04 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -4506,10 +4506,10 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" -tributejs@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-4.1.1.tgz#f169a4ad12e485241140ec1ab987b460950c974c" - integrity sha512-jc+PcaiNzMjCn2LAQb3i4ic94EsSfLW8Jlk1sK2cb6hLcZFalU9ThcF8rxuKkTUKv1GIvTwN8XseLzCXLxB4lw== +tributejs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-5.0.0.tgz#2c5301a79c19d7a72d23e995bf7c9f47c2a34f23" + integrity sha512-aPUpq4+NTXRq1OcdoeiFg9d+wM+J0b7dpL7MNVxqo8JIgChtkx8HnsPVl/uZ4Z1ChTF9UI1ffbvTfJRHqJjjAw== ts-node@^8.6.2: version "8.6.2" -- cgit v1.2.3