1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-19 20:23:18 +03:00
Commit Graph

40 Commits

Author SHA1 Message Date
6ad4bb80dd == 2017-11-02 18:14:46 +00:00
3b58f0ca2a Ignore removed events 2017-11-02 18:14:21 +00:00
498b117d5a copyrights 2017-11-02 18:01:28 +00:00
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
d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
11f6c8cf53 Fix null pointer
Check if users is null, not the room
2017-09-22 16:56:26 +01:00
02894ee906 Experimental: Lazy load user autocomplete entries
Loading the users into the autocomplete provider is quite a large
chunk of work for a large room. Try lazy loading it the first time
a completion is done rather than up front when the room is loaded,
given that a lot of the time you switch to a room you won't say
anything.
2017-09-22 14:31:29 +01:00
5b1467a4c9 Allow autocompletion when typing user IDs
Because we need to support tab completing `"@some_user"` if `@some_user` has a display name that is totally different and will therefore not match what the user typed in.

This does have the disadvantage of a display name appearing (the pill) that isn't at all what the user typed in, but the autocomplete box and the tooltip should give enough information to let the user know what's going on. (e.g. typing `@kyr*tab*` and getting `Remmy`).

This _does_ run contrary to vector-im/riot-web#4495

related to vector-im/riot-web#4794

cc @lampholder
2017-08-15 14:08:26 +01:00
610b2a3a42 For mentions, always use rawDisplayName and remove (IRC) 2017-08-09 10:40:06 +01:00
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
1743c047bd Use the rawDisplayName for the user provider completion
to make sure that the length of text in the decoration (See <Pill>) is equal to the length of text in the completion (underlying text range that the Entity covers).
2017-08-08 10:28:11 +01:00
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
352f70f9ce Implement old composer feature that inserts ': ' or ' '
after a user completion
2017-07-20 11:52:18 +01:00
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
e18924c8fc Fix bug where a received message would remove completions for users
`Array.prototype.splice` will return the array of removed items, not a new array. The array operated on is actually modified in-place.

This was causing a few weird things to happen: https://github.com/vector-im/riot-web/issues/4511 and https://github.com/vector-im/riot-web/issues/4533. This should fix both of them but it is concerning that doing the tab completion is required to reproduce. Let's just see how this goes before closing the issues.

Thanks @turt2live for reproducing both bugs, giving enough information for a fix :)
2017-07-11 10:42:02 +01:00
62ee0f4e02 Fix accepting invites
Accepting an invite would cause a room to arrive via /sync only for it to throw an error in the auto complete code and cause the client to go wibbly (infinite spinner or preview bar).

The logs that lead to the debugging of this are https://github.com/matrix-org/riot-web-rageshakes/issues/239

Hopefully the error being throw isn't totally unrelated but looking at the sync handling for inviteRooms in sync.js, new rooms are stored and _then_ the Room event is emitted. The Room event could trigger setUserListFromRoom, which is where the bug was. So the room should have been stored regardless of this bug and the client should have been recoverable by swapping away and viewing the room again.
2017-07-07 19:43:30 +01:00
0af77e8913 Merge pull request #1177 from matrix-org/luke/fix-rte-prefix-matching
Only match users by matchgin displayname or user ID prefixes
2017-07-04 17:09:39 +01:00
2861adc830 Only truncate autocomplete pulls of Emoji, Room and UserProvider
Leaving Commands and DuckDuckGo not truncated
2017-07-04 16:50:50 +01:00
6a80875c01 Only match users by matchgin displayname or user ID prefixes
Because tab completing "k" probably shouldn't give you "luke"

Fixes https://github.com/vector-im/riot-web/issues/4495
2017-07-04 16:29:06 +01:00
e688eca823 Improve the sorting applied to the sorting of autocomplete results
QueryMatcher: sort results based on the position of the query within the matching value. The closer to the beginning of the word, the higher the result apears.

UserProvider: perf improvement (slice early) and refactor onUserSpoke
2017-07-04 13:53:06 +01:00
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
464863acd6 remove unused imports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 21:35:55 +01:00
66bce35918 copyright adjustments 2017-06-01 17:29:40 +01:00
f75e714c3a More translations.. 2017-06-01 15:18:06 +01:00
5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
0653343319 order User completions by last spoken 2017-03-07 04:09:26 +05:30
78641a80dd autocomplete: replace Fuse.js with liblevenshtein 2017-03-07 04:09:25 +05:30
2913e4605f Fix unicode completions in autocomplete.
Fixes vector-im/vector-web#2208
2016-09-16 15:38:29 +05:30
9a991a4dfd Autocomplete fixes and improvements 2016-09-13 17:30:29 +05:30
b62622a814 Improve autocomplete behaviour
Fixes vector-im/vector-web#1761
2016-09-13 15:46:02 +05:30
884abbd7e9 Cleanup autocomplete 2016-08-23 00:36:31 +05:30
e173900808 Update autocomplete design and scroll it correctly 2016-08-17 17:27:19 +05:30
2cddf18461 strip (IRC) displayname suffix from autocomplete
Fixes vector-im/vector-web#574
2016-08-03 17:26:05 +05:30
ed305bd547 fix: https for DDG, provide range for UserProvider 2016-07-05 01:37:01 +05:30
cccc58b47f feat: implement autocomplete replacement 2016-07-03 22:15:13 +05:30
fb6eec0f7d Hide/show autocomplete based on selection state 2016-06-21 15:46:20 +05:30
f6a76edfdf Fuzzy matching in User and Room providers 2016-06-21 05:05:23 +05:30
4af983ed90 Style changes and improvements in autocomplete 2016-06-20 13:52:55 +05:30
4bc8ec3e6d room, user, ddg autocomplete providers (wip) 2016-06-12 17:02:46 +05:30