Commit graph

743 commits

Author SHA1 Message Date
Travis Ralston
25485edb3f Merge branch 'develop' into travis/welcome-login 2021-03-12 14:55:40 -07:00
Travis Ralston
53935782bc Convert DecryptFile to TS and modernize a bit 2021-03-10 12:32:18 -07:00
Travis Ralston
93f7f13c44 Early proof of concept for media customization support 2021-03-10 12:32:18 -07:00
Travis Ralston
eb45731d2e
Merge pull request #5735 from matrix-org/travis/use-strict-no
Remove a bunch of useless 'use strict' definitions
2021-03-09 07:24:41 -07:00
Travis Ralston
652e4845e5
Merge pull request #5732 from matrix-org/travis/skinning/pt1-ts
[SK-1] Fix types for replaceableComponent
2021-03-09 07:24:24 -07:00
J. Ryan Stinnett
89301ca8d9
Merge pull request #5695 from robintown/invite-command-reason
Support sending invite reasons with /invite command
2021-03-09 11:45:25 +00:00
Travis Ralston
591ccabab9 Remove a bunch of useless 'use strict' definitions 2021-03-08 20:26:08 -07:00
Travis Ralston
92af111c93 Fix types for replaceableComponent
This is to make it work in TS files
2021-03-08 20:21:07 -07:00
Will Hunt
d07069238f Merge remote-tracking branch 'origin/develop' into hs/blocked-err 2021-03-05 18:50:00 +00:00
Michael Telatynski
e479edd47a Add an add existing room to space CTA to Space View 2021-03-02 13:34:53 +00:00
Michael Telatynski
a687b9883c Add a create room in space CTA to Space View 2021-03-02 13:29:34 +00:00
Michael Telatynski
ab4b7b73ea Add a basic Space Settings view 2021-03-02 13:26:00 +00:00
Michael Telatynski
1a7a0e619d extend createRoom for creating rooms in a space 2021-03-01 19:05:50 +00:00
Michael Telatynski
c10512fd56 Initial SpaceRoomView work 2021-03-01 18:53:11 +00:00
Robin Townsend
e3065f5a02 Support sending invite reasons with MultiInviter
Signed-off-by: Robin Townsend <robin@robin.town>
2021-02-26 17:09:54 -05:00
Michael Telatynski
0f0edbfb14 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/spaces1
 Conflicts:
	src/utils/objects.ts
2021-02-25 10:50:56 +00:00
J. Ryan Stinnett
4e87fdcdfe Fix object diffing when objects have different keys
The object diff optimisation in 32cca0534c is not
correct for the case where `b` has some keys that are not in `a`.

By ensuring their key arrays are same length, we can preserve optimisation and
be correct as well.

Fixes https://github.com/vector-im/element-web/issues/16514
2021-02-24 13:45:25 +00:00
Michael Telatynski
63d95706e9 Create setHasDiff helper and use it
The usage here is identical to how it'll work in Spaces
2021-02-19 12:58:23 +00:00
Michael Telatynski
02ae1e954b clean up objectHasDiff and short circuit it quicker 2021-02-19 11:40:34 +00:00
Michael Telatynski
49f511bbab delint 2021-02-19 00:26:52 +00:00
Michael Telatynski
32cca0534c improve algo by skipping an O(n) operation 2021-02-19 00:19:35 +00:00
Michael Telatynski
3ca5632f6a Replace ObjectUtils.js with objects.ts 2021-02-19 00:00:10 +00:00
Travis Ralston
21b9ab9d85 Add an optional config option to make the welcome page the login page
This is commonly requested by deployments with custom setups or those using SSO. Instead of having them all ship the same welcome.html with redirect code in it, we can offer a built-in redirect.

Note that this doesn't actually redirect and instead just replaces the view. This is to make the change less invasive as otherwise it involves changing the routing layers.
2021-02-16 15:18:31 -07:00
Travis Ralston
cd82d97c3e Use randomly generated conference names for Jitsi
Fixes https://github.com/vector-im/element-web/issues/15205
Replaces https://github.com/matrix-org/matrix-react-sdk/pull/5322

This change uses a random ID for the Jitsi conference name to avoid any badly-named Jitsi calls, and overrides the "subject" (title) of the call so end users aren't typically exposed to the random ID.
2021-02-15 08:53:37 -07:00
J. Ryan Stinnett
474c029db5 Fix permalink via parsing for rooms
This adjusts the app local link parsing path to better handle `via`s in query
params. Previously this path only expected them when an event ID was also
present, but it's also valid to have `via`s without event IDs as well.

Fixes https://github.com/vector-im/element-web/issues/16345
2021-02-03 15:18:19 +00:00
J. Ryan Stinnett
fd7c50f683 Move route splitting inside route parsing 2021-02-03 14:05:22 +00:00
J. Ryan Stinnett
89b835dd20
Merge pull request #5575 from matrix-org/jryans/no-event-pills
Remove pills from event permalinks with text
2021-02-01 10:53:22 +00:00
J. Ryan Stinnett
2c313e0c5e Add managed hybrid call widgets when supported
If your homeserver is configured with an experiment `widget_build_url`, this
will take over the functionality of the call buttons and turn them into a
general widget installer.
2021-01-29 14:45:25 +00:00
J. Ryan Stinnett
fa3ace8473 Rework message pilling to ignore event permalinks
This removes pills from event permalinks since they hide the text associated
with the link, which can cause nonsensical messages since words have been
removed. In addition, this moves away from fragile regexs to more
straightforward code to parse links and adds a test for this case.

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/5188
Fixes https://github.com/vector-im/element-web/issues/15159
2021-01-27 11:46:20 +00:00
Will Hunt
5de92b68d9 Show a specific error for hs_disabled 2021-01-27 11:39:57 +00:00
Travis Ralston
f06aa00240 Fix percentage calculation 2021-01-19 00:22:02 -07:00
Travis Ralston
0d29d15a46 Support room-defined height as well
Much like widget widths, it is acceptable for us to forget what everyone's height was previously at.
2021-01-18 19:27:11 -07:00
Travis Ralston
cfb583d193 Calculate widget widths in the WidgetLayoutStore
Note that this ditches all previously set width values, however this is probably acceptable for now. Trying to remain backwards compatible gets tricky on top of already tricky code, and the impact of Element forgetting widths is not as severe as forgetting which widgets were/are pinned.
2021-01-18 18:50:36 -07:00
Travis Ralston
0001e1e684 Support initial ordering and calculation for widgets by layout 2021-01-18 17:41:42 -07:00
David Baker
008fdf8dfb Missed some underscores 2021-01-13 15:44:33 +00:00
David Baker
28fe6291d9 add public/privates & de-underscore 2021-01-13 15:37:49 +00:00
David Baker
ac7f86cf65 Convert DMRoomMap to typescript 2021-01-13 14:49:23 +00:00
J. Ryan Stinnett
162a5de82e Rename and reformat Element URL pattern
This is just a code style cleanup. There are no behaviour changes in this
commit.
2020-12-21 13:05:45 +00:00
Hubert Chathi
983ffe98ff
Merge pull request #5483 from uhoreg/web_pickle
Use random pickle key on all platforms
2020-12-15 12:56:41 -05:00
Hubert Chathi
649ea0d148 apply changes from review, and other fixes/improvements 2020-12-10 21:52:18 -05:00
Travis Ralston
af69ba9c79
Merge pull request #5451 from iokiwi/new/room-alias-in-permalink
Use room alias in generated permalink for rooms
2020-12-09 12:07:44 -07:00
Michael Telatynski
5be65a525d Improve identifiers and code readability 2020-12-09 11:14:06 +00:00
Michael Telatynski
e896b009f1 Handle manual hs urls better 2020-12-08 10:58:16 +00:00
Simon Merrick
b365d3b27e Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into new/room-alias-in-permalink 2020-12-07 10:30:50 +13:00
Simon Merrick
5544ee6408 extract alias handling to separate function 2020-12-06 23:29:11 +13:00
Michael Telatynski
3223b00028 Jump to home page when leaving a room
so that you don't get thrown into a room you may be ignoring on purpose
2020-12-03 11:15:55 +00:00
Simon Merrick
cf8c98e076 More explicit reference checking 2020-12-02 12:34:43 +13:00
Simon Merrick
e92ac67152 Use room alias in generated permalink for rooms
Signed-off-by: Simon Merrick <s.m3rrick@gmail.com>
2020-11-28 21:50:51 +13:00
Travis Ralston
5da27aed94 Replace the concept of a Widget Security Key with an OIDC state
The security key naming/practice was misguided, so let's call it what it is (a settings key) and abstract away the complexity to a new store.

Fixes https://github.com/vector-im/element-web/issues/15820 while we're here.
2020-11-25 18:39:11 -07:00
Travis Ralston
55592d365c Merge branch 'develop' into travis/msc-send-widget-events 2020-11-18 15:57:53 -07:00
Travis Ralston
a212dab84c Developer design a permissions dialog 2020-11-17 20:38:59 -07:00
Travis Ralston
91b1c8b817 Fix DM logic to always pick a more reliable DM room
Fixes https://github.com/vector-im/element-web/issues/15605
2020-11-16 15:07:09 -07:00
Travis Ralston
dacc7bc111 Rebrand Riot -> Element in the permalink classes 2020-11-02 21:46:48 -07:00
David Baker
7ec1d5a881 Fix a bunch of silly lint errors
At some point the script to generate .eslintignore.errorfiles had
been run and added all these files to the ignore list, often because
they lacked a space before a brace or something equally mundane.

These are the easiest bunch.
2020-10-30 18:18:17 +00:00
Michael Telatynski
4e12aeca9e Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/room-list-widgets
 Conflicts:
	src/components/views/elements/AppTile.js
2020-10-21 12:48:51 +01:00
Michael Telatynski
568e147053 Merge copyrights
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-21 12:44:16 +01:00
Michael Telatynski
4dd8b8d8c6 fix WidgetUtils setRoomWidget signature
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 21:02:48 +01:00
Michael Telatynski
5ee0262da2 Post-merge tidy up
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 20:56:41 +01:00
Michael Telatynski
bec1d718e0 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/room-list-widgets
 Conflicts:
	src/components/views/elements/AppTile.js
	src/utils/WidgetUtils.ts
2020-10-19 20:50:16 +01:00
Michael Telatynski
1fe2eea43f Pass theme to Jitsi
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 18:47:27 +01:00
Michael Telatynski
744a4abd1c Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/widgets 2020-10-19 13:08:17 +01:00
Michael Telatynski
73489b7c6d AppsDrawer watch ResizeNotifier isResizing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 13:08:11 +01:00
ginnyTheCat
046f498295
Added formula sources 2020-10-11 00:37:00 +02:00
Michael Telatynski
ada6d1aa46 Iterate PR
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-09 08:42:21 +01:00
ginnyTheCat
014671d8ce
Fixed lint issues 2020-10-08 19:55:52 +02:00
ginnyTheCat
e218f6dcab
Changed rainbow algorithm 2020-10-08 17:19:28 +02:00
Travis Ralston
0570deffa2 Fix iterableUnion types 2020-10-01 10:01:13 -06:00
Travis Ralston
f27071ee64 Transition all remaining messaging over (delete the old stuff) 2020-09-30 20:20:31 -06:00
Travis Ralston
bb5184bc50 Remove unused function 2020-09-29 15:32:07 -06:00
Travis Ralston
cd93b2c22a First rough cut of cutting AppTile over to the ClientWidgetApi 2020-09-29 14:14:51 -06:00
Travis Ralston
96fa34eecf Add stop functions 2020-09-26 18:40:26 -06:00
Travis Ralston
634ffb0140 Add structure for widget messaging layer 2020-09-25 09:39:21 -06:00
Michael Telatynski
c65d8be7d8 delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-24 09:49:30 +01:00
Michael Telatynski
956a3bf69d Implement Left Panel User Widget
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-24 09:28:49 +01:00
Michael Telatynski
2e6bad8b07 Convert WidgetUtils to TS and improve typing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-23 11:01:19 +01:00
J. Ryan Stinnett
693dbab54e Add more types and enums 2020-09-22 15:22:39 +01:00
J. Ryan Stinnett
115c7ccd4e Support HS-preferred Secure Backup setup methods
This adds support for the `secure_backup_setup_methods` key, which allows HS
admins to state that Element should simplify down to only one setup method,
rather than offering both.

Fixes https://github.com/vector-im/element-web/issues/15238
2020-09-21 16:10:42 +01:00
Michael Telatynski
229967aa33 Retry joinRoom up to 5 times in the case of a 504 GATEWAY TIMEOUT 2020-09-14 15:16:29 +01:00
Matthew Hodgson
5ecc3f4398 kill formatMinimalBadgeCount entirely 2020-09-10 13:56:46 +01:00
Michael Telatynski
a1f1334250 Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/dpsah/6785.3
 Conflicts:
	src/components/structures/RoomView.tsx
2020-09-09 15:16:19 +01:00
Michael Telatynski
01a8ac25c9 Use null coalescing operator 2020-09-08 17:40:57 +01:00
Michael Telatynski
98b59fb217 Consolidate all the work thus far 2020-09-08 15:43:38 +01:00
Michael Telatynski
2527344294 Create name/title Widget utils 2020-09-08 15:42:31 +01:00
Michael Telatynski
87b72de25f
Merge pull request #5176 from matrix-org/t3chguy/dpsah/6785.4
Fix WatchManager for global room watchers and tidy widget code a little
2020-09-08 15:24:10 +01:00
Michael Telatynski
a80bcaa292
Merge pull request #5174 from matrix-org/t3chguy/fix/15100
Fix permalink local linkification to not strip via servers
2020-09-08 15:23:38 +01:00
Jason Robinson
75518254fb
Merge pull request #5173 from matrix-org/jaywink/jitsi-openidjwt-auth
Support creation of Jitsi widgets with "openidtoken-jwt" auth
2020-09-08 17:16:50 +03:00
Michael Telatynski
1b99c11b11 tidy 2020-09-08 15:09:45 +01:00
Michael Telatynski
48d9c94c88 Extract editWidget into WidgetUtils 2020-09-08 11:12:14 +01:00
Michael Telatynski
906d4defd5 Convert RoomView and RoomContext to TS 2020-09-08 10:52:37 +01:00
Michael Telatynski
d0c716d61c Fix permalink local linkification to not strip via servers 2020-09-08 10:26:37 +01:00
Jason Robinson
4b43e39d2a Code review related changes
* drop room ID from jitsi widget data
* reame queryParts variable
2020-09-08 11:31:40 +03:00
Michael Telatynski
667c129ebc Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/dpsah/6785
 Conflicts:
	src/components/structures/ScrollPanel.js
	src/components/views/rooms/AppsDrawer.js
2020-09-07 14:33:57 +01:00
Jason Robinson
baa6d8a294 Correctly template in Jitsi widget auth if such exists
Also add roomId to the widget data and URL template. It's needed by
the Element Web Jitsi code to produce auth for the Jitsi backend.
2020-09-04 12:42:46 +03:00
Michael Telatynski
cffe902504 Add feature to ResizeNotifier to maintain isResizing state and use it to skip onScroll handling 2020-09-02 12:00:35 +01:00
Michael Telatynski
1fc55b33c1 Stash lodash import optimization 2020-08-28 18:53:43 +01:00
resynth1943
2c20afc047 Fix lodash imports
Signed-off-by: resynth1943 <resynth1943@tutanota.com>
2020-08-26 23:23:18 +01:00
J. Ryan Stinnett
8e0742b9fe
Merge pull request #5130 from matrix-org/jryans/secure-backup-required
Enforce Secure Backup completion when requested by HS
2020-08-24 17:32:58 +01:00
J. Ryan Stinnett
b601a025b5 Use io.element instead of im.vector 2020-08-24 16:33:23 +01:00
J. Ryan Stinnett
2e2f60c20b Use updated waitFor API with well-known 2020-08-24 16:11:35 +01:00
Travis Ralston
42988d373b Remove debugging 2020-08-19 19:42:58 -06:00
Travis Ralston
8fffce8a30 Appease the linter 2020-08-19 19:42:36 -06:00
Travis Ralston
309c32700b Remove unused success state 2020-08-19 19:23:27 -06:00
Travis Ralston
e0b8343088 Run all room leaving behaviour through a single function
Fixes https://github.com/vector-im/element-web/issues/14999
Fixes https://github.com/vector-im/element-web/issues/10380

We were failing to handle errors when `/part`ing a room, though the leave room button was fine. This runs both the button and command through the same function for handling, including the 'view next room' behaviour.
2020-08-19 19:21:40 -06:00
J. Ryan Stinnett
e56a61ec68 Invoke Secure Backup flow inside the app when requested by HS
If the Secure Backup required mode is set the client `.well-known` file, then
this will ensure that everyone already inside the app is required to complete
setup matching that policy.

Fixes https://github.com/vector-im/element-web/issues/14954
2020-08-19 16:23:27 +01:00
J. Ryan Stinnett
1932505d3b Enforce Secure Backup completion when requested by HS
This removes all buttons to escape the Secure Backup setup flow when the
matching `.well-known` setting is set by homeserver.

Part of https://github.com/vector-im/element-web/issues/14954
2020-08-19 16:23:27 +01:00
J. Ryan Stinnett
2b0865e89c Move E2EE well-known access to utils 2020-08-19 16:23:27 +01:00
Bruno Windels
5d98805d77 Merge branch 'develop' into bwindels/make-reply-not-overlay 2020-08-18 13:39:06 +02:00
Michael Telatynski
0da31de5ad
Merge pull request #5086 from matrix-org/t3chguy/notifications12
Create Map comparison utilities and convert Hooks to Typescript
2020-08-05 16:28:52 +01:00
Michael Telatynski
6220f50360 delint 2020-08-05 09:28:02 +01:00
Michael Telatynski
cd29edb442 Write more typescript defs 2020-08-05 09:13:01 +01:00
Michael Telatynski
f5d75bc078 fix comments 2020-08-04 22:03:30 +01:00
Michael Telatynski
93b4ea5be4 Create Maps utility comparison functions 2020-08-04 21:57:37 +01:00
J. Ryan Stinnett
ce226ab534 Replace Riot with Element in docs and comments
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.

Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Travis Ralston
16ebcf70c9 Clean up documentation of Whenable 2020-07-31 09:41:19 -06:00
Bruno Windels
d24ddc415b Notify the timeline it's height has changed, so it can keep being at the bottom
this way new messages will appear in the timeline without needing to scroll
2020-07-31 14:02:40 +02:00
J. Ryan Stinnett
af49639bd8
Merge pull request #5065 from matrix-org/travis/echo/audit
Add local echo for notifications in the new room list
2020-07-31 12:20:20 +01:00
Travis Ralston
5b15d12865 Ensure list visibility changes get counted as list changes
Fixes https://github.com/vector-im/riot-web/issues/14799

We were checking to see if the tags were visible at render time, but we needed to ensure that they were(n't) included when checking for diffs. This introduces a new kind of object cloning for semantic reasons.

This also fixes the selection indicator being a bit off on custom tags.
2020-07-30 14:18:54 -06:00
Travis Ralston
e953bfbf88 Replace flawed objectHasValueChange usage with objectHasDiff
Fixes https://github.com/vector-im/riot-web/issues/14782

We need to check if the keys changed, not just the values.
2020-07-30 14:08:18 -06:00
Travis Ralston
8f1af4be14 Add local echo capabilities for rooms
The structure here might need some documentation and work, but overall the idea is that all calls pass through a CachedEcho instance, which are self-updating.
2020-07-29 16:53:26 -06:00
Travis Ralston
1573c88b47
Update src/utils/arrays.ts
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-28 06:37:19 -06:00
Travis Ralston
b91026fa89 Ensure CustomRoomTagStore doesn't fire useless updates
This could in theory cause double rendering of the room list under some conditions.
2020-07-27 17:18:01 -06:00
Travis Ralston
5f034ee4ed Ensure arrayHasDiff returns a boolean
This is just maintenance noticed while debugging.
2020-07-27 17:17:27 -06:00
Travis Ralston
4d7980eb07 Ensure references to the room list store are broken for diffing
See commit diff for details.
2020-07-24 10:38:04 -06:00
Travis Ralston
9969b01c5f Only render sublists when they change significantly
We can ignore off-screen updates, so do that. See diff for more details on what we're doing.
2020-07-23 22:13:32 -06:00
Travis Ralston
7b97c3032b Make the sublists aware of their own list changes
This cuts the render time in half (from ~448ms to ~200ms on my account) per received event, as we're no longer re-mounting the entire room list and instead just the section(s) we care about.
2020-07-23 21:36:43 -06:00
Jorik Schellekens
501e0c29ca Merge remote-tracking branch 'origin' into joriks/eslint-config 2020-07-21 15:32:50 +01:00
Travis Ralston
a0b2859436 Support custom tags in the room list again
Fixes https://github.com/vector-im/riot-web/issues/14091

Design needs work, however this is behind labs anyways. This re-implements the behaviour of the old room list.

The implementation ended up being a lot easier due to early confusion with what the TagOrderStore and TagPanel take care of. Turns out they don't deal with tags, but groups. As such, we don't need to do anything with filtering (though we keep some sanity checks in place for safety), and just have to wire up the CustomRoomTagPanel and CustomRoomTagStore.
2020-07-20 16:51:16 -06:00
Jorik Schellekens
b3fa855bd8 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into joriks/eslint-config 2020-07-20 16:22:32 +01:00
Bruno Windels
4fe4788c2e Merge branch 'develop' into element 2020-07-14 14:31:31 +02:00
Travis Ralston
4a8a59c578 Make EffectiveMembership utils generic
Fixes https://github.com/vector-im/riot-web/issues/14460

Just have to move them to utils.
2020-07-13 20:29:46 -06:00
J. Ryan Stinnett
c77b312fd3 Merge branch 'jryans/rename-strings' into 'element'
Update brand name using variable in all strings

See merge request new-vector/element/element-web/matrix-react-sdk!3
2020-07-13 12:23:28 +00:00
Michael Telatynski
c3789245b8 Be consistent with the at-room pill avatar configurability
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-12 19:25:43 +01:00
Travis Ralston
0e49c4343c Internalize algorithm updates in the new room list store
Fixes https://github.com/vector-im/riot-web/issues/14411

The act of setting/changing the algorithm was causing the update function to be marked, meaning we wouldn't trigger an update until something else happened later. To get around this, and still support internal functions spamming calls without multiple updates, we simply move the guts to an internalized function and make the public interface do a trigger.
2020-07-10 21:59:12 -06:00
J. Ryan Stinnett
9085627a28 Use brand name from config in all strings 2020-07-10 19:57:01 +01:00
Travis Ralston
46d53e5c8c Reset before trigger just in case the function triggers too 2020-07-10 08:14:33 -06:00
Travis Ralston
1315f34662 Dedupe room list store updates by marking for updates
The core of this is in the MarkedExecution class, with the remainder of the commit ensuring that the right marks and triggers are in place to do the firing.

Because everything is async/await and run through the RoomListStore, we don't have to worry about self-fed updates in the algorithm classes. This also means we have to trigger pretty much all the time. 

Changes to tag ordering / list sorting get hit through two paths, so we mark before we do a bulk update and otherwise assume the call is coming in from outside.
2020-07-09 14:53:14 -06:00
Michael Telatynski
97711032d8 Fix signature of sleep utility
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-02 22:38:21 +01:00
Jorik Schellekens
b110639c76 Merge remote-tracking branch 'origin' into joriks/eslint-config 2020-06-29 16:49:33 +01:00
Jorik Schellekens
7699aafcaf Use new eslint package- fix lint issues in ts and js 2020-06-23 17:01:19 +01:00
Travis Ralston
26317b6826
Merge pull request #4803 from matrix-org/travis/room-list/setting-diff
Only fire setting changes for changed settings
2020-06-22 14:16:24 -06:00
Travis Ralston
1fe3e33dbf Factor out cloning to a util and use it everywhere 2020-06-22 14:14:43 -06:00
Travis Ralston
1a427b8ff7 Fix sticky headers over/under extending themselves in the new room list
Fixes https://github.com/vector-im/riot-web/issues/14095
2020-06-22 13:09:42 -06:00
J. Ryan Stinnett
37442b92ae Update read receipt remainder for internal font size change
In https://github.com/matrix-org/matrix-react-sdk/pull/4725, we changed the
internal font size from 15 to 10, but the `toRem` function (currently only used
for read receipts remainders curiously) was not updated. This updates the
function, which restores the remainders.

Fixes https://github.com/vector-im/riot-web/issues/14127
2020-06-22 19:02:03 +01:00
Travis Ralston
099661c2aa Only fire setting changes for changed settings
Previously we were firing updates for everything, which is bad. This has an effect of causing the room list to update itself every time the user goes to toggle some account settings.
2020-06-22 10:18:38 -06:00
Jorik Schellekens
05d0309081 Lint a few semicolons 2020-06-18 14:32:43 +01:00
Travis Ralston
e4a51a7c01 Add presence icons; Convert to generic icon component
For https://github.com/vector-im/riot-web/issues/14039
2020-06-16 14:44:37 -06:00
Travis Ralston
eefc40e0f8 Use IDestroyable instead of IDisposable
For consistency within our project
2020-06-09 08:08:47 -06:00
Travis Ralston
d9bd3cfc38
Merge pull request #4732 from matrix-org/travis/badge-ts
Convert FormattingUtils to TypeScript and add badge utility function
2020-06-09 08:01:19 -06:00
Travis Ralston
8faa0936c9 98 -> 99+ 2020-06-09 08:01:03 -06:00
Travis Ralston
1f82396ec5 Remove unused type 2020-06-08 21:40:25 -06:00
Travis Ralston
3fcd5505b3 Support prioritized room list filters
This is to fix an issue where when using both the community filter panel and the search box it's an AND rather than further refining the results.

This makes the search box further refine the community filter panel results.
2020-06-08 21:38:56 -06:00
Travis Ralston
21c8611300 Convert FormattingUtils to TypeScript and add badge utility function
The new function is to be used in the new room list.
2020-06-08 12:14:32 -06:00
Travis Ralston
e4aeabe5a6
Merge pull request #4444 from pv/jitsi-popout-immediate-join
Ensure active Jitsi conference is closed on widget pop-out
2020-06-07 20:22:39 -06:00
Travis Ralston
bc2fbefb5c Remove iteratorToArray 2020-06-03 11:29:06 -06:00
Travis Ralston
73a8e77d32 Add initial filtering support to new room list
For https://github.com/vector-im/riot-web/issues/13635

This is an incomplete implementation and is mostly dumped in this state for review purposes. The remainder of the features/bugs are expected to be in more bite-sized chunks.

This exposes the RoomListStore on the window for easy access to things like the new filter functions (used in debugging).

This also adds initial handling of "new rooms" to the client, though the support is poor.

Known bugs:
* [ ] Regenerates the entire room list when a new room is seen.
* [ ] Doesn't handle 2+ filters at the same time very well (see gif. will need a priority/ordering of some sort).
* [ ] Doesn't handle room order changes within a tag yet, despite the docs implying it does.
2020-06-01 16:49:22 -06:00
Michael Telatynski
efd0da44a1 Give contextual feedback for manual update check instead of banner
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-29 18:24:45 +01:00
Travis Ralston
a9c54153ee Update badge counts in new room list as needed 2020-05-26 14:16:33 -06:00
Michael Telatynski
fe03d02cf6 Fix reacting to redactions
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-23 08:43:15 +01:00
Jorik Schellekens
6d9d4ee547 Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into joriks/font-scaling-slider 2020-05-20 13:46:17 +01:00
Travis Ralston
9aff2e836e
Merge pull request #4593 from matrix-org/travis/dispatcher-types
Convert the dispatcher to TypeScript
2020-05-18 23:22:32 -06:00
Travis Ralston
798e7a1f86 Merge branch 'develop' into travis/dispatcher-types 2020-05-15 09:56:02 -06:00
Michael Telatynski
eb6796bd0e Migrate PasswordScorer to TypeScript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-14 19:53:09 +01:00
Michael Telatynski
e241da3af0 Fix diff wrong route offsets because of skipping a node insert
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-14 15:35:38 +01:00
Travis Ralston
90a898d03f Move dispatcher into a subdirectory
We're expecting to have a whole bunch of types for the dispatched payloads, so pull the thing into a directory we can throw them in.
2020-05-13 21:07:50 -06:00
Jorik Schellekens
fc6e5227ac FIx roomsublist heights.
- also fiddles the font size numbers
2020-05-13 22:24:22 +01:00
Jorik Schellekens
33a5b5142d Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into joriks/font-scaling-slider 2020-05-07 18:01:20 +01:00
Michael Telatynski
9c916cc544 Merge branches 'develop' and 't3chguy/app_load4' of github.com:matrix-org/matrix-react-sdk into t3chguy/app_load4
 Conflicts:
	src/components/structures/MatrixChat.tsx
2020-04-30 17:41:14 +01:00
David Baker
719faed2ff Separate toasts for existing & new device verification
Separate device verification toasts into ones for devices that were
there when the app loaded and a separate toast for each device that
has appeared since.

Reverts part of https://github.com/matrix-org/matrix-react-sdk/pull/4506
(clicking a device from your own UserInfo now triggers the legacy
verification flow again).

Fixes https://github.com/vector-im/riot-web/issues/13422
Fixes https://github.com/vector-im/riot-web/issues/13418
2020-04-28 18:35:16 +01:00
Jorik Schellekens
1b83faaa8d Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into joriks/font-scaling-slider 2020-04-28 15:38:46 +01:00
Jorik Schellekens
1289367a6b Fix indentation 2020-04-28 14:31:49 +01:00
Jorik Schellekens
fe326b9f08 Enfore function name capitalisation 2020-04-28 14:31:49 +01:00
Jorik Schellekens
0fe0d728f1 lint 2020-04-27 11:51:55 +01:00
Jorik Schellekens
3f56ed393d Use a function to convert to rem. 2020-04-27 11:51:54 +01:00
Travis Ralston
35dd892dce
Merge pull request #4458 from matrix-org/travis/fix-sticker-picker-add
Use WidgetType more often to avoid breaking new sticker pickers
2020-04-23 08:18:12 -06:00
Jorik Schellekens
5caec2a289 lint 2020-04-23 10:45:47 +01:00
Jorik Schellekens
05d11fea69 Use a function to convert to rem. 2020-04-23 10:45:46 +01:00
Pauli Virtanen
352ea29d17 Implement widget ReceiveTerminate capability
Signed-off-by: Pauli Virtanen <pav@iki.fi>
2020-04-22 19:37:52 +03:00
Michael Telatynski
01abb61e9a C
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-22 13:08:33 +01:00
Michael Telatynski
d915e613dc Convert promise utility module to tyepscript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-22 12:27:39 +01:00
Travis Ralston
3a360b91b9 Update logging for unmanaged widgets, and add TODO comments for other areas
Just a minor thing that is bothersome. Renaming classes and functions is a bit more of an impact than is worth right now, so have settled for littering TODO comments all over the place.
2020-04-22 00:34:08 -06:00
Travis Ralston
f54e99c708 Use WidgetType more often to avoid breaking new sticker pickers
Turns out that setUserWidget() wasn't updated to take a real WidgetType, but the code in ScalarMessaging thought it did. This leads to integration managers trying to add sticker widgets with an object `type` rather than a string `type`, which doesn't work.

This updates other code paths which call into the various widget classes to use WidgetType more often. The actual code path for fixing widgets is resolved in WidgetUtils for the setUserWidget function body.
2020-04-21 16:01:10 -06:00
Travis Ralston
d8a5ba9b14 Merge branch 'develop' into travis/moar-jitsi 2020-04-20 09:21:48 -06:00
Michael Telatynski
a37ecbbb34
update console.error 2020-04-15 19:24:33 +01:00
Michael Telatynski
89bc3bdd5b consolidate and extract copyPlaintext, copyNode and selectText
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-15 00:16:11 +01:00
Travis Ralston
4fe16b1b84
Merge branch 'develop' into travis/moar-jitsi 2020-04-14 12:57:28 -06:00
Michael Telatynski
af4ef38a41 remove dependency on qs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-13 21:28:23 +01:00
Michael Telatynski
466ecf191a move urlSearchParamsToObject and global.d.ts to react-sdk
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-13 21:23:40 +01:00
Travis Ralston
b4b0c4c6df Add comments to highlight where we'll need m.widget support
For https://github.com/vector-im/riot-web/issues/13111
2020-04-09 15:14:07 -06:00
Travis Ralston
dc92f557fd Support m.jitsi-typed widgets as Jitsi widgets
Fixes https://github.com/vector-im/riot-web/issues/9268
2020-04-09 15:11:57 -06:00
Michael Telatynski
24a5d8355f
Merge pull request #4288 from matrix-org/t3chguy/react_stickers
Deem m.sticker events as actionable for reacting
2020-04-07 17:10:42 +01:00
David Baker
a76b089cf3
Merge pull request #4319 from matrix-org/dbkr/jitsi_fix_popout
Fix popout support for jitsi widgets
2020-04-01 11:57:25 +01:00
David Baker
072d9f12c7 Remove unintentional changes 2020-04-01 11:41:32 +01:00
David Baker
274eb75c38 Remove get-config API
which is no longer necessary now the jitsi wrapper has its own
external-api script
2020-04-01 10:40:03 +01:00
David Baker
538147f7fa Better support for widgets overriding their URLs
Move the URL processing into AppTile so that the widget can have a
URL used for embedding in the page and a separate one for popping
out into a browser.
2020-04-01 10:00:33 +01:00
J. Ryan Stinnett
a3555cacea Merge remote-tracking branch 'origin/develop' into jryans/id-change-red 2020-03-30 14:52:22 +01:00
Zoe
098df07c67 review feedback 2020-03-30 10:18:47 +01:00
J. Ryan Stinnett
37619dd127 Show red shield for users that become unverified
For any users that we previously verified but that are not unverified, we will
now mark them and rooms they are in with a red shield.

Fixes https://github.com/vector-im/riot-web/issues/12808
2020-03-28 00:21:18 +00:00
Zoe
1f0d7923d7 with output type 2020-03-27 13:51:30 +00:00
Zoe
5b7e7f49d1 lint 2020-03-27 13:50:03 +00:00
Zoe
5d7adef0a2 Factor out shield display rules into one file 2020-03-27 13:45:35 +00:00
Michael Telatynski
b489a7c0d5 Allow reacting to stickers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-27 00:50:41 +00:00
Bruno Windels
0fb96fda6e
Merge pull request #4272 from matrix-org/bwindels/safaripersisted
Fall back to non-standard persisted api for Safari
2020-03-25 17:56:47 +00:00
Bruno Windels
0097134ade
Update src/utils/StorageManager.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2020-03-25 17:56:35 +00:00
Bruno Windels
f6e9c32c48 fall back to non-standard persisted api for Safari 2020-03-25 12:04:09 +01:00
Travis Ralston
bdcb65de77 Support and send the config over to capable widgets
For https://github.com/vector-im/riot-web/pull/12845
2020-03-24 09:55:54 -06:00
Travis Ralston
f7bf0d013c Support sending and receiving v1 Jitsi widgets
Fixes https://github.com/vector-im/riot-web/issues/12816
Fixes https://github.com/vector-im/riot-web/issues/12814
2020-03-23 10:18:30 -06:00
Travis Ralston
b8ef736038
Merge pull request #4251 from matrix-org/travis/jitsi-name
Improve naming of Jitsi conferences
2020-03-23 09:55:02 -06:00
Michael Telatynski
8822bb06f1
Update WidgetUtils.js 2020-03-22 02:14:50 +00:00
Travis Ralston
c17c47d88b
Remove null check that was fixed in another PR
See https://github.com/matrix-org/matrix-react-sdk/pull/4255
2020-03-21 11:35:07 -06:00
Michael Telatynski
506927ad8a change to defaults
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-21 10:49:55 +00:00
Michael Telatynski
ca02ff493c Fix local jitsi build url fail and missing argument
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-21 10:42:07 +00:00
Travis Ralston
94d23c815a Improve naming of Jitsi conferences
Fixes https://github.com/vector-im/riot-web/issues/12812
2020-03-20 14:19:47 -06:00
Travis Ralston
92251316a3 Switch to named object 2020-03-19 11:51:01 -06:00
Travis Ralston
8519a83b61 Appease the linter 2020-03-18 15:58:57 -06:00
Travis Ralston
9da57817d1 Use a local wrapper for Jitsi calls
Requires https://github.com/vector-im/riot-web/pull/12780
2020-03-18 15:50:12 -06:00
Travis Ralston
7dd7417f12 Enable support for TypeScript in components
Includes: compilation, translations, IDE support (use .tsx not .ts), typings, and other build tools.

TypeScript component have to import PropTypes and React with `import * as React from 'react';`
2020-03-11 18:03:43 -06:00
Travis Ralston
e4d323d2f2 Disable edits on redacted events
Fixes https://github.com/vector-im/riot-web/issues/12633
2020-03-06 14:23:20 -07:00
Travis Ralston
9836a7a655
Merge pull request #4176 from matrix-org/travis/linkify-rooms
Fix room alias references in topics
2020-03-04 15:35:34 -07:00
Travis Ralston
4a976acb84 Add a null check to getUniqueRoomsWithIndividuals
Fixes https://github.com/vector-im/riot-web/issues/12611
2020-03-04 14:18:56 -07:00
Travis Ralston
d820356990 Convert alias links in room header topics to local permalinks
Fixes https://github.com/vector-im/riot-web/issues/12605
2020-03-04 13:56:58 -07:00
Michael Telatynski
d783ce86c8 Use noreferrer in addition to noopener for edge case browsers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-23 22:14:29 +00:00
Matthew Hodgson
7696f704b2 Fix two big DOM leaks which were locking Chrome solid.
pillifyLinks leaked Pill components, which if they contained a BaseAvatar
would leak a whole DOM tree retained by the BaseAvatar's onClientSync
event listener.  This tracks the Pill containers so they can be unmounted
via unmountPills.

BasicMessageComposer set an event listener on selectionchange in onFocus
which leaked if onBlur wasn't called.  This removes it in unmount.

We've also seen Velociraptor retaining full DOM trees from RRs, which
this doesn't address as the leak is probably within Velocity, and the plan
is to replace it with CSS animations.

Should fix https://github.com/vector-im/riot-web/issues/12417
2020-02-22 23:51:30 +00:00
Michael Telatynski
ffde11ca91 Use Persistent Storage where possible
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-20 00:38:08 +00:00
Travis Ralston
330b489fd5 Switch back to legacy decorators
Empirically the build is fine with these, but it is unfortunate that we have to reply on deprecated semantics. TypeScript should help fix this.
2020-01-28 16:44:30 +00:00
Travis Ralston
d0c28adfb1 Appease the linter 2020-01-28 12:53:37 +00:00
Travis Ralston
21405b8f25 Fix skinning and babel tagets 2020-01-28 12:47:38 +00:00
Damir Jelić
e2dd2bd950 Merge branch 'poljar/seshat-ui-pr' into develop 2020-01-27 17:18:17 +01:00
Damir Jelić
2d8477aaa6 FormattingUtils: Add a formatCountLong method. 2020-01-24 16:13:55 +01:00
Bruno Windels
66768416a6 dont assume the room exist ... not sure why though 2020-01-24 14:20:48 +01:00
Bruno Windels
2483337e89 don't use removed .event property anymore on verification request 2020-01-24 11:59:01 +01:00
Bruno Windels
95a0ebaf06
Merge pull request #3796 from matrix-org/bwindels/verification-right-panel
Initial support for verification in right panel
2020-01-20 17:18:32 +00:00
Michael Telatynski
c97de43f69 Remove unused fetch polyfills, querystring, require-json. Move glob to dev-dep
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-18 02:01:45 +00:00
Bruno Windels
5556cb5749 Merge branch 'develop' into bwindels/verification-right-panel 2020-01-17 16:02:51 +01:00
Damir Jelić
2fe3603737 utils: Add an utility function to format bytes. 2020-01-17 14:22:22 +01:00
Travis Ralston
372861c9df Merge branch 'develop' into travis/ftue/user-lists/5.3-go-button 2020-01-16 13:36:59 -07:00
Travis Ralston
d1fcef1211 Merge branch 'develop' into bwindels/verification-right-panel 2020-01-16 13:23:32 -07:00
Travis Ralston
d763d7e633 Merge branch 'develop' into travis/ftue/user-lists/5.2-i18n 2020-01-15 10:49:38 -07:00
Travis Ralston
443744733d Move DM creation logic into DMInviteDialog
Fixes https://github.com/vector-im/riot-web/issues/11645

The copy hasn't been reviewed by anyone and could probably use some work.
2020-01-14 23:32:00 -07:00
Travis Ralston
b69b284efa Humanize the recent DM rooms ourselves for translations 2020-01-13 21:20:01 -07:00
Travis Ralston
a8c8406ac4 Merge remote-tracking branch 'origin/t3chguy/jest' into travis/sourcemaps 2020-01-09 16:06:46 -07:00
Travis Ralston
135c84251c Fix more imports post-merge 2020-01-09 14:19:19 -07:00
Travis Ralston
fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Michael Telatynski
c551f2983a Add TextualBody-test.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 13:28:29 +00:00
Bruno Windels
3b9c5c0a27 remove unused code 2020-01-03 13:50:13 +01:00
Bruno Windels
d8a38e6b74 WIP 2020-01-03 13:42:17 +01:00
Travis Ralston
4de0f7257a Initial implementation of FTUE user lists design
This covers the "recents" section and rough design exclusively. It is known that the Field does nothing and that there's a bunch of missing functionality - this is to be iterated upon in future PRs. Labs flag is to aide development and should be removed in a very near future PR.

Also, this is focusing on DMs and not user lists in general because I misinterpreted the scope. I'll fix this in a future PR and instead make this the best DM invite dialog it can be.

Closes https://github.com/vector-im/riot-web/issues/11197
2020-01-02 17:40:18 -07:00
Travis Ralston
f1ac3d2f64 Convert imports to ES6 from CommonJS
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
2019-12-22 21:16:06 -07:00
Travis Ralston
042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston
806d728d59 Import from the js-sdk's src/ directory
Because ES6 and such.
2019-12-22 21:14:33 -07:00
Travis Ralston
be4eeb5e07 Fix js-sdk imports for new module 2019-12-22 21:10:26 -07:00