Richard van der Hoff
f69033c907
Use headless chrome instead of phantomjs for tests
2017-07-05 14:39:02 +01:00
Richard van der Hoff
167ce88a80
Rewrite ScrollPanel test
...
It turns out that Chrome now implements scroll-anchoring itself (ie, content
stays in the same place when you add more stuff off-screen), which means we
cannot rely on back-pagination to make ScrollPanel do a scroll.
Instead, just do a scrollToToken. Which turns out to be considerably simpler
anyway.
2017-07-05 14:34:25 +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
David Baker
3b06db0725
Pass with, height & resizeMethod through
...
Was spelt wrong anyway
2017-07-05 11:39:22 +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
5c10e352bb
Merge pull request #1178 from matrix-org/luke/fix-rte-truncate
...
Only truncate autocomplete pulls of Emoji, Room and UserProvider
2017-07-04 17:08: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
77348e6201
Remove spurious, unused code
2017-07-04 15:20:00 +01:00
Luke Barnard
e6ec5742be
_t should be used on string literals
...
For scripts to easily find translations
2017-07-04 15:06:24 +01:00
Luke Barnard
e3f2eb5232
Take RTE out of labs! 🎉
...
This stops react-sdk from tracking any state previously stored for the purposes of enabling or disabling the lab feature that enabled the new MessageComposer. It is now enabled permanently.
This is being done with the hope that we can get more feedback for it so that when we release we can be confident that people will be OK with the changes it brings.
2017-07-04 14:44:55 +01:00
Luke Barnard
2e95f5871c
Merge pull request #1175 from matrix-org/luke/fix-rte-autocomplete-sorting
...
Improve the sorting applied to the sorting of autocomplete results
2017-07-04 14:20:42 +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
d130411f6b
Merge pull request #1174 from matrix-org/luke/fix-rte-edge-detection
...
Only move through history if caret at start or end of line
2017-07-04 10:32:04 +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
turt2live
45559f7cf0
AM/PM strings
...
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-07-03 09:25:03 -06:00
David Baker
72eed70a84
Merge pull request #1173 from matrix-org/luke/fix-rte-forgets-me
...
Strip out "/me" after committing to RTE history
2017-07-03 15:59:07 +01:00
David Baker
a7bb546b1f
Merge pull request #1172 from matrix-org/luke/fix-rte-md-format-without-selection
...
When formatting with MD enabled, move selection inside ** or equivalent
2017-07-03 15:58:02 +01:00
Luke Barnard
775f5a0e5b
Strip out "/me" after committing to RTE history
...
So that history can include emotes
Fixes https://github.com/vector-im/riot-web/issues/4472
2017-07-03 15:47:03 +01:00
Luke Barnard
86889b8e8c
When formatting with MD enabled, move selection inside ** or equivalent
...
Fixes https://github.com/vector-im/riot-web/issues/3225
Also insert `\n` after code-block and blockquote to fix https://github.com/vector-im/riot-web/issues/2746
2017-07-03 15:23:24 +01:00
David Baker
a89ea39dba
Merge pull request #1170 from matrix-org/t3chguy/emojione-room-topic
...
make RoomHeader Topic use EmojiText to be emojione-friendly
2017-07-03 10:27:47 +01:00
Michael Telatynski
9ef83b8dc0
de-lint views/voip/*
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:58:46 +01:00
Michael Telatynski
661a0f3956
de-lint Resend, RoomListSorter, UserActivity
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:50:22 +01:00
Michael Telatynski
8bf13f8f48
de-lint email, extend
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:43:18 +01:00
Michael Telatynski
f514f1ff74
de-lint DateUtils
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:42:12 +01:00
Michael Telatynski
b937957609
de-lint createRoom
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:40:46 +01:00
Michael Telatynski
7da14d7078
de-lint ObjectUtils
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:38:32 +01:00
Michael Telatynski
68fb11d2bf
de-lint LifecycleStore
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:35:40 +01:00
Michael Telatynski
a270c85295
de-lint Entities
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:34:20 +01:00
Michael Telatynski
fdd8df87b0
de-lint PasswordReset
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:31:59 +01:00
Michael Telatynski
b98c105dcc
de-lint Skinner, RoomNotifs
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:28:12 +01:00
Michael Telatynski
b8ad0957b2
de-lint AddThreepid
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:21:28 +01:00
Michael Telatynski
09ae6bba07
de-lint BasePlatform
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:15:26 +01:00
Michael Telatynski
e56203f2a1
de-lint RoomHeader, Avatar, SdkConfig, SlashCommands
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:13:32 +01:00
Michael Telatynski
fde7d5eaf4
make RoomHeader Topic use EmojiText to be emojione-friendly
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 13:36:28 +01:00
Michael Telatynski
fb61a5d68b
post-merge fix
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 13:08:23 +01:00
Michael Telatynski
09f017fdd2
Merge branches 'develop' and 't3chguy/add-missing-autocomplete-commands' of github.com:matrix-org/matrix-react-sdk into t3chguy/add-missing-autocomplete-commands
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
# Conflicts:
# src/autocomplete/CommandProvider.js
# src/i18n/strings/en_EN.json
2017-07-01 13:07:18 +01:00
Michael Telatynski
9dba628f10
add missing commands to the Autocomplete CommandProvider
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 12:55:43 +01:00
Luke Barnard
0864ad9c8a
Merge pull request #1168 from matrix-org/luke/fix-rte-ascii-suggestions
...
Match by emoji ascii regex first before shorthand
2017-06-30 16:54:36 +01:00
Luke Barnard
b315ed630e
Match by emoji ascii regex first before shorthand
...
Plaintext emojis that start with ":" will also match against the shorthand regex but the match won't include the important part of the plaintext emoji. This means some emoji like ":)" won't be matched.
To fix this, put the ascii emoji regex first so that the match will be plaintext or otherwise it will fall through to the shorthand match (if there is one).
Fixes https://github.com/vector-im/riot-web/issues/4467
2017-06-30 16:31:40 +01:00