Luke Barnard
2f293adad5
Fix userId undefined in pillifyLinks
2017-07-19 18:21:26 +01:00
Luke Barnard
ecaf6e5223
Merge pull request #1234 from matrix-org/luke/feature-mention-pill
...
Add mx_UserPill_me class to user pills that match credentials.userId
2017-07-19 17:56:24 +01:00
Luke Barnard
61d5d078dd
Merge pull request #1235 from matrix-org/luke/fix-rte-inline-code-format
...
Mimic ctrl+j of RT mode in MD mode
2017-07-19 17:44:56 +01:00
Luke Barnard
5d1b33d2a8
Merge branch 'develop' into luke/feature-mention-pill
2017-07-19 17:22:03 +01:00
Luke Barnard
3a53fabb87
Merge pull request #1228 from matrix-org/luke/feature-auto-complete-matrixto-pills
...
Implement composer completion user/room pill insertion
2017-07-19 17:19:47 +01:00
Luke Barnard
29b6d70aff
Merge branch 'develop' into luke/fix-rte-inline-code-format
2017-07-19 17:19:25 +01:00
Luke Barnard
d179398cf2
Merge pull request #1227 from matrix-org/luke/feature-matrixto-timeline-pills
...
Decorate matrix.to anchor tags as mx_UserPill and mx_RoomPill
2017-07-19 17:17:48 +01:00
Luke Barnard
75ca141cf9
Merge pull request #1232 from matrix-org/luke/fix-rte-backspace-unstyled-block
...
Interpret backspace at start of style block as block style toggle
2017-07-19 17:16:34 +01:00
Richard van der Hoff
8d7ff127f1
Merge pull request #1231 from matrix-org/luke/fix-rte-duplicate-autocompletions
...
Use _uniq instead of _sortedUniq for return unique matched results
2017-07-19 17:05:12 +01:00
Luke Barnard
c8722292e3
Don't truncate EmojiProvider completion pills
2017-07-19 16:20:57 +01:00
Luke Barnard
28c98d93d1
Mimic ctrl+j of RT mode in MD mode
...
by inspecting whether multiple lines are selected or the selection is empty. If either of these are true, insert a code block surrounding the selection, otherwise insert single backticks around the selection for inline code formatting.
2017-07-19 16:13:47 +01:00
Luke Barnard
b131637a11
Add mx_UserPill_me class to user pills that match credentials.userId
2017-07-19 11:00:26 +01:00
Luke Barnard
98ca937fef
Interpret backspace at start of style block as block style toggle
...
Part of fixing https://github.com/vector-im/riot-web/issues/4580
2017-07-18 17:52:04 +01:00
Luke Barnard
b185f43d3d
Use _uniq instead of _sortedUniq for return unique matched results
...
_sortedUniq claims to be like _uniq but optimised for sorted arrays - https://lodash.com/docs/4.17.4#sortedUniqBy . But in practice this isn't quite true, so stick with the unoptimised version.
2017-07-18 16:23:54 +01:00
David Baker
7cfef04c1f
Remove other promise notify
2017-07-18 11:27:21 +01:00
David Baker
b261c89a63
Fix inviting multiple people to a room
...
Removes the promise notify as bluebird doesn't support it. It's
also not used anywhere now.
Fixes https://github.com/vector-im/riot-web/issues/4614
2017-07-18 11:11:42 +01:00
Luke Barnard
d207ee5244
Expand groups into variables with readable names
2017-07-17 19:31:36 +01:00
Luke Barnard
29757fcf11
Merge branch 'luke/feature-matrixto-timeline-pills' into pills
2017-07-17 16:43:46 +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
b1e3dc406c
Decorate matrix.to anchor tags as mx_UserPill and mx_RoomPill
...
Requires https://github.com/vector-im/riot-web/pull/4597 to look OK
2017-07-17 14:50:45 +01:00
Luke Barnard
31290f3377
Remove redundant, unused decorators from RTE
...
These have since been replaced by decorators that operator whether in MD mode or otherwise. This might not be optimal because LINK entities do not appear in MD mode at all at the moment, but instead you see the ()[] md notation version.
2017-07-17 14:27:50 +01:00
Luke Barnard
ee5117525c
Merge pull request #1225 from matrix-org/luke/feature-rte-pills
...
Decorate http://matrix.to links in the composer as pills
2017-07-14 17:47:16 +01:00
David Baker
3aed1a6293
Merge pull request #1224 from matrix-org/rav/upload_progress
...
Fix file uploading
2017-07-14 17:18:48 +01:00
Luke Barnard
434660166c
Decorate http://matrix.to links in the composer as pills
...
Any links in the composer that are recognised as matrix.to links will be decorated as `<span>`s with CSS classes (one of mx_UserPill or mx_RoomPill). This implementation has the nice bonus that switching to markdown (and back) will Just Work.
This will have some CSS changes coming to better match the design.
2017-07-14 17:04:28 +01:00
Richard van der Hoff
ad085a6273
Fix file uploading
...
File uploading no longer supports the .progress API; we now need to pass a
callback to get updates on the upload.
2017-07-14 17:01:03 +01:00
Richard van der Hoff
2a52c902e2
Merge pull request #1223 from matrix-org/rav/roomsettings_promise_usage
...
Fix RoomSettings save
2017-07-14 14:47:14 +01:00
Richard van der Hoff
9df1fb91ff
Fix RoomSettings save
...
Looks like saving RoomSettings had been broken since 0d7cc59
. `isFulfilled`
cannot be used as a static function.
2017-07-14 14:24:42 +01:00
Kegsay
5274cf59a0
Hook up the edit widget button ( #1218 )
...
* Hook up the edit widget button
* Review comments
2017-07-14 11:17:59 +01:00
Luke Barnard
1db2431c9f
Merge pull request #1222 from matrix-org/luke/fix-rte-allow-split-code-block
...
Add code-block to the list of blocks where hitting return will split-…
2017-07-14 09:48:47 +01:00
Luke Barnard
219c00bbc3
Add code-block to the list of blocks where hitting return will split-block
...
Hitting return in a code-block will now split the block into two code blocks. (Holding shift will still insert a soft newline into the current block).
We still need to make it a bit more obvious that consecutive code-blocks
are not contiguous - https://github.com/vector-im/riot-web/issues/4535
2017-07-13 18:42:37 +01:00
Luke Barnard
7945abe6b9
Merge pull request #1219 from matrix-org/luke/fix-autcompleter-promises
...
Fix Autocompleter promises
2017-07-13 18:11:45 +01:00
Luke Barnard
dcc4db53f9
Async functions now return bluebird
promises, remove redundant Promise.resolve
2017-07-13 17:51:14 +01:00
Luke Barnard
d97de4d576
Implement disabled-by-default setting for auto-replacement of plaintext emojis
...
FTR a list of plaintexts and their unicode equivalents can be found here - https://github.com/vector-im/riot-web/issues/4554#issuecomment-314374303
Pressing space after a matching emoji will replace the plaintext emoji with the equivalent unicode emoji.
2017-07-13 17:37:43 +01:00
Luke Barnard
f78a49b3a9
Do reflect
in the same map
2017-07-13 17:20:17 +01:00
Luke Barnard
c9f3a12693
Fix Autocompleter promises
...
Use bluebird instead of the now removed "q" library.
Also, make sure we timeout and then `reflect` to effectively do an `allSettled` that waits for all promises to either be resolved or rejected. Then we filter for those that are fulfilled and return the completions.
2017-07-13 16:51:14 +01:00
Luke Barnard
7fc10789fc
Merge pull request #1217 from matrix-org/luke/fix-rte-html-links
...
Improve RTE HTML link handling
2017-07-13 13:57:58 +01:00
Luke Barnard
f1a4209d6b
Fix indentation
2017-07-13 13:47:08 +01:00
Luke Barnard
5826b6f22a
Instead of sending HTML for any Entity, only send HTML for Links
...
Otherwise emoji messages are sent as HTML, needlessly
2017-07-13 13:41:17 +01:00
Luke Barnard
be045a6dc0
Interpret whitespace after entity as the end of the entity
...
The easiest way to stop the user from inserting whitespace onto the end of an entity is to toggle the entity state of the whitespace that was just entered. This allows the user to continue drafting a message without editing the link content.
This is for pasted `<a>` tags that have been copied from a website. We probably also want to be storing entities for substrings of content that are determined to be URLs.
2017-07-13 13:28:51 +01:00
Luke Barnard
4b96963408
Send HTML if there are any entities present in the composer
...
This is so that pasted HTML links that are represented as entities are sent as HTML.
2017-07-13 13:27:49 +01:00
Luke Barnard
55e1202c09
Decorate pasted links so that they look like links
...
By default, draftjs will represent pasted `<a>` tags as `LINK` entities, but it doesn't do any default decoration of these links. Add a decorator to do so.
Most of this was taken from https://github.com/facebook/draft-js/blob/v0.8.1/examples/link/link.html (note the version, v0.8.1).
2017-07-13 13:26:13 +01:00
David Baker
2a68cce3d5
Merge pull request #1216 from matrix-org/dbkr/history_save_unload_nullcheck
...
Prevent exception on page unload
2017-07-13 12:38:28 +01:00
Richard van der Hoff
086304532e
Merge pull request #1213 from matrix-org/rav/bluebird
...
Switch matrix-react-sdk to bluebird
2017-07-13 12:06:11 +01:00
David Baker
917133219f
Remove sentHistory save altogether
2017-07-13 11:53:22 +01:00
Luke Barnard
ce0f9e8803
Merge pull request #1214 from matrix-org/luke/fix-rte-remove-old-disable-md-setting
...
Remove `disableMarkdown` setting
2017-07-13 11:33:42 +01:00
Luke Barnard
4d844ebc34
Merge pull request #1215 from matrix-org/luke/remove-old-composer
...
Remove MessageComposerInputOld
2017-07-13 11:33:23 +01:00
David Baker
1e80edb43c
Prevent exception on page unload
...
Null check when saving sent history
2017-07-13 11:30:25 +01:00
Luke Barnard
04dd98e6e9
Remove references to tabComplete, which are now redundant
...
(since the old composer has been removed)
2017-07-13 10:16:59 +01:00
Luke Barnard
0e12e384cb
Remove TabComplete-related files
2017-07-13 10:16:42 +01:00
Luke Barnard
441954c8c1
Remove i18n for "Unknown command"
2017-07-13 09:55:11 +01:00