* 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>
* Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk
* Remove unit tests that rely on receipt timestamps
Previously, if we found a receipt for an unknown event, we would use the
receipt timestamp and declare all events before that time to be read.
Now, we ignore such "dangling" receipts until we find the event they
refer to.
This new behaviour is more correct, but does lead to more messages being
considered unread.
This commit deletes tests that checked for the old behaviour.
* Check for a missing thread in determineUnreadState
* Fix incorrect way to find room timeline
* More realistic test setup to support new receipt code
* Update snapshot to expect a room to be unread when there are no receipts
* Formatting fixes
* Update snapshot to show menu and notif button
* Disable some flaky tests
* Disable some flaky tests
* Fix test to make a threaded receipt for an event that is actually in the thread
---------
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* Update Jest to more recent release
I want to use things like `jest.advanceTimersByTimeAsync`
* more jest updates
* add dep on types/prettier
* fix LegacyRoomHeader-test
* fix MatrixChat-test
* fix RoomView-test
* fix PollHistory-test
* update SidebarUserSettingsTab-test
* fix PipContainer-test
* fix UserOnboardingPage-test
* fix WidgetContextMenu-test.tsx
* Avoid `mockImplementation` for mock `matchMedia` impl
`mockImplementation` is (now) reset by `jest.resetAllMocks` and
`jest.restoreAllMocks`, which we don't really want here.
Fixes `theme-test`
* Move `mediaDevices` mock out of `setupManualMocks`
This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.
In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.
* fix FormattingButtons-test.tsx
* fix DeviceListenerTest
* fix RoomTile-test
* Move `mediaDevices` mock out of `setupManualMocks`
This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.
In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.
* clarify ts-ignore
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Switch to importing models/room-state & models/room-member from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix bad merge
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix duplicated lint rule
* Use native js-sdk group call support
Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)
* Fix strings
* Fix strict type errors
* Update our cancel icon
The cancel icon we're using in the app has drifted out of sync with the ones used in our designs. We also had two identical-looking icons, so this consolidates them into one.
I've simultaneously updated our chevron icons, since in the case of the 'jump to unread' timeline button, it became clear that the weight of the new close icon did not match the thinner chevron.
* Don't squish bottom/top-aligned tooltips near the edge of the screen
* Close the timeline panel when returning to the fullscreen timeline view
* Add layout switching capabilities to ElementCall
* Bring the room header in line with the group call designs
* Bring the PiP header in line with the group call designs
* Fix lints
* Clarify tooltip CSS calculations
* Test PipView
* Expand RoomHeader test coverage
* Test PipView more
* Improve accessibility and testability of Tooltip
Adding a role to Tooltip was motivated by React Testing Library's
reliance on accessibility-related attributes to locate elements.
* Make the ReadyWatchingStore constructor safer
The ReadyWatchingStore constructor previously had a chance to
immediately call onReady, which was dangerous because it was potentially
calling the derived class's onReady at a point when the derived class
hadn't even finished construction yet. In normal usage, I guess this
never was a problem, but it was causing some of the tests I was writing
to crash. This is solved by separating out the onReady call into a start
method.
* Rename 1:1 call components to 'LegacyCall'
to reflect the fact that they're slated for removal, and to not clash
with the new Call code.
* Refactor VideoChannelStore into Call and CallStore
Call is an abstract class that currently only has a Jitsi
implementation, but this will make it easy to later add an Element Call
implementation.
* Remove WidgetReady, ClientReady, and ForceHangupCall hacks
These are no longer used by the new Jitsi call implementation, and can
be removed.
* yarn i18n
* Delete call map entries instead of inserting nulls
* Allow multiple active calls and consolidate call listeners
* Fix a race condition when creating a video room
* Un-hardcode the media device fallback labels
* Apply misc code review fixes
* yarn i18n
* Disconnect from calls more politely on logout
* Fix some strict mode errors
* Fix another updateRoom race condition
* Show a lobby screen in video rooms
* Add connecting state
* Test VideoRoomView
* Test VideoLobby
* Get the local video stream with useAsyncMemo
* Clean up code review nits
* Explicitly state what !important is overriding
* Use spacing variables
* Wait for video channel messaging
* Update join button copy
* Show frame on both the lobby and widget
* Force dark theme for video lobby
* Wait for the widget to be ready
* Make VideoChannelStore constructor private
* Allow video lobby to shrink
* Add invite button to video room header
* Show connected members on lobby screen
* Make avatars in video lobby clickable
* Increase video channel store timeout
* Fix Jitsi Meet getting wedged on startup in Chrome and Safari
* Revert "Fix Jitsi Meet getting wedged on startup in Chrome and Safari"
This reverts commit 9f77b8c227c1a5bffa5d91b0c48bf3bbc44d4cec.
* Disable device buttons while connecting
* Factor RoomFacePile into a separate file
* Fix i18n lint
* Fix switching video channels while connected
* Properly limit number of connected members in face pile
* Fix CSS lint
* Remove radio component
* "Voice room" → "video room"
* Remove interactivity from video room tiles
* Update connection state when joining via widget
* Simplify room header buttons for video rooms
* Split out video room creation into a separate menu option
* Simplify room options for video rooms
* Update video room tile layout
* Tell the Jitsi widget whether it's a video channel
* Update tests
* "Voice" → "video" in more places
* Fix tests
* Re-add frame to immersive Jitsi widgets
* Comment ack
* Make updateDevices more readable
* Type FacePile
* Add utility for getting connected voice participants
* Allow voice room members to send connected device state
* Update connected devices when connecting/disconnecting voice
* Show voice room participants in room tile when not connected
* Update voice room tests
* Add null types and guards
* Remove deprecated feature_communities_v2_prototypes
* Update _components
* i18n
* delint
* Cut out a bit more dead code
* Carve into legacy components
* Carve into mostly the room list code
* Carve into instances of "groupId"
* Carve out more of what comes up with "groups"
* Carve out some settings
* ignore related groups state
* Remove instances of spacesEnabled
* Fix some obvious issues
* Remove now-unused css
* Fix variable naming for legacy components
* Update i18n
* Misc cleanup from manual review
* Update snapshot for changed flag
* Appease linters
* rethemedex
* Remove now-unused AddressPickerDialog
* Make ConfirmUserActionDialog's member a required prop
* Remove useless override from RightPanelStore
* Remove extraneous CSS
* Update i18n
* Demo: "Communities are now Spaces" landing page
* Restore linkify for group IDs
* Demo: Dialog on click for communities->spaces notice
* i18n for demos
* i18n post-merge
* Update copy
* Appease the linter
* Post-merge cleanup
* Re-add spaces_learn_more_url to the new SdkConfig place
* Round 1 of post-merge fixes
* i18n
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Add voice room labs flag
Signed-off-by: Robin Townsend <robin@robin.town>
* Add more widget actions for interacting with Jitsi
Signed-off-by: Robin Townsend <robin@robin.town>
* Factor out a more generic Jitsi creation utility
Signed-off-by: Robin Townsend <robin@robin.town>
* Add utilities for managing voice channels
Signed-off-by: Robin Townsend <robin@robin.town>
* Enable creation of voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Force a maximized view of voice channel widgets
Signed-off-by: Robin Townsend <robin@robin.town>
* Add voice channel store
Signed-off-by: Robin Townsend <robin@robin.town>
* Factor out a more generic FacePile
Signed-off-by: Robin Townsend <robin@robin.town>
* Implement room tile changes for voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Add interactive radio component to the left panel
Signed-off-by: Robin Townsend <robin@robin.town>
* Test voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Update name of call room type
Signed-off-by: Robin Townsend <robin@robin.town>
* Clarify that voice rooms are under development
Signed-off-by: Robin Townsend <robin@robin.town>
* Use readonly
Signed-off-by: Robin Townsend <robin@robin.town>
* Move acks to the end of handlers
Signed-off-by: Robin Townsend <robin@robin.town>
* Add comment about avatar URLs coming from Jitsi
Signed-off-by: Robin Townsend <robin@robin.town>
* Don't use unicode ellipses
for translation reasons?
Signed-off-by: Robin Townsend <robin@robin.town>
* Fix tests
Signed-off-by: Robin Townsend <robin@robin.town>
* Fix tests, again
Signed-off-by: Robin Townsend <robin@robin.town>
* Remove unnecessary export
Signed-off-by: Robin Townsend <robin@robin.town>
* Ack Jitsi events when we wait for them
Signed-off-by: Robin Townsend <robin@robin.town>