Commit Graph

156 Commits (fe3850d61fb4868ba8e6ca7057add32b1c5afc49)

Author SHA1 Message Date
David Baker 3c895e5a0d
Merge pull request #2074 from matrix-org/t3chguy/hide_ddg_me_after_space
hide some commands after space as they have special semantics
2018-07-19 13:51:05 +01:00
Michael Telatynski 5867fe73dd
hide some commands after space as they have special semantics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 15:38:21 +01:00
Michael Telatynski 5b79e3bcd5
fix user autocomplete not adding `: ` if at the start
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-17 11:56:24 +01:00
Michael Telatynski 8bcb987f50
delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 20:14:37 +01:00
Matthew Hodgson 021409aafe
apply review feedback from @lukebarnard1
(cherry picked from commit 37d4bce)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:54:57 +01:00
Matthew Hodgson efdc5430d7 merge develop 2018-07-09 17:50:07 +01:00
David Baker 7ef4377e57
Merge pull request #2007 from matrix-org/t3chguy/accent_insensitive_userprovider
accent insensitive autocomplete
2018-06-25 12:13:20 +01:00
Michael Telatynski f21f7eff45
add word boundary to Community,Room,User provider regexps
to stop the autocompleter firing mid-word
and remove any unused capture groups

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-25 09:32:51 +01:00
Michael Telatynski 6a84a7ab32
apply stripDiacritics to QueryMatcher instead of individually
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 02:22:07 +01:00
Michael Telatynski 7cdc91856b
retain pre-stripped text so it can be used for rendering
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 02:12:01 +01:00
Michael Telatynski 54bccd2016
make Accent Insensitive match more generic and apply to rooms too
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 02:10:31 +01:00
Michael Telatynski 104e8d9cba
delint and add flow annotations to make my editor happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 02:00:36 +01:00
Michael Telatynski ce04c745e5
strip diacritics for user autocomplete
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 01:56:24 +01:00
Michael Telatynski 9ee78de7e5
pr iteration, don't assume js-sdk stores group stuff other than groupId
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-22 12:05:46 +01:00
Michael Telatynski 561b9699fc
Merge branch 'develop' into t3chguy/community_autocomplete 2018-06-22 12:00:34 +01:00
Michael Telatynski 884fa3b913
use existing command hashmap over linear array search
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-20 17:25:23 +01:00
Michael Telatynski 7d9d17145c
change so that if someone enters invalid command with args we strict match
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-20 17:21:06 +01:00
Michael Telatynski 287745f8c6
delint, remove unused imports and fix flow annotations
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-19 12:06:13 +01:00
Michael Telatynski b79cd205a0
Support autocompleting Communities
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-19 11:52:48 +01:00
Michael Telatynski 9de6bf4f5a
once command has a space, strict match instead of fuzzy match
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit a852033)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-18 19:36:11 +01:00
Michael Telatynski 107802fa29
simplify arrow func
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-18 19:34:46 +01:00
Michael Telatynski 85ddc0651b
consolidate the two locations commands are defined, as it was a MESS
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-18 19:34:40 +01:00
Michael Telatynski a50f6094cc
allow `/` + wait to also show all commands
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-16 16:44:13 +01:00
Michael Telatynski f152ad84b8
Improve CommandProvider for Autocomplete
improve Regexp so it leaves autocomplete up whilst typing arguments
improve completion so it doesn't discard your arguments on-hover
add a way to list all commands by using `/<TAB>`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-16 16:40:44 +01:00
Matthew Hodgson 4439a04689 fix lint 2018-05-20 23:43:42 +01:00
Matthew Hodgson 9aba046f21 fix MD pill serialization 2018-05-20 14:32:20 +01:00
Matthew Hodgson c3a6a41e5d support links in RTE 2018-05-20 00:49:29 +01:00
Matthew Hodgson c1000a7cd5 emojioneify the composer
and also fix up the selectedness CSS for pills and emoji
2018-05-14 03:02:12 +01:00
Matthew Hodgson e06763cd59 show all slashcommands on / 2018-05-13 03:18:41 +01:00
Matthew Hodgson c967ecc4e5 autocomplete polishing
* suppress autocomplete when navigating through history
* only search for slashcommands if in the first block of the editor
* handle suffix returns from providers correctly
* fix SelectionRange typing in the providers
* fix bugs when pressing ctrl-a, typing and then tab to complete a replacement by collapsing selection to anchor when inserting a completion in the editor
* fix https://github.com/vector-im/riot-web/issues/4762
2018-05-13 03:04:40 +01:00
Matthew Hodgson c91dcffe82 fix cursor behaviour around pills 2018-05-13 00:40:54 +01:00
Matthew Hodgson 9c0c806af4 correctly send pills in messages 2018-05-12 20:04:58 +01:00
Luke Barnard a3c407992b Don't autocomplete users for single "@" 2018-04-24 13:59:18 +01:00
David Baker 8342f441df
Merge pull request #1778 from matrix-org/t3chguy/devtools_autocomplete
Add /devtools to Autocomplete and run gen-i18n
2018-03-22 09:54:26 +00:00
Michael Telatynski 9df5638c8e
make linter happy - add missing trailing comma
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-03-21 11:00:07 +00:00
David Baker 7ac583bc96
Merge pull request #1800 from ma1uta/develop
Enable autocompletion for non-English languages.
2018-03-20 10:39:20 +00:00
Matthew Hodgson b68da579f0 don't crash on missing room members 2018-03-16 01:21:52 +00:00
Anatoliy Sablin 953a520f38 Enable autocompletion for non-English languages. 2018-03-14 00:33:19 +03:00
Michael Telatynski 03676a68ac
Add /devtools to Autocomplete and run gen-i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-02-28 00:57:14 +00:00
Luke Barnard c5da1015fe Do not truncate autocompleted users in composer
so that disambiguation is possible at a glance.

Fixes https://github.com/vector-im/riot-web/issues/6024
2018-02-08 17:47:36 +00:00
Michael Telatynski 1bc9d344ae
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/nvl/rich_quoting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	src/components/views/messages/TextualBody.js
2018-01-10 11:54:58 +00:00
Aidan Gauland 35780f5ae0 Remove use of deprecated React.PropTypes
Replace all uses of React.PropTypes with PropTypes and importing PropTypes from
'prop-types'.
2017-12-26 14:03:18 +13:00
Michael Telatynski 5c229b9ef8
DRY matrix.to link generation so it is all changeable in one class
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-12-12 23:33:40 +00:00
David Baker c23a3fd7fe Add some null checks 2017-12-05 11:14:55 +00:00
Luke Barnard dad797d4a2 Run linting --fix 2017-11-16 13:19:36 +00:00
Travis Ralston 289b0c2b6a
Merge branch 'develop' into travis/granular-settings 2017-11-07 14:55:12 -07:00
David Baker 41e7496ff1 unused var 2017-11-06 15:25:25 +00:00
Travis Ralston 893c39bfbe Merge branch 'develop' into travis/granular-settings 2017-11-03 22:00:07 -06:00
David Baker 112c74a255 Add NotifProvider to offer @room as a completion 2017-11-02 18:54:25 +00:00
David Baker 6ad4bb80dd == 2017-11-02 18:14:46 +00:00