Commit graph

3267 commits

Author SHA1 Message Date
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
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
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
4cc8b5621d Merge pull request #1212 from matrix-org/luke/fix-ctrl-k
Enable ctrl+k room filter focus
2017-07-12 18:20:45 +01:00
Richard van der Hoff
33f330d434 Manual fixup for remaining q incantaions
* don't try to use `finally` as a static method
* work around absence of `allSettled`
2017-07-12 18:05:40 +01:00
Richard van der Hoff
0d7cc59d99 replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-12 18:05:40 +01:00
Richard van der Hoff
0254d2b3a2 q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff
a06bd84213 replace imports of q with bluebird
update `package.json`

```
find src test -name '*.js' |
   xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
   xargs perl -i -pe 'if (/import [qQ]/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 18:05:08 +01:00
Luke Barnard
6ff924fc0d Remove MessageComposerInputOld 2017-07-12 18:03:13 +01:00
Luke Barnard
0585fa048f Remove disableMarkdown setting
This was used by the old composer to control whether to interpret text as markdown prior to sending.

The new setting is `MessageComposerInput.isRichTextEnabled`.
2017-07-12 17:35:19 +01:00
Luke Barnard
6547a55852 Update to reflect previous implementation
Which was originally a74bbb424c
2017-07-12 17:12:57 +01:00
David Baker
a48c7d2364 Only allow http and https widget URLs 2017-07-12 14:16:47 +01:00
Luke Barnard
0dbd1d988e Enable ctrl+k room filter focus
By using the `focus_room_filter` dispatch
2017-07-12 13:51:55 +01:00
David Baker
918f5abe81 Lint correctly 2017-07-12 10:34:50 +01:00
David Baker
53316a76f4 Sandbox app iframes 2017-07-12 10:22:14 +01:00
David Baker
eb4e4a66ff Merge pull request #1206 from matrix-org/rav/login_unmounted_guard
Give Login an unmounted guard
2017-07-11 18:37:50 +01:00
Luke Barnard
3bab720a7b Merge pull request #1208 from matrix-org/rav/timelinepanel_test_flakiness
Fix a flaky test in the timelinepanel code
2017-07-11 18:10:55 +01:00
Richard van der Hoff
1139dd2be5 Fix a flaky test in the timelinepanel code
Sometimes it was possible for there to be a scroll event before the initial
pagination completed, which then upset the rest of the test. Just give it a few
ms to sort itself out instead.
2017-07-11 17:34:46 +01:00
Richard van der Hoff
67372d4fed Give Login an unmounted guard 2017-07-11 17:04:19 +01:00
Luke Barnard
af3b6484cd Merge pull request #1196 from matrix-org/dbkr/groups_better_groupview
Add more features to Group View
2017-07-11 17:03:47 +01:00
David Baker
ff3c21ef10 Lint, including putting key in right place 2017-07-11 15:16:58 +01:00
David Baker
4e49ebd6ce Change incorrect refs to this.props 2017-07-11 14:31:07 +01:00
David Baker
8690ed2181 Make the category functions React components 2017-07-11 14:28:44 +01:00
David Baker
222ca054c5 Use PropTypes.shape to define our required inputs 2017-07-11 13:41:00 +01:00
Kegsay
cf158530f5 Implement new widget API (#1201)
* Implement new widget API

This allows clients to see who provisioned which widgets.

* Update to make state_key the wid

* Update to latest API

* Only show widgets which have required fields

* Don't constantly show apps dialog

* Fix example to include data key
2017-07-11 12:15:27 +01:00
David Baker
29990296d2 Lint 2017-07-11 11:02:23 +01:00
David Baker
925d5bd480 Add featured users to Group View 2017-07-10 19:32:02 +01:00
David Baker
0e67a9158c hide settings button until it's wired up 2017-07-10 15:32:57 +01:00
David Baker
048912a241 Remove commented ordering code
No lomger needed now roosm come down in order
2017-07-10 15:17:58 +01:00
David Baker
ac4be03f7b Merge remote-tracking branch 'origin/develop' into dbkr/groups_better_groupview 2017-07-10 14:51:13 +01:00
Luke Barnard
b104228a7b Remove redundant functions, bindings, props 2017-07-10 14:27:41 +01:00
David Baker
49ca29e422 Lint 2017-07-10 14:07:16 +01:00
David Baker
696c72be2b Merge remote-tracking branch 'origin/develop' into dbkr/groups_better_groupview 2017-07-10 14:03:30 +01:00
Luke Barnard
c9df079464 Merge pull request #1176 from matrix-org/luke/feature-enable-RTE
Take RTE out of labs! 🎉
2017-07-10 13:56:00 +01:00
Luke Barnard
9643f0c00b Merge pull request #1167 from matrix-org/dbkr/my_groups
Implement 'Groups' page
2017-07-10 09:37:06 +01:00
David Baker
1e713557bb PR feedback 2017-07-07 18:34:40 +01:00
Luke Barnard
7a8f524f4a Remove two possible sources for the "AutoComplete stays visible bug
which is now https://github.com/vector-im/riot-web/issues/4537 <- there.

This does two things:
 - Track which query was the most recent one requesting completion and only process completions for that one. (In this case the empty string "" doesn't have any completions but we still track it so that previous calls with non-empty queries would not race and cause completions to be shown when we actuall don't want any.)
 - Make the "do we want to show the AutoComplete box?" logic a bit more sane
2017-07-07 15:30:31 +01:00