Commit Graph

26 Commits (ff74dd4b7f8cda5ec2af2b140867ba432e7ab497)

Author SHA1 Message Date
Bruno Windels ff74dd4b7f
Merge pull request #3374 from matrix-org/bwindels/fix-cider-command-detection
New composer: make command detection not break with pill candidates in command
2019-09-02 14:58:12 +00:00
Bruno Windels b9cb22e153 dont allow sending empty messages 2019-09-02 14:36:31 +02:00
Bruno Windels b46e001d0a allow pill-candidate parts in commands 2019-09-02 13:51:46 +02:00
Bruno Windels fe7ac11abc New composer: support pasting files 2019-08-29 16:19:05 +02:00
Bruno Windels d8bb9ecedf bring insert method inline with transform callback, add docs
before the insertPartsAt method would call the update callback
on its own, but now we have the concept of a transformation session,
so lets bring the API in line
2019-08-27 16:43:05 +02:00
Bruno Windels 944c56d09b prevent cider history overlapping with slate composer history 2019-08-22 14:07:03 +01:00
Bruno Windels b366b0b3d8 store composer state when typing in new composer
this doesn't use the MessageComposerStore on purpose so that
both the new and old composer don't overwrite each others state,
as the format is different.
2019-08-22 13:33:20 +01:00
Bruno Windels 9f72268df7 avoid null-refs when receiving an action before initial rendering 2019-08-22 13:33:20 +01:00
Bruno Windels 3c5cf3e778 rename ComposerHistoryManager to SendHistoryManager to avoid confusion
...with the undo history manager for the composer.
2019-08-22 13:33:20 +01:00
Bruno Windels c5cd8b943a support auto complete for /commands 2019-08-22 13:33:20 +01:00
Bruno Windels 88cc1c428d add support for emotes and running /commands
this does not yet include autocomplete for commands
2019-08-22 13:33:20 +01:00
Bruno Windels cc82353d8f bring back composer send history and arrow up to edit previous message 2019-08-22 13:33:20 +01:00
Bruno Windels 9bc8ff7e1e clear composer undo history when sending a message 2019-08-22 13:33:20 +01:00
Bruno Windels 9003a8836a put dispatches together 2019-08-22 13:33:20 +01:00
Bruno Windels 2e71dd3ea8 cleanup, move code out of big switch statement 2019-08-22 13:33:20 +01:00
Bruno Windels 60e10364b0 add quoting functionality to new composer 2019-08-22 13:33:20 +01:00
Bruno Windels 10c218825b allow inserting multiple parts at a position 2019-08-22 13:33:20 +01:00
Bruno Windels a9d6d01f10 add reply fields to message content to be sent when replying 2019-08-22 13:33:20 +01:00
Bruno Windels 7b3282185a update proptypes 2019-08-22 13:33:20 +01:00
Bruno Windels c135cd60d2 restore insert mention
for this, we need to store the last caret in the editor,
to know where to insert the user pill.

Because clicking on a member blurs the editor, and the
selection is moved away from the editor.

For this reason, we keep as cache of the last caretOffset object,
invalidated by a selection with different values.

The selection needs to be cloned because apparently the browser
mutates the object instead of returning a new one.
2019-08-22 13:33:20 +01:00
Bruno Windels 71286b5610 restore reply_to_event action 2019-08-22 13:33:20 +01:00
Bruno Windels e39c405c55 restore focus_composer action 2019-08-22 13:33:20 +01:00
Bruno Windels 2cff486ec0 set placeholder same as label 2019-08-22 13:33:20 +01:00
Bruno Windels f9992a1fc6 implement editor placeholder 2019-08-22 13:33:20 +01:00
Bruno Windels e2e4ea493f set aria label on main composer too 2019-08-22 13:33:20 +01:00
Bruno Windels cfbd2e9cc8 support basic sending with new main composer
this removes all formatting options, as the new editor doesn't
have any.
2019-08-22 13:33:20 +01:00