From 4d55192e21a25bc0802df54ae8a1412d17fe761e Mon Sep 17 00:00:00 2001 From: Joelute Date: Fri, 24 Feb 2023 23:29:49 -0500 Subject: [PATCH] compose_typeahead: Add hint text to topic typeahead dropdown. With the autocomplete dropdown, some users face trouble or uncertainty while selecting topics. The autocomplete dropdown may encourage users to find and select an existing topic rather than starting a new topic. The changes adds a hint text to the topic typeahead dropdown to encourage users to either start a new topic or select an existing topic. Fixes #23295. --- web/src/composebox_typeahead.js | 2 ++ web/templates/topic_typeahead_hint.hbs | 1 + 2 files changed, 3 insertions(+) create mode 100644 web/templates/topic_typeahead_hint.hbs diff --git a/web/src/composebox_typeahead.js b/web/src/composebox_typeahead.js index f38eab526b..7e83b12320 100644 --- a/web/src/composebox_typeahead.js +++ b/web/src/composebox_typeahead.js @@ -2,6 +2,7 @@ import $ from "jquery"; import _ from "lodash"; import * as typeahead from "../shared/src/typeahead"; +import render_topic_typeahead_hint from "../templates/topic_typeahead_hint.hbs"; import * as compose from "./compose"; import * as compose_pm_pill from "./compose_pm_pill"; @@ -1130,6 +1131,7 @@ export function initialize() { } return sorted; }, + header: render_topic_typeahead_hint, }); $("#private_message_recipient").typeahead({ diff --git a/web/templates/topic_typeahead_hint.hbs b/web/templates/topic_typeahead_hint.hbs new file mode 100644 index 0000000000..73d1734082 --- /dev/null +++ b/web/templates/topic_typeahead_hint.hbs @@ -0,0 +1 @@ +{{t 'Start a new topic or select one from the list.' }}