Commit graph

17804 commits

Author SHA1 Message Date
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
6df46cc319 send typing notifs in new composer (both send and edit) 2019-08-22 13:33:20 +01: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
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
ca3539d53e remove dead code 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
0adca10f9f make named options argument optional 2019-08-22 13:33:20 +01:00
Bruno Windels
ea1faacd8b support alt+enter on mac, like slate composer 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
ce44c651d0 keep deserialized parts compatible with part api,
to avoid breakage when passing real parts
2019-08-22 13:33:20 +01:00
Bruno Windels
d4fbe7ed69 make editor event parsing suitable for parsing messages to be quoted 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
d4ca087abe fix styling issues
- grow/shrink between min and max height correctly
 - don't grow wider than available space
 - some space between editor and buttons
2019-08-22 13:33:20 +01:00
Bruno Windels
fdf5fca628 add all props to proptypes 2019-08-22 13:33:20 +01:00
Bruno Windels
33c6945fc4 align autocomplete at top of composer 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
64e83a8111 font-size 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
Bruno Windels
df8488e194 pass label through props 2019-08-22 13:33:20 +01:00
Bruno Windels
92d7263046 move editor padding to edit specific style file
as it will be different for the main composer
2019-08-22 13:33:20 +01:00
Bruno Windels
d22745a5b2 make it obvious arguments are optional
because now they have a setter
2019-08-22 13:33:20 +01:00
Bruno Windels
063eabed71 don't return invalid indices from model, fix for #10358 2019-08-22 13:33:20 +01:00
Bruno Windels
505846ce53 split up css, update class names 2019-08-22 13:33:20 +01:00
Bruno Windels
341fdcd761 cleanup lint errors 2019-08-22 13:33:20 +01:00
Travis Ralston
19b7d18e7a No-op removals of widgets that don't exist
An example of this is setting your very first widget: there's nothing to remove, so you end up with "cannot call .getContent() of undefined" instead.
2019-08-21 18:43:29 -06:00
Travis Ralston
6449016d4b Fix alignment of discovery section addresses
We target the addresses specifically to avoid crushing the subsection text.
2019-08-21 14:41:25 -06:00
Travis Ralston
54633f3ad4 Remove extraneous logging 2019-08-21 12:57:54 -06:00
Travis Ralston
6f7bbf958e Remove tooltipClassName from the Field's input
React doesn't want the property on the <input>, so we'll take it off.
2019-08-21 12:51:16 -06:00
Weblate
b7d80b6054 Merge branch 'origin/develop' into Weblate. 2019-08-21 16:14:50 +00:00
Travis Ralston
04bb2ed322
Merge pull request #3327 from matrix-org/travis/discover-terms
Handle terms agreement in Discovery section of user settings
2019-08-21 10:14:45 -06:00
Weblate
d2b02c945d Merge branch 'origin/develop' into Weblate. 2019-08-21 15:01:48 +00:00
Kévin C
f1d9dc1b80 Translated using Weblate (French)
Currently translated at 100.0% (1744 of 1744 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fr/
2019-08-21 15:01:48 +00:00
Slavi Pantaleev
72f39aa58a Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1744 of 1744 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/bg/
2019-08-21 15:01:47 +00:00
Travis Ralston
fb38787c37
Merge pull request #3332 from matrix-org/travis/fix-i18n
Don't double translate labs settings
2019-08-21 09:01:40 -06:00
Travis Ralston
5bf0587cc5 Don't double translate labs settings
SettingsStore.getDisplayName() already calls _t() for us.

Fixes https://github.com/vector-im/riot-web/issues/10586
2019-08-21 08:55:19 -06:00
Travis Ralston
2dc28a608f Move URL abbreviation to its own util file 2019-08-21 08:46:10 -06:00
Travis Ralston
c758b5d3f1 We don't use reject 2019-08-21 08:43:42 -06:00