Prepare for Element Call integration (#9224)

* 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
This commit is contained in:
Robin 2022-08-30 15:13:39 -04:00 committed by GitHub
parent 50f6986f6c
commit 0d6a550c33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 2573 additions and 2157 deletions

View file

@ -15,17 +15,17 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_IncomingCallToast {
.mx_IncomingLegacyCallToast {
display: flex;
flex-direction: row;
pointer-events: initial; /* restore pointer events so the user can accept/decline */
.mx_IncomingCallToast_content {
.mx_IncomingLegacyCallToast_content {
display: flex;
flex-direction: column;
margin-left: 8px;
.mx_CallEvent_caller {
.mx_LegacyCallEvent_caller {
font-weight: bold;
font-size: $font-15px;
line-height: $font-18px;
@ -40,7 +40,7 @@ limitations under the License.
max-width: 200px;
}
.mx_CallEvent_type {
.mx_LegacyCallEvent_type {
font-size: $font-12px;
line-height: $font-15px;
color: $tertiary-content;
@ -52,7 +52,7 @@ limitations under the License.
flex-direction: row;
align-items: center;
.mx_CallEvent_type_icon {
.mx_LegacyCallEvent_type_icon {
height: 16px;
width: 16px;
margin-right: 6px;
@ -69,28 +69,28 @@ limitations under the License.
}
}
&.mx_IncomingCallToast_content_voice {
.mx_CallEvent_type .mx_CallEvent_type_icon::before,
.mx_IncomingCallToast_buttons .mx_IncomingCallToast_button_accept span::before {
&.mx_IncomingLegacyCallToast_content_voice {
.mx_LegacyCallEvent_type .mx_LegacyCallEvent_type_icon::before,
.mx_IncomingLegacyCallToast_buttons .mx_IncomingLegacyCallToast_button_accept span::before {
mask-image: url('$(res)/img/element-icons/call/voice-call.svg');
}
}
&.mx_IncomingCallToast_content_video {
.mx_CallEvent_type .mx_CallEvent_type_icon::before,
.mx_IncomingCallToast_buttons .mx_IncomingCallToast_button_accept span::before {
&.mx_IncomingLegacyCallToast_content_video {
.mx_LegacyCallEvent_type .mx_LegacyCallEvent_type_icon::before,
.mx_IncomingLegacyCallToast_buttons .mx_IncomingLegacyCallToast_button_accept span::before {
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
}
}
.mx_IncomingCallToast_buttons {
.mx_IncomingLegacyCallToast_buttons {
margin-top: 8px;
display: flex;
flex-direction: row;
gap: 12px;
.mx_IncomingCallToast_button {
@mixin CallButton;
.mx_IncomingLegacyCallToast_button {
@mixin LegacyCallButton;
padding: 0px 8px;
flex-shrink: 0;
flex-grow: 1;
@ -100,13 +100,13 @@ limitations under the License.
padding: 8px 0;
}
&.mx_IncomingCallToast_button_accept span::before {
&.mx_IncomingLegacyCallToast_button_accept span::before {
mask-size: 13px;
width: 13px;
height: 13px;
}
&.mx_IncomingCallToast_button_decline span::before {
&.mx_IncomingLegacyCallToast_button_decline span::before {
mask-image: url('$(res)/img/element-icons/call/hangup.svg');
mask-size: 16px;
width: 16px;
@ -116,7 +116,7 @@ limitations under the License.
}
}
.mx_IncomingCallToast_iconButton {
.mx_IncomingLegacyCallToast_iconButton {
display: flex;
height: 20px;
width: 20px;
@ -133,11 +133,11 @@ limitations under the License.
}
}
.mx_IncomingCallToast_silence::before {
.mx_IncomingLegacyCallToast_silence::before {
mask-image: url('$(res)/img/voip/silence.svg');
}
.mx_IncomingCallToast_unSilence::before {
.mx_IncomingLegacyCallToast_unSilence::before {
mask-image: url('$(res)/img/voip/un-silence.svg');
}
}