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
Richard Lewis
e970b68859
Merge pull request #1194 from matrix-org/rxl881/apps
...
Use app ID for element key and pass screen parameter to scalar.
2017-07-07 11:28:39 +01:00
David Baker
1deb406294
Fix race
2017-07-07 10:12:06 +01:00
Luke Barnard
32a01b54b8
Merge branch 'develop' into erikj/group_server
2017-07-07 10:08:49 +01:00
Richard Lewis
0a1647e5c6
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into rxl881/apps
2017-07-07 09:48:24 +01:00
Luke Barnard
7fdbec4046
Merge pull request #1195 from matrix-org/luke/fix-rte-emoji-suggestions2
...
Alter EMOJI_REGEX to include end of string ($)
2017-07-06 21:59:44 +01:00
Luke Barnard
0a4f8ffead
Alter EMOJI_REGEX to include end of string ($)
...
Fixes https://github.com/vector-im/riot-web/issues/4529 because the match must include the remainder of the query.
2017-07-06 18:11:46 +01:00
David Baker
282b63d0cf
Merge pull request #1193 from matrix-org/luke/fix-create-room-preview
...
Fix vector-im/riot-web#4526 by pretending to join when creating a room
2017-07-06 17:58:30 +01:00
Luke Barnard
a921059432
Fix vector-im/riot-web#4526 by pretending to join
...
I thought about adding separate dispatches to prevent confusion but if anyone adds anything that listens to existing dispatches, they really ought to be grep-ing the world for said dispatch actions.
2017-07-06 17:40:27 +01:00
Richard Lewis
d091550ccb
Use app ID for element key and pass screen parameter to scalar.
2017-07-06 15:59:59 +01:00
Luke Barnard
6404f7603c
Merge pull request #1192 from matrix-org/t3chguy/markdown_allow_u
...
Allow underline through MD and in RTE (MD) using <u> which works with CM
2017-07-06 14:08:01 +01:00
Luke Barnard
d9a67355d2
Merge pull request #1190 from matrix-org/luke/fix-rte-paste-html-md-on
...
Only insert HTML into the composer in RTE mode
2017-07-06 13:59:52 +01:00
Michael Telatynski
ff7ae5b995
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/markdown_allow_u
2017-07-06 13:56:20 +01:00
Michael Telatynski
fcd8321a63
Allow underline through MD and in RTE (MD) using <u> which works with CM
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-06 13:49:13 +01:00
Michael Telatynski
6149b37245
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/room-settings-unban-no-pl
2017-07-06 13:30:40 +01:00
Michael Telatynski
c6d9ec42a2
only show unban button in RoomSettings if user has sufficient PL to do so
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-06 12:51:55 +01:00
Luke Barnard
bdefb35c64
Only insert HTML into the composer in RTE mode
...
If MD mode is enabled, paste the plaintext equivalent.
2017-07-06 11:52:02 +01:00
Luke Barnard
3e93930dcc
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into develop
2017-07-06 11:18:10 +01:00
Luke Barnard
6b6af3f148
Remove RTE content_state logging
2017-07-06 11:17:54 +01:00
Richard van der Hoff
c29863362f
Merge pull request #1189 from matrix-org/rav/fix_duplicate_preview_key
...
Fix a React duplicate key error
2017-07-06 11:08:03 +01:00
Richard van der Hoff
4f8d9d869e
mention preserving ordering in comment
2017-07-06 10:47:15 +01:00
Kegan Dougal
42ba3ff410
Linting
2017-07-06 10:44:32 +01:00
Richard van der Hoff
6a2d6b2e6e
Fix a React duplicate key error
...
If a single message contains the same link twice, we get an error from React
about the clashing keys. De-dup the links to keep it quiet.
2017-07-06 10:02:25 +01:00
Kegsay
e0e321783b
Append the scalar_token to the widget URL if the widget URL is a scalar URL ( #1182 )
2017-07-06 09:28:48 +01:00
Luke Barnard
0bf1124f1b
Merge pull request #1181 from matrix-org/luke/fix-rte-draft-persist
...
Implement MessageComposerStore to persist composer state when room switching
2017-07-05 18:24:27 +01:00
Luke Barnard
7f1d8e3c90
Merge pull request #1188 from matrix-org/luke/feature-rte-visual-bell
...
Add visual feedback for when there are no completions available
2017-07-05 18:23:10 +01:00
Luke Barnard
14ddf4e2aa
Merge pull request #1187 from matrix-org/luke/fix-rte-emoji-filter-supported
...
Filter out unsupported emoji from the emoji meta data
2017-07-05 18:21:50 +01:00
Luke Barnard
29e793f591
Merge pull request #1180 from matrix-org/luke/fix-rte-force-immediately
...
When hitting "tab" use an autocompleteDelay of 0
2017-07-05 18:20:48 +01:00
Luke Barnard
89d0ec4de8
Merge pull request #1179 from matrix-org/luke/fix-query-matcher-empty-query
...
Don't try to match with an empty query string
2017-07-05 18:20:25 +01:00
Luke Barnard
d78168d407
Add visual feedback for when there are no completions available
...
Attempts to kep parity with old composer by using the same #faa colour but uses an animation instead of a js timeout.
Fixes https://github.com/vector-im/riot-web/issues/4490
2017-07-05 18:14:22 +01:00
Luke Barnard
2de4dd7b71
Filter out unsupported emoji from the emoji meta data
...
Because apparently emojione provides meta data for more than the emojis it supports itself.
Fixes https://github.com/vector-im/riot-web/issues/4504
2017-07-05 17:09:16 +01:00
Richard van der Hoff
a20ed2f632
Add some logging to track down flaky test
...
We had a test failure where apparently the MatrixClient failed to start
... let's try and figure out why.
2017-07-05 16:20:21 +01:00
Luke Barnard
b3db6344ae
Fix import for Rooms so that DMs can be created
2017-07-05 15:00:50 +01:00
Luke Barnard
5c9d3edec4
Revert #1170 , fde7d5eaf4
...
There were a few issues with this, namely that links were no longer linkified and an error was logged to the console: `Warning: Stateless function components cannot be given refs (See ref "topic" in EmojiText created by RoomHeader). Attempts to access this ref will fail.`
2017-07-05 14:46:00 +01:00
Luke Barnard
df23a6cd85
Use Object.assign to set initial state of MessageComposerStore
...
Otherwise we just modify the initial state when running
2017-07-05 13:38:34 +01:00
Luke Barnard
3d5b3ed7ad
Use ContentState instead and persist over localStorage
2017-07-05 11:49:34 +01:00
Luke Barnard
084a933dbd
Implement MessageComposerStore to persist composer state across room switching
...
This behaviour was present in the old composer but implemented using local storage. This is unecessary as we don't really care about our drafts across clients, the important thing is that our draft is kept when switching rooms.
As a bonus, ifnore vertical arrow key presses when a modifier key is pressed so that the room switching keys (alt + up/down arrow) don't also cause history browsing (or autocomplete browsing).
2017-07-05 10:24:55 +01:00
Luke Barnard
5f6c3e5afc
When hitting "tab" use an autocompleteDelay of 0
...
So that there's no delay when tab completing. Fixes https://github.com/vector-im/riot-web/issues/4497
2017-07-04 17:49:50 +01:00
Luke Barnard
710ee69418
Don't try to match with an empty query string
...
This was causing UserProvider to give results because every string happens to start with empty string and its regex also acepts the empty string.
2017-07-04 17:32:07 +01:00
Luke Barnard
0af77e8913
Merge pull request #1177 from matrix-org/luke/fix-rte-prefix-matching
...
Only match users by matchgin displayname or user ID prefixes
2017-07-04 17:09:39 +01:00
Luke Barnard
2861adc830
Only truncate autocomplete pulls of Emoji, Room and UserProvider
...
Leaving Commands and DuckDuckGo not truncated
2017-07-04 16:50:50 +01:00
Luke Barnard
6a80875c01
Only match users by matchgin displayname or user ID prefixes
...
Because tab completing "k" probably shouldn't give you "luke"
Fixes https://github.com/vector-im/riot-web/issues/4495
2017-07-04 16:29:06 +01:00
Luke Barnard
e688eca823
Improve the sorting applied to the sorting of autocomplete results
...
QueryMatcher: sort results based on the position of the query within the matching value. The closer to the beginning of the word, the higher the result apears.
UserProvider: perf improvement (slice early) and refactor onUserSpoke
2017-07-04 13:53:06 +01:00
Richard van der Hoff
fb86534ba3
Merge pull request #1171 from matrix-org/t3chguy/delintify
...
De-Lint 23 files
2017-07-04 10:40:49 +01:00
Luke Barnard
c84d707124
Merge pull request #1169 from matrix-org/t3chguy/add-missing-autocomplete-commands
...
add missing commands to the Autocomplete CommandProvider
2017-07-04 10:32:29 +01:00
Luke Barnard
664f3acc3c
Only move through history if caret at start or end of line
...
As suggested by @dbkr (because this is what we do for the old composer), only move through history when the caret is that the beginning of the first line (block) or end of the last.
This has the nice property of being able to move the caret up to a really long message: fixes https://github.com/vector-im/riot-web/issues/4471
2017-07-04 10:12:06 +01:00
Michael Telatynski
fc379e2a15
fix typos post-luke-review
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-03 19:24:18 +01:00
Michael Telatynski
34c9bbfd86
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/delintify
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
# Conflicts:
# src/components/views/rooms/RoomHeader.js
2017-07-03 19:15:38 +01:00
Michael Telatynski
827c38d4a5
fix variable clash
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-03 19:13:07 +01:00
Luke Barnard
b8dacd3bb1
Merge pull request #1165 from turt2live/travis/pad-12h
...
Don't pad 12h timestamps
2017-07-03 16:43:23 +01:00