Commit graph

281 commits

Author SHA1 Message Date
Travis Ralston
b77be2d380 Just use MSC1957 2019-08-14 09:33:02 -06:00
Travis Ralston
8b1c90a01e Convert to using im.vector.integration_manager for IM widget
This avoids us having to throw the entirety of MSC1957 into the queue, particularly when we're only using a third of the MSC.
2019-08-14 08:57:38 -06:00
Travis Ralston
03d735f4ed Support changing your integration manager in the UI
Part of https://github.com/vector-im/riot-web/issues/10161
2019-08-12 15:40:50 -06:00
Travis Ralston
74ce5c3541 Read integration managers from account data
For https://github.com/vector-im/riot-web/issues/4913 / https://github.com/vector-im/riot-web/issues/10161

Relies on the structure defined by [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957)

This is just the bit of code to parse the user's widgets (while watching for changes) and allow for it to be the default manager.
2019-08-09 17:35:59 -06:00
Travis Ralston
018b4f5d41 Use the default integration manager for config options 2019-08-09 17:08:26 -06:00
David Baker
366f7e277a Make registration work without an IS. 2019-08-07 11:15:56 +01:00
Bruno Windels
95f9e48f91 workaround diff-dom returning redundant diff actions 2019-07-31 12:25:04 +02:00
Michael Telatynski
657a11de83 Fix /rainbowme and /rainbow breaking apart utf-16 emoji
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-25 19:25:28 +01:00
Bruno Windels
3753e5261d Implement diffing html messages in the edit history 2019-07-24 11:28:56 +02:00
Travis Ralston
285b126530 Appease the linter 2019-07-11 15:14:05 -06:00
Travis Ralston
7a3aa9be2e Remove unused identityEnabled property from ValidatedServerConfig
See https://github.com/vector-im/riot-web/issues/10229
2019-07-11 15:11:09 -06:00
J. Ryan Stinnett
527e1e94a4 Update config.json docs location
Part of https://github.com/vector-im/riot-web/pull/10195
2019-06-28 13:44:18 +01:00
Bruno Windels
a1548285b5 fix copyright header and whitespace 2019-06-26 16:13:15 +02:00
Bruno Windels
19b4699bc2 WIP for showing pills in edit history 2019-06-26 11:59:56 +02:00
Bruno Windels
e54881aa24 WIP 2019-06-26 11:59:56 +02:00
Bruno Windels
0b17812b9c allow editing emotes 2019-06-14 11:01:34 +02:00
Bruno Windels
89cc45892c fix grammar fail 2019-06-13 13:28:21 +02:00
Bruno Windels
678fd37549 helper class to preserve editor state between remounting the editor 2019-06-12 18:29:21 +02:00
Bruno Windels
d13b3aa16c don't block unsent events from being edited 2019-06-12 11:20:21 +02:00
Bruno Windels
f78aeae83a also consider pending events when looking for next/prev event to edit 2019-06-12 11:19:17 +02:00
Travis Ralston
aacb942d57 Don't handle identity server failure as fatal, and use the right message
Fixes https://github.com/vector-im/riot-web/issues/10002
2019-06-10 19:28:32 -06:00
Travis Ralston
758b3394a4 Don't handle identity server liveliness errors as fatal
An invalid IS causes an invalid HS, so we switch the order of the checks. Additionally, we adjust the HS result so that it appears like a liveliness error for the IS, allowing the app to continue normally.
2019-06-07 13:14:43 -06:00
Travis Ralston
d59ad605a6 Allow the login form to be submitted, and clarify other things 2019-06-06 12:18:41 -06:00
Travis Ralston
c15ee1a829 Appease the linter 2019-06-05 12:15:37 -06:00
Travis Ralston
ace1bde238 Implement design and copy for errors 2019-06-05 11:32:02 -06:00
Travis Ralston
10f4d6b419 Appease the linter 2019-06-04 23:52:40 -06:00
Travis Ralston
e2fdeec71a Fail more softly on homeserver liveliness errors
This performs liveliness checks on the auth pages to try and show a friendlier error. Earlier checks in the app startup are expected to not block the app from loading on such failures.

See https://github.com/vector-im/riot-web/issues/9828
2019-06-04 23:42:38 -06:00
Matthew Hodgson
16ca31bf90 lint 2019-06-02 04:47:23 +01:00
Matthew Hodgson
caa950f625 add SBIX fallback twemoji font 2019-06-02 04:24:36 +01:00
Bruno Windels
3793361240 always log on return false 2019-05-29 13:24:46 +02:00
Bruno Windels
26a5bb0dcb exclude chrome in ua from safari version check for colr support 2019-05-29 13:05:59 +02:00
Bruno Windels
3014180762 fix lint & make regex more robust 2019-05-29 12:17:15 +02:00
Bruno Windels
18697d8ee7
Update src/utils/FontManager.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-29 10:10:18 +00:00
Bruno Windels
50f477dcd0
Update src/utils/FontManager.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-29 10:09:10 +00:00
Bruno Windels
66738e2284
Update src/utils/FontManager.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-29 10:08:59 +00:00
Bruno Windels
5c8e280a45 make sure the check doesn't blow up 2019-05-29 12:03:38 +02:00
Bruno Windels
ba54b16275 sniff safari 12, macos 10.14 to support COLR, as safari doesn't wait for the font to load to emit load 2019-05-29 11:59:50 +02:00
Bruno Windels
cf704fd2f1 fix COLR font check being racy
also make sure it doesn't run more than once.
keeping the FF sniffing because missing "extract canvas data" permissions
would still break the check.
2019-05-29 10:11:14 +02:00
Bruno Windels
afd656ae2c
Merge pull request #3025 from matrix-org/bwindels/edit-keyboard-nav
Message editing: arrow key (up/down) navigation between editable events
2019-05-27 15:12:40 +00:00
Bruno Windels
dee24ac27a extract constant 2019-05-27 16:45:26 +02:00
Bruno Windels
651cb8b9a7 lint 2019-05-27 16:43:12 +02:00
Bruno Windels
918de849c7 make sure in the future arrow up/down only goes through own events 2019-05-27 16:41:03 +02:00
Bruno Windels
e193522db1 PR feedback: put findPrev/NextEditableEvent in one function with flag 2019-05-27 16:22:55 +02:00
Travis Ralston
093de71ff8 Minus one log 2019-05-24 10:53:24 -06:00
Travis Ralston
ef9ef0e654 Add some logging for COLR checks 2019-05-24 10:36:07 -06:00
Bruno Windels
8926fcb3a6 helper functions to find next & previous editable events in timeline 2019-05-24 14:41:24 +02:00
Travis Ralston
14dc4b47fa Merge branch 'develop' into travis/feature/wellknown2 2019-05-22 23:05:54 -06:00
J. Ryan Stinnett
c9300650ed Add browser comment to extra fonts 2019-05-22 16:37:52 +01:00
J. Ryan Stinnett
11828c40e5 Add more weight of emoji font
For at least Chrome on Windows 10, we need to explicitly add additional weights
for emoji to appear when bold.
2019-05-22 16:22:18 +01:00
Bruno Windels
7a20dbe657 make sure we don't load the twemoji font multiple times on firefox 2019-05-22 13:07:54 +02:00
Bruno Windels
ee86471691 remove SBIX font and fallback to native emoji 2019-05-22 13:06:04 +02:00
Bruno Windels
10b5a9376e fix lint 2019-05-22 11:17:38 +02:00
Bruno Windels
85b448deb6 enable cache busting for twemoji font 2019-05-22 11:13:44 +02:00
Bruno Windels
9f4eb7782c exclude FF from COLR font check 2019-05-22 11:08:11 +02:00
Matthew Hodgson
30912dec17 fix lint 2019-05-22 02:41:07 +01:00
Matthew Hodgson
4ae652e5c3 load twemoji dynamically as colr or sbix; fix monospace 2019-05-22 02:31:24 +01:00
Travis Ralston
907c7ed119
Merge pull request #2994 from matrix-org/travis/screenreader/topleftmenu
Update TopLeftMenu for accessibility: Keyboard shortcut, reduced screen reader noise
2019-05-21 09:52:26 -06:00
Travis Ralston
bf28993509 appease the js-doc linter
hopefully
2019-05-21 09:33:52 -06:00
Travis Ralston
52b0f285c6 Add some clarifying comments 2019-05-20 21:07:12 -06:00
Travis Ralston
3476be3327 Merge branch 'develop' into travis/feature/wellknown2 2019-05-20 19:50:02 -06:00
J. Ryan Stinnett
0e5f0f24cc Extract MELS-style comma separated list to shared utility
This allows other UI components to use the same formatting for a long list.
2019-05-20 15:21:18 +01:00
Travis Ralston
332f716ce4 The linter will be the death of me 2019-05-17 15:36:28 -06:00
Travis Ralston
2a187810fd Restructure TopLeftMenu for accessibility and autofocus it
We use a trick with refs to automatically focus the element, also making use of mx_HiddenFocusable to hide the unnecessary outline. 

The menu itself has been restructured to hide some elements from screen readers (reduce noise) and to have a single unordered list. Screen readers mention when the user "enters" a list, and each item was previously saying "enter list <action>" when it should have just been "<action>".

By focusing automatically, the keyboard can be used to go up/down the menu as may be expected by keyboard users.
2019-05-17 15:32:03 -06:00
Bruno Windels
f285040e0b check msgtype of original event 2019-05-17 13:26:06 +01:00
Bruno Windels
c0cfa8ad00 only allow editing of text messages 2019-05-17 10:26:19 +01:00
Travis Ralston
0c7aa39273 Merge branch 'develop' into travis/feature/wellknown2 2019-05-16 12:59:50 -06:00
Bruno Windels
b081a3156f dont show edit button for messages that are not your own 2019-05-15 15:53:49 +01:00
David Baker
fc636c6cb9 lint 2019-05-15 14:00:37 +01:00
David Baker
da1bff1c5d Fix Single Sign-on
https://github.com/matrix-org/matrix-react-sdk/pull/2826 checked
that we had data in the crypto store if the had credentials in
localStorage. However, SSO stores creds in localStorage and then
redirects the browser to remove the loginToken parameter from the
URL without starting crypto, so after the redirect, we see creds
in localStorage but no crypto data, and error.

Fix by marking when we've successfully initialised crypto and only
erroring if that flag is set.

Fixes https://github.com/vector-im/riot-web/issues/9695
2019-05-15 13:47:48 +01:00
Travis Ralston
bb16357636 Flag all generated configs as non-default by default
The app is expected to flag a particular config themselves as default. This is primarily intended so that other parts of the app can determine what to do based on whether or not the config is a default config.

See https://github.com/vector-im/riot-web/issues/9290
2019-05-14 13:06:56 -06:00
Travis Ralston
83737654ff Merge branch 'develop' into travis/feature/wellknown2 2019-05-13 09:20:10 -06:00
Michael Telatynski
8bd45ce893 add /rainbow and /rainbowme Slash Commands
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-12 16:36:43 +01:00
Travis Ralston
6b45e60314 Update ServerTypeSelector for registration to use a server config 2019-05-03 11:32:59 -06:00
Travis Ralston
636cb8a5cc Have ServerConfig and co. do validation of the config in-house
This also causes the components to produce a ValidatedServerConfig for use by other components.
2019-05-03 11:32:59 -06:00
J. Ryan Stinnett
44e9ca6c52 Extract isContentActionable to a separate helper
This moves the check about whether an event is actionable (for the purpose of
replies, edits, reactions, etc.) to shared utils module.
2019-05-02 12:05:17 +01:00
Hubert Chathi
443a15eeb9 actually clear bit 63 instead of bit 55 2019-04-25 11:04:48 -04:00
J. Ryan Stinnett
4f41161a47 Check password complexity during registration
This adds a password complexity rule during registration to require strong
passwords. This is based on the `zxcvbn` module that we already use for key
backup passphrases.

In addition, this also tweaks validation more generally to allow rules to be
async functions.
2019-04-25 14:29:10 +01:00
Bruno Windels
eeaa7143ac move name coloring out of sender profile
so we can reuse it in room preview bar
2019-04-17 10:21:30 +02:00
Travis Ralston
d755263e33 Handle M_UNSUPPORTED_ROOM_VERSION in invites and room creation
Fixes https://github.com/vector-im/riot-web/issues/8925
2019-04-09 19:03:38 -06:00
J. Ryan Stinnett
16573a6381 Track store failures after startup
This watches the `IndexedDBStore` in case it degrades. If it does, we track this
in analytics so we can observe how often it happens in the field.

Should help track errors like https://github.com/vector-im/riot-web/issues/7769
2019-04-04 11:59:53 +01:00
J. Ryan Stinnett
57d72b4deb
Merge pull request #2841 from jryans/storage-eviction-modal
Notify user when crypto data is missing
2019-04-01 17:31:39 +01:00
J. Ryan Stinnett
328f0cd6bf Notify user when crypto data is missing
If we have account data in local storage but nothing in the crypto store, it
generally means the browser has evicted IndexedDB out from under us. This adds a
modal to explain the situation and offer to completely clear storage to get
things back to normal.

Fixes https://github.com/vector-im/riot-web/issues/9109
2019-03-29 16:06:08 +00:00
Bruno Windels
a326c83016
Merge pull request #2842 from matrix-org/bwindels/bacat-scrolling-merged-develop
BACAT Scrolling
2019-03-29 14:02:15 +00:00
Bruno Windels
0a4ef44bcf fix lint 2019-03-28 18:29:48 +01:00
J. Ryan Stinnett
f396cf830c Clarify when memory stores are being used
This adds logging for the cases where memory only stores are being used. It also
reorganises the sync store path to match the crypto store.

Part of https://github.com/vector-im/riot-web/issues/9309
2019-03-28 12:40:38 +00:00
J. Ryan Stinnett
1928c43476 Check the local storage fallback for crypto store
This adds additional consistency checks to examine the local storage fallback
for the crypto store as well as the primary IndexedDB variant.

Part of https://github.com/vector-im/riot-web/issues/9309
2019-03-28 12:27:33 +00:00
J. Ryan Stinnett
73b2484e08 Catch errors when checking IndexedDB
In Firefox private browsing, we may get errors when checking storage
consistency. We don't want that to block general Riot operation, so catch those
errors and log instead.

Fixes https://github.com/vector-im/riot-web/issues/9300
2019-03-27 15:48:38 +00:00
Bruno Windels
adf263c4af Merge branch 'develop' into bwindels/bacat-scrolling-merged-develop 2019-03-27 11:46:28 +01:00
David Baker
a1e5fecb67
Merge pull request #2832 from jryans/storage-telemetry
Send telemetry about storage consistency
2019-03-27 09:58:55 +00:00
Travis Ralston
ddcb7a68bd
Merge pull request #2781 from matrix-org/travis/openid-widget
Widget OpenID reauth implementation
2019-03-27 03:42:39 -06:00
J. Ryan Stinnett
d06fb0d076 Send telemetry about storage consistency
This adds telemetry events about basic storage consistency, so we can start to
get an idea of how often IndexedDB eviction occurs in the field.

Fixes https://github.com/vector-im/riot-web/issues/9272
2019-03-27 09:26:15 +00:00
J. Ryan Stinnett
4c0f459995 Add basic storage consistency check
This adds a storage consistency check just before creating a client on login.
Each data store we use is checked for data and any problems are logged to the
console.

Fixes https://github.com/vector-im/riot-web/issues/9271
2019-03-26 16:34:13 +00:00
J. Ryan Stinnett
90dbeefcfb Remove unused option for disabling IndexedDB
`createMatrixClient` and surrounding paths support an argument to disable
IndexedDB, but it is never actually used. This removes the option to simplify
the code.
2019-03-26 13:29:04 +00:00
Travis Ralston
2dcb40f1be Track OpenID automatic permissions by (widgetLocation, widgetUrl) 2019-03-23 23:25:31 -06:00
J. Ryan Stinnett
2ac7dd4ca3 Explicitly create cryptoStore in React SDK
The React SDK has a client creation path that starts 2 out of 3 stores, but then
leaves the other one for the JS SDK's default value handling.

We'll soon be adding additional code to check the health of stores, so it would
be simpler to follow and think about if we create them all in one place.
2019-03-22 15:03:03 +00:00
Bruno Windels
bab2730d40 use ResizeNotifier as well to relayout room list 2019-03-15 10:16:21 +01:00
Bruno Windels
891e343df6 create ResizeNotifier to derive which areas of the app resize and emit 2019-03-15 10:16:21 +01:00
David Baker
1e7af106b0 Merge branch 'master' into develop 2019-03-06 11:28:54 +00:00
David Baker
610a6d935a Only show hosting link if domain == matrix.org
Fixes https://github.com/vector-im/riot-web/issues/9059
2019-03-06 10:22:19 +00:00
David Baker
7aa451067e Add utm_campaign to the hosting links
According to where in the app the link was clicked
2019-03-05 18:33:22 +00:00