Commit Graph

28 Commits (fe357e530dc482b5338a59a9e74a36727797252c)

Author SHA1 Message Date
Bruno Windels 8870da6c24 Add alt_aliases to room completion candidates
but don't match on name otherwise you see multiple entries per room
when searching for a room name

Also pass the roomId to the composer autocomplete, so
it's easier to we don't need to loop through all the rooms and
it's also easier accept room with local aliases as well in the future
2020-02-21 13:02:41 +01:00
Bruno Windels 40f7fa8f94 add suffixes from provider to room and @room completions
this prevents the @room not working when not typing an extra space
2019-09-23 14:40:41 +02:00
Bruno Windels 228905bec2 insert command completion as command part (instead of plain)
this prevents the command being sent as plain text

this adds a `type` property to completions to decide which
parts should be inserted into the composer, hence deciding how
they will be rendered.
2019-09-23 14:39:19 +02:00
Bruno Windels c595371845 share user pill postfix between autocomplete and insert mention
where we decide to add a colon only if the composer is empty
2019-09-02 14:06:30 +02:00
Bruno Windels 4329d8c4ef
Merge pull request #3372 from matrix-org/bwindels/fix-command-tab-complete
New composer: fix tab-complete in commands
2019-09-02 11:38:13 +00:00
Bruno Windels a4376a76f0 only pass keyboard to autocomplete when it has selections
otherwise if tab is pressed, try to tab complete the last word
2019-09-02 11:25:29 +02:00
Bruno Windels c9572250be only append colon to user-pill when at start of composer
by passing position to autocomplete, so completion
can depend on where the pill-candidate appears.
2019-08-29 17:47:14 +02:00
Bruno Windels 2ff2ff0e75 support autocomplete replacing text with multiple parts
and append ": " to user pills
2019-08-29 17:43:18 +02:00
Bruno Windels 85efb71a23 add visual bell when no replacements are available
also add try/catch in _tabCompleteName so errors don't get swallowed
2019-08-28 15:53:16 +02:00
Bruno Windels 0f6465a1db don't close autocomplete when hitting tab
that's not what the slate impl does and it's not an improvement
2019-08-27 16:43:05 +02:00
Bruno Windels e2dfe888cc only capture Enter when autocompletion list has selection
this is the old behaviour and makes sense IMO
also close the auto complete when resetting the composer model,
in case it was still open
2019-08-22 13:33:20 +01:00
Bruno Windels 78971f168f create AtRoomPill when autocomplete returns @room 2019-06-14 18:28:44 +02:00
Bruno Windels eb4ff50c3c do parts creation only in PartCreator to not scatter dependencies 2019-06-14 18:28:44 +02:00
Bruno Windels 48f5cf1523
Merge pull request #2966 from npny/npny/autocomplete-arrow-keys
Allow arrow keys navigation in autocomplete list
2019-06-13 15:38:36 +00:00
Bruno Windels e674f39e3b support (de)serializing parts with other dependencies than text 2019-06-12 18:32:32 +02:00
Pierre Boyer 8158567640 Remove left/right autocomplete navigation for MessageEditor 2019-06-05 10:49:49 +02:00
Pierre Boyer a4dec88c65 Add back on..Arrow functions. Add left/right key navigation in MessageEditor 2019-06-04 13:57:15 +02:00
Pierre Boyer ed6427571e Update src/editor/autocomplete to correctly call countCompletions and moveSelection 2019-06-04 13:24:24 +02:00
Bruno Windels a024fd8991 port tab completion from MessageComposerInput 2019-05-24 12:38:01 +02:00
Bruno Windels ff61376c07
Merge pull request #3004 from matrix-org/bwindels/update-link-previews-after-edit
Message editing: update link previews after editing
2019-05-22 14:17:34 +00:00
Bruno Windels 6b1134bdf0 add matrix foundation copyright header 2019-05-22 16:16:32 +02:00
Bruno Windels 0e98b124ac undo thinko of passing current room as pill room 2019-05-20 15:33:54 +02:00
Bruno Windels 710338c01f pass member and room to editor pills to get avatar url 2019-05-20 10:28:26 +02:00
Bruno Windels 2c3453d307 put caret after replaced part if no caretOffset is given by autocomplete 2019-05-14 15:38:16 +01:00
Bruno Windels bc14d4f58f comment 2019-05-14 15:38:16 +01:00
Bruno Windels 22587da5ff close autocomplete on enter 2019-05-14 15:38:16 +01:00
Bruno Windels ffff66a92d handle Escape properly
close autocomplete, and also replace with plain text part.

also remove leftover logging
2019-05-14 15:38:16 +01:00
Bruno Windels 4bb8b79942 initial auto complete wrapper, make existing autocompleter work w/ model 2019-05-14 15:38:16 +01:00