Commit Graph

40 Commits (4c56b45a9f1a85d348a053a77560ff7438ba2764)

Author SHA1 Message Date
David Baker b267798010 Kill FuzzyMatcher
This has been commented out for ages. Just remove it and make things
use QueryMatcher directly rather than looking like they do fuzzy matching
but not.
2018-10-10 19:18:06 +01:00
Matthew Hodgson efdc5430d7 merge develop 2018-07-09 17:50:07 +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 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
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 9c0c806af4 correctly send pills in messages 2018-05-12 20:04:58 +01: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 498b117d5a copyrights 2017-11-02 18:01:28 +00:00
David Baker 4953d4de4d Give autocomplete providers the room they're in
Removes the gut-wrenching that RoomView does to jam the user list
into the user autocomplete provider.
2017-11-02 17:51:08 +00:00
Luke Barnard 6b9a2909df Add rule to enforce spacing in curly brackets in JSX children
This required an updated in version of eslint-plugin-react to 7.4.0.
2017-09-28 11:21:06 +01:00
Luke Barnard a72f38799f Disable autocompletions for users and rooms when entering a command
This only affects commands that take a room alias or user ID as an argument. (Leaving commands such as `/me` unaffected)
2017-08-08 15:58:15 +01:00
Luke Barnard 72c1cf9288 When sorting completions, use matched string, not entire query
Otherwise the results vary depending on where you start autocompleting in your message. We only care about the matched string.
2017-08-02 10:09:00 +01:00
Luke Barnard dbade448c1 Don't try to match query against roomId
We only care about aliases.
2017-08-02 09:40:00 +01:00
Luke Barnard 8053d2933a Order room completions more intuitively
by index of the query in displayedAlias and then length of displayedAlias. (So that aliases where the query appears earlier in the string appear first and if the query is in the same index for two aliases, the shorter one appears first).
2017-08-02 09:35:07 +01:00
Luke Barnard 84fe51a162 Insert MD links when autocompleting in MD mode
These will appear decorated because they are inserted as entities. It was necessary to modify pills to have an explicit linkText that is derived from the `href` being pillified (and is thus no longer the inserted completion but rather the display name (or user ID) or room alias.
2017-07-20 15:09:59 +01:00
Luke Barnard 897ff05d87 Implement composer completion user/room pill insertion
This modifies the composer completion such that completing a room or user will insert an IMMUTABLE matrix.to LINK Entity for the range that was replaced. Display names will not have a colon after their name anymore as it seemed strange that we would insert one after a pill.
2017-07-17 15:53:29 +01:00
Luke Barnard 2861adc830 Only truncate autocomplete pulls of Emoji, Room and UserProvider
Leaving Commands and DuckDuckGo not truncated
2017-07-04 16:50:50 +01:00
Luke Barnard 87609582c6 Merge branch 'develop' into rte-fixes2
Conflicts:
	package.json
	src/autocomplete/CommandProvider.js
	src/autocomplete/UserProvider.js
	src/components/structures/RoomView.js
	src/components/structures/UserSettings.js
	src/components/views/rooms/MessageComposerInput.js
2017-06-23 15:30:06 +01:00
Kegan Dougal 66bce35918 copyright adjustments 2017-06-01 17:29:40 +01:00
Kegan Dougal f75e714c3a More translations.. 2017-06-01 15:18:06 +01:00
David Baker 5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
David Baker d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
Aviral Dasgupta 9946cadc2d
autocomplete: fix RoomProvider regression 2017-03-07 04:09:27 +05:30
Aviral Dasgupta 78641a80dd
autocomplete: replace Fuse.js with liblevenshtein 2017-03-07 04:09:25 +05:30
Aviral Dasgupta edd5903ed7
autocomplete: add space after completing room name 2017-03-07 04:09:25 +05:30
Aviral Dasgupta f2ad4bee8b
Disable force completion for RoomProvider (RTE) 2017-03-07 04:09:24 +05:30
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Aviral Dasgupta 2913e4605f Fix unicode completions in autocomplete.
Fixes vector-im/vector-web#2208
2016-09-16 15:38:29 +05:30
Aviral Dasgupta 79e5e6f6fe Fix force completion and hide rooms with no alias 2016-09-13 18:02:33 +05:30
Aviral Dasgupta 9a991a4dfd Autocomplete fixes and improvements 2016-09-13 17:30:29 +05:30
Aviral Dasgupta b62622a814 Improve autocomplete behaviour
Fixes vector-im/vector-web#1761
2016-09-13 15:46:02 +05:30
David Baker df1cc8748f Change references to MatrixTools to Rooms
or remove where they were unused
2016-09-07 11:33:58 +01:00
Aviral Dasgupta 884abbd7e9 Cleanup autocomplete 2016-08-23 00:36:31 +05:30
Aviral Dasgupta e173900808 Update autocomplete design and scroll it correctly 2016-08-17 17:27:19 +05:30
Aviral Dasgupta b3d8292113 feat: use canonical room alias for room completion 2016-07-04 22:34:58 +05:30
Aviral Dasgupta cccc58b47f feat: implement autocomplete replacement 2016-07-03 22:15:13 +05:30
Aviral Dasgupta fb6eec0f7d Hide/show autocomplete based on selection state 2016-06-21 15:46:20 +05:30
Aviral Dasgupta f6a76edfdf Fuzzy matching in User and Room providers 2016-06-21 05:05:23 +05:30
Aviral Dasgupta 4af983ed90 Style changes and improvements in autocomplete 2016-06-20 13:52:55 +05:30
Aviral Dasgupta 4bc8ec3e6d room, user, ddg autocomplete providers (wip) 2016-06-12 17:02:46 +05:30