Commit Graph

40 Commits (bb0be4ba726ec4529e999319752705dc6a859d11)

Author SHA1 Message Date
Travis Ralston bb0be4ba72 Add customisation point for declaring widget variables
Fixes https://github.com/vector-im/element-web/issues/18035 (indirectly; issue is on a non-standard version of Element).

This has an isReady() step because the variable usage code path cannot be made async, so instead we let the async loading state happen in the prepare() stage. This is required for the intended usecase.
2021-07-22 15:43:18 -06:00
Travis Ralston c4b03064ae fix imports 2021-07-14 10:28:45 -06:00
Travis Ralston 5dc3d09dd8 Use new function name 2021-07-14 10:18:55 -06:00
Travis Ralston 9495ba001c Send clear events to widgets when permitted
Fixes https://github.com/vector-im/element-web/issues/17615
2021-07-13 23:17:17 -06:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Michael Telatynski 02e72d8b04 Fix more type definitions 2021-06-17 14:24:53 +01:00
Germain Souquet 0e221ae548 Start decryption process if needed 2021-05-18 16:24:38 +01:00
Travis Ralston f98eee318e Fill out fields for MSC2873 values
As required by https://github.com/matrix-org/matrix-widget-api/pull/36
2021-05-12 14:10:02 -06: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
Travis Ralston fc820c4b1a Construct modal widgets in the same way we do any other widget
Fixes https://github.com/vector-im/element-web/issues/15800
2020-11-25 18:51:27 -07: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 28c78509a1 Use the WidgetDriver to run OIDC requests
Fixes https://github.com/vector-im/element-web/issues/15775
2020-11-23 14:10:14 -07:00
Travis Ralston 107fa98180 Support arbitrary widgets sticking to the screen + sending stickers
Following https://github.com/matrix-org/matrix-react-sdk/pull/5385, it is now possible for a widget to request these capabilities without being a video conference or sticker picker. This commit actually enables this support for those kinds of widgets.

This commit also fixes an issue in the URL templating where some variables might get set to 'undefined' - this appears to be a scoping issue, so StopGapWidget now stores the definition alongside the superclass. 

Fixes https://github.com/vector-im/element-web/issues/15001
2020-11-20 16:53:15 -07:00
Travis Ralston 21663314ee Minor touchups to the dialog 2020-11-19 11:24:17 -07:00
Travis Ralston a212dab84c Developer design a permissions dialog 2020-11-17 20:38:59 -07:00
Travis Ralston 33b7367d82 Fix room ID handling 2020-11-12 10:36:30 -07:00
Travis Ralston f5cd079a16 Add support for sending/receiving events from widgets
Part of MSC2762: https://github.com/matrix-org/matrix-doc/pull/2762
Requires: https://github.com/matrix-org/matrix-widget-api/pull/9

This is the bare minimum required to send an event to a widget and receive events from widgets. Like the view_room action, this is controlled by a well-known permission key.

**Danger**: This allows widgets to potentially modify room state. Use the permissions with care.
2020-11-02 21:32:49 -07:00
Travis Ralston e15041bd53 Add a custom widget API action for viewing a different room 2020-11-02 15:21:18 -07:00
Michael Telatynski 997679e648 Fix Widget OpenID Permissions for realsies 2020-10-30 22:12:46 +00:00
Michael Telatynski bf124c4379 Fix regression with OpenID permissions on widgets 2020-10-30 21:13:01 +00:00
Michael Telatynski c3a355097d Initial Countly work 2020-10-29 15:57:16 +00:00
Michael Telatynski 17717e27c6 Fix theme variable passed to Jitsi 2020-10-27 11:26:16 +00:00
Michael Telatynski 0004dd4475 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/modal-widgets 2020-10-22 21:40:05 +01:00
Michael Telatynski b0acae6e77 fix remaining type mismatches
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 21:13:31 +01:00
Michael Telatynski 16362440b3 Iterate Modal Widgets
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 20:39:43 +01:00
J. Ryan Stinnett 7fe98b4e9d Adjust for new widget messaging APIs
As part of changing to the `events` package, the API surface changed slightly.

Related to https://github.com/vector-im/element-web/issues/15493
2020-10-19 16:42:20 +01:00
Michael Telatynski 81990d36b5 Fix Jitsi OpenIDC auth
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-19 10:49:07 +01:00
Travis Ralston 3a88b263c8 Don't supply popout widgets with widget parameters
Fixes https://github.com/vector-im/element-web/issues/15443
2020-10-14 13:54:27 -06:00
Travis Ralston f9ac390842 Appease the linter 2020-10-13 14:56:27 -06:00
Travis Ralston 294c35347c Ensure widgets are destroyed cleanly when minimized
Fixes https://github.com/vector-im/element-web/issues/15444 (an artifact of joining a call then minimizing the widget)

Also fixes other issues relating to widgets not loading when being minimized/maximized.
2020-10-13 14:55:44 -06:00
Travis Ralston 40038a6100 Run templating on the popout URL too
Fixes https://github.com/vector-im/element-web/issues/15443
2020-10-13 14:54:02 -06:00
Travis Ralston 1af8d96db9 Fix templating for v1 jitsi widgets
Fixes https://github.com/vector-im/element-web/issues/15427
2020-10-09 09:26:52 -06:00
Travis Ralston d38b544a42 Use new preparing event for widget communications
Fixes https://github.com/vector-im/element-web/issues/15404

We need to make sure we don't accidentally call the widget before its ready, but we can happily show it once it is loaded/prepared.
2020-10-08 15:35:22 -06:00
Michael Telatynski 67193b0ea7 Fix StopGapWidget infinitely recursing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-07 10:39:52 +01:00
Travis Ralston 2ec94e8a69 Appease the linter 2020-09-30 20:49:31 -06:00
Travis Ralston f27071ee64 Transition all remaining messaging over (delete the old stuff) 2020-09-30 20:20:31 -06:00
Travis Ralston b46f58274e Fix the hangup button and other custom actions 2020-09-30 20:09:23 -06:00
Travis Ralston b710d42832 Fix stickerpicker to use new messaging 2020-09-30 16:12:00 -06:00
Travis Ralston ca76ba5cf1 Fix widget persistence 2020-09-29 15:09:52 -06:00
Travis Ralston cd93b2c22a First rough cut of cutting AppTile over to the ClientWidgetApi 2020-09-29 14:14:51 -06:00