element-web/src/utils
Timo a370a5cfa4
Refactor element call lobby + skip lobby (#12057)
* Refactor ElementCall to use the widget lobby.
 - expose skip lobby
 - use the widget.data to build the widget url

Signed-off-by: Timo K <toger5@hotmail.de>

* Use shiftKey click to skip the lobby

Signed-off-by: Timo K <toger5@hotmail.de>

* remove Lobby component

Signed-off-by: Timo K <toger5@hotmail.de>

* update tests + remove EW lobby related tests

Signed-off-by: Timo K <toger5@hotmail.de>

* remove lobby device button tests

Signed-off-by: Timo K <toger5@hotmail.de>

* i18n

Signed-off-by: Timo K <toger5@hotmail.de>

* use voip participant label

Signed-off-by: Timo K <toger5@hotmail.de>

* update tests
Signed-off-by: Timo K <toger5@hotmail.de>

* fix rounded corners in pip

Signed-off-by: Timo K <toger5@hotmail.de>

* allow joining call in legacy room header (without banner)

Signed-off-by: Timo K <toger5@hotmail.de>

* Introduce new connection states for calls.
And use them for integrated lobby.

Signed-off-by: Timo K <toger5@hotmail.de>

* New room header call join
Fix broken top container element call.

Signed-off-by: Timo K <toger5@hotmail.de>

* i18n

Signed-off-by: Timo K <toger5@hotmail.de>

* Fix closing element call in lobby view.
(should destroy call if there the user never managed to connect (not clicked join in lobby)

Signed-off-by: Timo K <toger5@hotmail.de>

* all cases for connection state

Signed-off-by: Timo K <toger5@hotmail.de>

* add correct LiveContentSummary labels

Signed-off-by: Timo K <toger5@hotmail.de>

* Theme widget loading (no rounded corner)
destroy call when switching room while a call is loading.

Signed-off-by: Timo K <toger5@hotmail.de>

* temp

Signed-off-by: Timo K <toger5@hotmail.de>

* usei view room dispatcher instead of emitter

Signed-off-by: Timo K <toger5@hotmail.de>

* tidy up

Signed-off-by: Timo K <toger5@hotmail.de>

* returnToLobby + remove StartCallView

Signed-off-by: Timo K <toger5@hotmail.de>

* comment cleanup

Signed-off-by: Timo K <toger5@hotmail.de>

* disconnect ongoing calls before making widget sticky.

Signed-off-by: Timo K <toger5@hotmail.de>

* linter + jitsi as videoChannel

Signed-off-by: Timo K <toger5@hotmail.de>

* stickyPromise type

Signed-off-by: Timo K <toger5@hotmail.de>

* fix legacy call (jistsi, cisco, bbb) reopen
when clicking call button

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests and connect resolves

Signed-off-by: Timo K <toger5@hotmail.de>

* fix "waits for messaging when connecting" test

Signed-off-by: Timo K <toger5@hotmail.de>

* Allow to skip awaiting Call session events.
This option is used in tests to spare mocking the
events emitted when EC updates the room state

Signed-off-by: Timo K <toger5@hotmail.de>

* add sticky test

Signed-off-by: Timo K <toger5@hotmail.de>

* add test for looby tile rendering

Signed-off-by: Timo K <toger5@hotmail.de>

* fix flaky test

Signed-off-by: Timo K <toger5@hotmail.de>

* add reconnect after disconnect test (video room)

Signed-off-by: Timo K <toger5@hotmail.de>

* add shift click test to call toast

Signed-off-by: Timo K <toger5@hotmail.de>

* test for allowVoipWithNoMedia in widget url

Signed-off-by: Timo K <toger5@hotmail.de>

* fix e2e tests to search for the right element

Signed-off-by: Timo K <toger5@hotmail.de>

* destroy call after test so next test does not fail

Signed-off-by: Timo K <toger5@hotmail.de>

* new call test (connection failed)

Signed-off-by: Timo K <toger5@hotmail.de>

* reset to real timers

Signed-off-by: Timo K <toger5@hotmail.de>

* dont use skipSessionAwait for tests

Signed-off-by: Timo K <toger5@hotmail.de>

* code quality (sonar)

Signed-off-by: Timo K <toger5@hotmail.de>

* refactor call.disconnect tests (dont use skipSessionAwait)

Signed-off-by: Timo K <toger5@hotmail.de>

* miscellaneous cleanup

Signed-off-by: Timo K <toger5@hotmail.de>

* only send call notify after the call has been joined (not when just opening the lobby)

Signed-off-by: Timo K <toger5@hotmail.de>

* update call notify tests to expect notify on connect.
Not on widget creation.

Signed-off-by: Timo K <toger5@hotmail.de>

* Update playwright/e2e/room/room-header.spec.ts

Co-authored-by: Robin <robin@robin.town>

* Update src/components/views/voip/CallView.tsx

Co-authored-by: Robin <robin@robin.town>

* review
rename connect -> start
isVideoRoom not dependant on feature flags
rename allOtherCallsDisconnected -> disconnectAllOtherCalls

Signed-off-by: Timo K <toger5@hotmail.de>

* check for EC widget

Signed-off-by: Timo K <toger5@hotmail.de>

* dep array

Signed-off-by: Timo K <toger5@hotmail.de>

* rename in spyOn

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-01-29 16:06:12 +00:00
..
beacon Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
crypto Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
device Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
dm Improve types (#11239) 2023-07-12 15:56:51 +01:00
event Migrate more strings to translation keys (#11499) 2023-09-01 08:26:48 +01:00
exportUtils Update dependency @vector-im/compound-web to v2 (#12133) 2024-01-11 19:56:36 +00:00
localRoom Conform more of the codebase to strictNullChecks (#10731) 2023-04-28 09:45:36 +01:00
location Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
media Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
oidc Fix OIDC bugs due to amnesiac stores forgetting OIDC issuer & other data (#12166) 2024-01-23 13:34:10 +00:00
permalinks Update dependency prettier to v3 (#12095) 2024-01-02 18:56:39 +00:00
pushRules Fix: sync intentional mentions push rules with legacy rules (#11667) 2023-09-27 00:03:38 +00:00
room Refactor element call lobby + skip lobby (#12057) 2024-01-29 16:06:12 +00:00
tokens Fix "not attempting encryption" warning (#11899) 2023-11-21 13:48:14 +00:00
validate Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AnimationUtils.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
arrays.ts shieldStatusForRoom: avoid deprecated MatrixClient methods (#10944) 2023-05-19 11:57:45 +01:00
AutoDiscoveryUtils.tsx Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
blobs.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
BrowserWorkarounds.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
colour.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
connection.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
createMatrixClient.ts Appease the linter 2023-11-13 19:54:04 +01:00
createVoiceMessageContent.ts Error handling if broadcast events could not be sent (#9885) 2023-01-17 07:57:59 +00:00
DecryptFile.ts Switch to importing more things from the main js-sdk export (#11376) 2023-08-09 15:10:54 +00:00
DialogOpener.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
direct-messages.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
DirectoryUtils.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
DMRoomMap.ts Update dependency prettier to v3 (#12095) 2024-01-02 18:56:39 +00:00
EditorStateTransfer.ts Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
enums.ts Add enum utility tests 2021-04-22 20:37:19 -06:00
ErrorUtils.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
EventRenderingUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
EventUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Feedback.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
FileDownloader.ts Conform src/components/views/messages/* code to strictNullChecks (#10461) 2023-03-29 08:22:35 +01:00
FileUtils.ts Update all non-major dependencies (#11383) 2023-09-07 17:40:51 +00:00
FixedRollingArray.ts Update dependency prettier to v3 (#12095) 2024-01-02 18:56:39 +00:00
FontManager.ts Update FontManager.ts (#11673) 2023-09-27 10:34:07 +00:00
FormattingUtils.ts Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
humanize.ts Migrate more strings to translation keys (#11512) 2023-09-04 10:20:34 +01:00
i18n-helpers.ts Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
IdentityServerUtils.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
IDestroyable.ts Use IDestroyable instead of IDisposable 2020-06-09 08:08:47 -06:00
image-media.ts Populate info.duration for audio & video file uploads (#11225) 2023-07-17 12:07:58 +00:00
Image.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
iterables.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
JSON.ts Fix view source and devtools showing hljs warnings (#7759) 2022-02-09 09:09:06 +00:00
KeyVerificationStateObserver.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
LazyValue.ts Improve quality of Typescript types (#10742) 2023-05-05 09:11:14 +01:00
leave-behaviour.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
local-room.ts Apply strictNullChecks to src/utils/local-room.ts (#10915) 2023-06-01 11:55:26 +00:00
login.ts Conform more code to strict null checking (#10167) 2023-02-16 17:21:44 +00:00
LruCache.ts Add UserProfilesStore, LruCache and cache for user permalink profiles (#10425) 2023-03-27 10:07:43 +02:00
maps.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
MarkedExecution.ts Update dependency prettier to v3 (#12095) 2024-01-02 18:56:39 +00:00
MatrixGlob.ts Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
MediaEventHelper.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
MegolmExportEncryption.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
membership.ts Show knock rooms in the list (#11573) 2023-09-19 11:24:35 +00:00
MessageDiffUtils.tsx Update definitelyTyped (#11620) 2023-10-17 18:17:09 +01:00
Mouse.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
MultiInviter.ts Fix unfederated invite dialog (#9618) 2023-10-25 10:08:10 +00:00
NativeEventUtils.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
notifications.ts Add notification dots to thread summary icons (#12146) 2024-01-25 16:53:41 +00:00
numbers.ts Fix seekbar position for zero length audio (#9949) 2023-01-23 17:28:31 +01:00
objects.ts Make existing and new issue URLs configurable (#10710) 2023-04-26 09:36:00 +00:00
pages.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
PasswordScorer.ts Switch from zxcvbn to @zxcvbn-ts (#11611) 2023-09-19 22:34:41 +01:00
pillify.tsx Update dependency @vector-im/compound-web to v2 (#12133) 2024-01-11 19:56:36 +00:00
PinningUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
PreferredRoomVersions.ts Allow creating knock rooms (#11182) 2023-07-10 08:01:03 +00:00
presence.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
promise.ts Conform more of the codebase to strictNullChecks (#11134) 2023-06-27 17:39:56 +01:00
ReactUtils.tsx Comply with noImplicitAny (#9940) 2023-02-13 11:39:16 +00:00
read-receipts.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Reply.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
ResizeNotifier.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
rooms.ts Don't setup keys on login when encryption is force disabled (#11125) 2023-06-27 09:42:31 +00:00
RoomUpgrade.ts Update all non-major dependencies (#12168) 2024-01-24 10:30:20 +00:00
SearchInput.ts Allows search to recognize full room links (#8275) 2023-05-09 07:55:50 +00:00
SessionLock.ts Also use unload event to clean up session lock (#11800) 2023-10-26 12:26:49 +00:00
sets.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
ShieldUtils.ts shieldStatusForRoom: guard against client shutdown (#11957) 2023-12-01 10:59:18 +00:00
Singleflight.ts Update dependency prettier to v3 (#12095) 2024-01-02 18:56:39 +00:00
SnakedObject.ts Avoid warning about config.json fallback keys more than once (#11307) 2023-07-24 07:36:51 +00:00
SortMembers.ts Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results (#11374) 2023-08-10 17:27:24 +00:00
space.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
StorageManager.ts Switch to importing more things from the main js-sdk export (#11394) 2023-08-14 08:58:55 +00:00
stringOrderField.ts Apply strictNullChecks to src/utils/*!exportUtils (#10455 2023-04-03 09:26:55 +01:00
strings.ts Switch from grapheme-splitter to graphemer (#11037) 2023-06-05 14:39:46 +00:00
threepids.ts Apply strictNullChecks to src/utils/*!exportUtils (#10455 2023-04-03 09:26:55 +01:00
Timer.ts Make more of the codebase conform to strict types (#10857) 2023-05-16 14:25:43 +01:00
tooltipify.tsx Update dependency @vector-im/compound-web to v2 (#12133) 2024-01-11 19:56:36 +00:00
units.ts Remove dead code (#9035) 2022-07-11 07:52:44 +02:00
UrlUtils.ts Handle all permitted url schemes in linkify (#11215) 2023-07-10 15:09:39 +00:00
UserInteractiveAuth.ts Switch to importing most things from the main matrix-js-sdk export (#11406) 2023-08-15 15:00:17 +00:00
useTooltip.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ValidatedServerConfig.ts Switch to importing most things from the main matrix-js-sdk export (#11406) 2023-08-15 15:00:17 +00:00
video-rooms.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
WellKnownUtils.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Whenable.ts Add @typescript-eslint/no-base-to-string (#10091) 2023-02-07 10:08:10 +00:00
WidgetUtils.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00