Skip to content

Commit f70629e

Browse files
ganpa3timabbott
authored andcommitted
composebox: Add typeahead for /todo.
1 parent 632abd4 commit f70629e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

frontend_tests/node_tests/composebox_typeahead.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,10 @@ run_test("begins_typeahead", () => {
12811281
assert_typeahead_equals("abc/po", false);
12821282
assert_typeahead_equals("hello /poll", false);
12831283
assert_typeahead_equals("\n/pol", false);
1284+
assert_typeahead_equals("/todo", composebox_typeahead.slash_commands);
1285+
assert_typeahead_equals("my /todo", false);
1286+
assert_typeahead_equals("\n/to", false);
1287+
assert_typeahead_equals(" /tod", false);
12841288

12851289
assert_typeahead_equals("x/", false);
12861290
assert_typeahead_equals("```", false);

static/js/composebox_typeahead.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ exports.slash_commands = [
394394
text: i18n.t("/settings (Load settings menu)"),
395395
name: "settings",
396396
},
397+
{
398+
text: i18n.t("/todo (Create a todo list)"),
399+
name: "todo",
400+
},
397401
];
398402

399403
exports.filter_and_sort_mentions = function (is_silent, query, opts) {

0 commit comments

Comments
 (0)