mirror of https://github.com/zulip/zulip.git
5fc37c5f9b
We implement 3 changes: 1. Partial Stream Typeahead In addition to regular stream completion, we do partial completion of stream typeahead on pressing '>'. We use our custom addition to typeahead.js: this.trigger_selection to start topic_list typeahead. Implements: `#stream na|` (press >) => `#**stream name>|`. 2. Topic Jump Typeahead 'topic_jump' typeahead moves the cursor from just ahead of a completed stream-mention to just after the end of the mention text and is triggered by typing '>' after the stream mention. This typeahead merely uses the regex matching and event hooks of the typeahead library instead of displaying any text completions. Implements: `#**stream name** >|` => `#**stream name>|`. 3. Topic List Typeahead 'topic_list' typeahead shows the list of recent topics of a stream and if your current text doesn't match one of them, also shows you the current query text, allowing you to create mentions for topics that do not exist yet. Implements: `#**stream name>someth|` => `#**stream name>something** |`. At the end of this commit, we support the following mechanisms to complete the stream-topic mention: 1. Type "#denmar|". 2. Press Enter to get "#**Denmark** |". 3. Press > to get "#**Denmark>|". 4. Type topic name and press enter. OR 1. Type "#denmar|". 2. Type > to get "#**Denmark>|". 3. Type topic name and press enter. Both result in the final inserted syntax: "#**Denmark>topic name**". Documentation is still pending. Fixes #4836. |
||
---|---|---|
.. | ||
casper_lib | ||
casper_tests | ||
node_tests | ||
zjsunit | ||
.eslintrc.json | ||
run-casper |