Commit graph

929 commits

Author SHA1 Message Date
Michael Telatynski
7030c636f0 Initial Space Store for keeping track of space hierarchies from sync 2021-02-25 16:36:35 +00:00
Michael Telatynski
79daf615e4 First special treatment of space-rooms 2021-02-19 14:20:57 +00:00
Michael Telatynski
6b3f05a3cd Switch RoomListStore to only including the filtered subset
Without this it'd include notification counts from Community B when Community A is selected and such.
2021-02-19 14:10:36 +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
8fc244452c Prevent error being thrown so that we can throw our own better one 2021-02-18 18:06:26 +00:00
Travis Ralston
64974eb3ee
Merge pull request #5661 from matrix-org/travis/clear-preview
Clear message previews when the maximum limit is reached for history
2021-02-18 07:31:54 -07:00
Travis Ralston
47d73bef57 Clear message previews when the maximum limit is reached for history 2021-02-17 22:36:26 -07:00
David Baker
6130bdf0d2 Use creation content to signal virtual-ness
This makes things a lot simpler.
2021-02-17 18:51:21 +00:00
David Baker
e787d11c73 Merge remote-tracking branch 'origin/develop' into dbkr/virtual_rooms_v2 2021-02-16 19:41:54 +00:00
David Baker
79455d99b4 Unused import 2021-02-15 19:38:17 +00:00
David Baker
89b2dae035 Send onNewInvitedRoom via VisibilityProvider 2021-02-15 18:13:13 +00:00
David Baker
196507a730 VoIP virtual rooms, mk II
Does a thirdparty protocol lookup to the homeserver to get the
corresponding native/virtual user for a matrix ID. Stores the
mappings in room account data. Involves some slightly nasty workarounds
for that fact that room account data has no local echo.
2021-02-12 20:55:54 +00:00
Jason Robinson
6ccce7142c Merge branch 'develop' into jaywink/hosting-provider-iframe-minimize-wip 2021-02-03 22:35:22 +02:00
J. Ryan Stinnett
e4629878bc Lock widget room ID when added
This changes the widget room ID available to widget URL templates so that it's
locked to the room the widget was added in.

Fixes https://github.com/vector-im/element-web/issues/16337
2021-02-02 14:36:44 +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
Travis Ralston
d6dbe5596a
Merge pull request #5581 from matrix-org/travis/widgets/sticker-picker
Allow stickerpickers the legacy "visibility" capability
2021-01-28 07:46:17 -07:00
Travis Ralston
61f6fa0633
Merge pull request #5582 from matrix-org/travis/widgets/fix-jitsi-unpin
Remove check that prevents Jitsi widgets from being unpinned
2021-01-27 14:59:34 -07:00
Travis Ralston
c1b33d3e2c Fix Jitsi widgets causing localized tile crashes
Seems to be that as part of the layout work the timing sequence for when `.getRoom().widgets` will work changed. We can get around this with `initIfNeeded` which will no-op in the worst case.

This also includes a copy change to make ended conferences stop lying about where to find the widget. This is work towards https://github.com/vector-im/element-web/issues/15739
2021-01-27 14:40:04 -07:00
Travis Ralston
08b067fd68 Remove check that prevents Jitsi widgets from being unpinned
Later in the code we do a conditional on the widget type to auto-pin the widget, so we don't need this one to force the widget higher.

Fixes https://github.com/vector-im/element-web/issues/16280
2021-01-27 14:31:48 -07:00
Travis Ralston
edb363b751 Allow stickerpickers the legacy "visibility" capability
Fixes https://github.com/vector-im/element-web/issues/16237
2021-01-27 14:22:55 -07:00
J. Ryan Stinnett
84b1f2e6c6 Resolve typing errors after TypeScript upgrade 2021-01-27 12:42:37 +00:00
Travis Ralston
d3281db2bf Update widgets in the room upon join 2021-01-22 17:49:18 -07:00
David Baker
f703383ab6
Merge pull request #5560 from matrix-org/dbkr/voip_user_mapper
Add VoIP user mapper
2021-01-22 14:12:08 +00:00
Travis Ralston
f023fc50e2
Update src/stores/widgets/WidgetLayoutStore.ts
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
2021-01-21 13:22:44 -07:00
David Baker
0a90c982c7 Add VoIP user mapper
The accompanying element-web PR with the config documentation should
explain what this is & why. Internally, this breaks the assumption
that call.roomId is the room that the call appears in for the user.
call.roomId may now be a 'virtual' room while the react SDK actually
displays it in a different room. React SDK always stores the calls
under the user-facing rooms, and provides a function to get the
user-facing room for a given call.
2021-01-21 19:20:35 +00:00
Travis Ralston
29780d902c Try to reduce WidgetStore causing downstream problems 2021-01-20 14:44:30 -07:00
Travis Ralston
f8fe454c59 Replace looping resizer with actual math 2021-01-20 14:42:24 -07:00
Travis Ralston
ab51404421 Appease the tests? 2021-01-18 21:07:44 -07:00
Travis Ralston
6d770cb4d1 Appease the linter 2 2021-01-18 21:00:47 -07:00
Travis Ralston
6227d3c183 Appease the linters 2021-01-18 20:53:15 -07:00
Travis Ralston
04d1f5dd28 Implement a "Copy my layout to the room" button 2021-01-18 20:42:21 -07:00
Travis Ralston
5c393cc2d0 Add in some local echo support to make changes appear faster 2021-01-18 20:29:51 -07:00
Travis Ralston
7ff76b2500 Don't forget to run cleanup 2021-01-18 20:28:09 -07:00
Travis Ralston
1768d6ea5f Move all widget pinning logic to the WidgetLayoutStore 2021-01-18 20:26:47 -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
Travis Ralston
4ee29d4e63 Split out ready states of stores to its own store 2021-01-18 17:41:17 -07:00
Travis Ralston
83fb698bbc
Merge pull request #5527 from matrix-org/travis/widget-nav
Wire up MSC2931 widget navigation
2021-01-18 09:09:32 -07:00
J. Ryan Stinnett
8a341446aa Use room-specific listeners for community prototype
Similar to message previews, this changes another area to use room-specific
listeners for better performance and avoiding warnings.
2021-01-15 14:34:56 +00:00
J. Ryan Stinnett
729356394e Use room-specific listeners for message previews
This should be a bit faster (since we now only notify one tile instead of all
for each update). It also resolves the max listener warning.

Fixes https://github.com/vector-im/element-web/issues/15121
2021-01-15 14:21:21 +00:00
Jason Robinson
d6af5b3bbd WIP minimize 2021-01-14 12:20:42 +02:00
Jason Robinson
d4a58bdb2a WIP minimize 2021-01-14 11:53:20 +02:00
Travis Ralston
7e0cf5c783 Wire up MSC2931 widget navigation
Fixes https://github.com/vector-im/element-web/issues/16006
**Requires https://github.com/matrix-org/matrix-widget-api/pull/27**
2020-12-29 12:35:48 -07:00
Travis Ralston
b870de14ed
Merge pull request #5488 from matrix-org/travis/chat-effects-widgets
Run chat effects on events sent by widgets too
2020-12-11 21:52:24 -07:00
Travis Ralston
c80ccf6386 Remove unused import 2020-12-11 08:27:46 -07:00
Travis Ralston
b6123506d4 Run chat effects on events sent by widgets too 2020-12-10 21:00:37 -07:00
Travis Ralston
10930b8404 Fix being unable to pin widgets
Turns out that we were obliterating the entire store of widgets each time we loaded a widget, which is less than helpful. This commit fixes that.

This commit also improves the cleanup of the pinned event object to remove unpinned widgets, reducing accumulation over time.

Fixes https://github.com/vector-im/element-web/issues/15948
2020-12-10 20:57:20 -07:00
Travis Ralston
d38a6ad1be Add more widget sanity checking
This is for https://github.com/vector-im/element-web/issues/15705

https://github.com/matrix-org/matrix-react-sdk/pull/5459 was unable to track down all the instances of where the issue happens, so this commit tries to do a more complete job.

Specifically, this replaces the getRoomId() function given widgets cannot reliably be referenced by widget ID in this way, and the store has been updated to handle a more unique widget ID for the store (just in case).

Further sanity checking has also been added to ensure that we are at least returning a valid result.
2020-12-02 12:20:59 -07:00
Travis Ralston
5df6932051 Add various amounts of sanity checking for widget pinning
This should also help https://github.com/vector-im/element-web/issues/15705 by either implicitly fixing the problem, causing chaos as described in the issue, or by forcing a crash to identify the problem more easily.
2020-12-01 13:19:51 -07:00