Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8294d32

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix/call-view/18221
2 parents 3ef2017 + 3e7aee3 commit 8294d32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1595
-264
lines changed

res/css/structures/_SpaceRoomDirectory.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ limitations under the License.
190190
position: relative;
191191
padding: 8px 16px;
192192
border-radius: 8px;
193-
min-height: 56px;
194193
box-sizing: border-box;
195194

196195
display: grid;

res/css/views/messages/_CallEvent.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ limitations under the License.
4343
}
4444
}
4545

46+
&.mx_CallEvent_voice.mx_CallEvent_missed .mx_CallEvent_type_icon::before {
47+
mask-image: url('$(res)/img/voip/missed-voice.svg');
48+
}
49+
50+
&.mx_CallEvent_video.mx_CallEvent_missed .mx_CallEvent_type_icon::before {
51+
mask-image: url('$(res)/img/voip/missed-video.svg');
52+
}
53+
4654
.mx_CallEvent_info {
4755
display: flex;
4856
flex-direction: row;

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 84 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
*/
1616

1717
.mx_EventTile[data-layout=bubble],
18-
.mx_EventTile[data-layout=bubble] ~ .mx_EventListSummary {
18+
.mx_EventListSummary[data-layout=bubble] {
1919
--avatarSize: 32px;
2020
--gutterSize: 11px;
2121
--cornerRadius: 12px;
@@ -155,12 +155,20 @@ limitations under the License.
155155
.mx_EventTile_avatar {
156156
position: absolute;
157157
top: 0;
158+
line-height: 1;
159+
z-index: 9;
158160
img {
159161
box-shadow: 0 0 0 3px $eventbubble-avatar-outline;
160162
border-radius: 50%;
161163
}
162164
}
163165

166+
&.mx_EventTile_noSender {
167+
.mx_EventTile_avatar {
168+
top: -19px;
169+
}
170+
}
171+
164172
.mx_BaseAvatar,
165173
.mx_EventTile_avatar {
166174
line-height: 1;
@@ -216,90 +224,6 @@ limitations under the License.
216224
border-left-color: $eventbubble-reply-color;
217225
}
218226

219-
&.mx_EventTile_bubbleContainer,
220-
&.mx_EventTile_info,
221-
& ~ .mx_EventListSummary[data-expanded=false] {
222-
--backgroundColor: transparent;
223-
--gutterSize: 0;
224-
225-
display: flex;
226-
align-items: center;
227-
justify-content: center;
228-
padding: 5px 0;
229-
230-
.mx_EventTile_avatar {
231-
position: static;
232-
order: -1;
233-
margin-right: 5px;
234-
}
235-
}
236-
237-
& ~ .mx_EventListSummary {
238-
--maxWidth: 80%;
239-
margin-left: calc(var(--avatarSize) + var(--gutterSize));
240-
margin-right: calc(var(--gutterSize) + var(--avatarSize));
241-
.mx_EventListSummary_toggle {
242-
float: none;
243-
margin: 0;
244-
order: 9;
245-
margin-left: 5px;
246-
}
247-
.mx_EventListSummary_avatars {
248-
padding-top: 0;
249-
}
250-
251-
&::after {
252-
content: "";
253-
clear: both;
254-
}
255-
256-
.mx_EventTile {
257-
margin: 0 6px;
258-
}
259-
260-
.mx_EventTile_line {
261-
margin: 0 5px;
262-
> a {
263-
left: auto;
264-
right: 0;
265-
transform: translateX(calc(100% + 5px));
266-
}
267-
}
268-
269-
.mx_MessageActionBar {
270-
transform: translate3d(90%, 0, 0);
271-
}
272-
}
273-
274-
& ~ .mx_EventListSummary[data-expanded=false] {
275-
padding: 0 34px;
276-
}
277-
278-
/* events that do not require bubble layout */
279-
& ~ .mx_EventListSummary,
280-
&.mx_EventTile_bad {
281-
.mx_EventTile_line {
282-
background: transparent;
283-
}
284-
285-
&:hover {
286-
&::before {
287-
background: transparent;
288-
}
289-
}
290-
}
291-
292-
& + .mx_EventListSummary {
293-
.mx_EventTile {
294-
margin-top: 0;
295-
padding: 2px 0;
296-
}
297-
}
298-
299-
.mx_EventListSummary_toggle {
300-
margin-right: 55px;
301-
}
302-
303227
/* Special layout scenario for "Unable To Decrypt (UTD)" events */
304228
&.mx_EventTile_bad > .mx_EventTile_line {
305229
display: grid;
@@ -334,3 +258,78 @@ limitations under the License.
334258
max-width: 100%;
335259
}
336260
}
261+
262+
.mx_EventTile.mx_EventTile_bubbleContainer[data-layout=bubble],
263+
.mx_EventTile.mx_EventTile_info[data-layout=bubble],
264+
.mx_EventListSummary[data-layout=bubble][data-expanded=false] {
265+
--backgroundColor: transparent;
266+
--gutterSize: 0;
267+
268+
display: flex;
269+
align-items: center;
270+
justify-content: center;
271+
padding: 5px 0;
272+
273+
.mx_EventTile_avatar {
274+
position: static;
275+
order: -1;
276+
margin-right: 5px;
277+
}
278+
}
279+
280+
.mx_EventListSummary[data-layout=bubble] {
281+
--maxWidth: 80%;
282+
margin-left: calc(var(--avatarSize) + var(--gutterSize));
283+
margin-right: calc(var(--gutterSize) + var(--avatarSize));
284+
.mx_EventListSummary_toggle {
285+
float: none;
286+
margin: 0;
287+
order: 9;
288+
margin-left: 5px;
289+
margin-right: 55px;
290+
}
291+
.mx_EventListSummary_avatars {
292+
padding-top: 0;
293+
}
294+
295+
&::after {
296+
content: "";
297+
clear: both;
298+
}
299+
300+
.mx_EventTile {
301+
margin: 0 6px;
302+
padding: 2px 0;
303+
}
304+
305+
.mx_EventTile_line {
306+
margin: 0 5px;
307+
> a {
308+
left: auto;
309+
right: 0;
310+
transform: translateX(calc(100% + 5px));
311+
}
312+
}
313+
314+
.mx_MessageActionBar {
315+
transform: translate3d(90%, 0, 0);
316+
}
317+
}
318+
319+
.mx_EventListSummary[data-expanded=false][data-layout=bubble] {
320+
padding: 0 34px;
321+
}
322+
323+
/* events that do not require bubble layout */
324+
.mx_EventListSummary[data-layout=bubble],
325+
.mx_EventTile.mx_EventTile_bad[data-layout=bubble] {
326+
.mx_EventTile_line {
327+
background: transparent;
328+
}
329+
330+
&:hover {
331+
&::before {
332+
background: transparent;
333+
}
334+
}
335+
}

res/css/views/rooms/_EventTile.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $hover-select-border: 4px;
133133
}
134134

135135
&.mx_EventTile_info .mx_EventTile_line,
136-
& ~ .mx_EventListSummary .mx_EventTile_avatar ~ .mx_EventTile_line {
136+
& ~ .mx_EventListSummary > :not(.mx_EventTile) .mx_EventTile_avatar ~ .mx_EventTile_line {
137137
padding-left: calc($left-gutter + 18px);
138138
}
139139

@@ -573,6 +573,12 @@ $hover-select-border: 4px;
573573
color: $accent-color-alt;
574574
}
575575

576+
.mx_EventTile_content .markdown-body blockquote {
577+
border-left: 2px solid $blockquote-bar-color;
578+
border-radius: 2px;
579+
padding: 0 10px;
580+
}
581+
576582
.mx_EventTile_content .markdown-body .hljs {
577583
display: inline !important;
578584
}

res/css/views/rooms/_IRCLayout.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ $irc-line-height: $font-18px;
116116
.mx_EditMessageComposer_buttons {
117117
position: relative;
118118
}
119+
120+
.mx_ReactionsRow {
121+
padding-left: 0;
122+
padding-right: 0;
123+
}
119124
}
120125

121126
.mx_EventTile_emote {

res/css/views/rooms/_ReplyTile.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ limitations under the License.
6060
$reply-lines: 2;
6161
$line-height: $font-22px;
6262

63-
pointer-events: none;
64-
6563
text-overflow: ellipsis;
6664
display: -webkit-box;
6765
-webkit-box-orient: vertical;

res/img/voip/missed-video.svg

Lines changed: 3 additions & 0 deletions
Loading

res/img/voip/missed-voice.svg

Lines changed: 4 additions & 0 deletions
Loading

src/CallHandler.tsx

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -484,28 +484,18 @@ export default class CallHandler extends EventEmitter {
484484
break;
485485
case CallState.Ended:
486486
{
487-
Analytics.trackEvent('voip', 'callEnded', 'hangupReason', call.hangupReason);
487+
const hangupReason = call.hangupReason;
488+
Analytics.trackEvent('voip', 'callEnded', 'hangupReason', hangupReason);
488489
this.removeCallForRoom(mappedRoomId);
489-
if (oldState === CallState.InviteSent && (
490-
call.hangupParty === CallParty.Remote ||
491-
(call.hangupParty === CallParty.Local && call.hangupReason === CallErrorCode.InviteTimeout)
492-
)) {
490+
if (oldState === CallState.InviteSent && call.hangupParty === CallParty.Remote) {
493491
this.play(AudioID.Busy);
494492
let title;
495493
let description;
496-
if (call.hangupReason === CallErrorCode.UserHangup) {
497-
title = _t("Call Declined");
498-
description = _t("The other party declined the call.");
499-
} else if (call.hangupReason === CallErrorCode.UserBusy) {
494+
// TODO: We should either do away with these or figure out a copy for each code (expect user_hangup...)
495+
if (call.hangupReason === CallErrorCode.UserBusy) {
500496
title = _t("User Busy");
501497
description = _t("The user you called is busy.");
502-
} else if (call.hangupReason === CallErrorCode.InviteTimeout) {
503-
title = _t("Call Failed");
504-
// XXX: full stop appended as some relic here, but these
505-
// strings need proper input from design anyway, so let's
506-
// not change this string until we have a proper one.
507-
description = _t('The remote side failed to pick up') + '.';
508-
} else {
498+
} else if (hangupReason && ![CallErrorCode.UserHangup, "user hangup"].includes(hangupReason)) {
509499
title = _t("Call Failed");
510500
description = _t("The call could not be established");
511501
}
@@ -514,7 +504,7 @@ export default class CallHandler extends EventEmitter {
514504
title, description,
515505
});
516506
} else if (
517-
call.hangupReason === CallErrorCode.AnsweredElsewhere && oldState === CallState.Connecting
507+
hangupReason === CallErrorCode.AnsweredElsewhere && oldState === CallState.Connecting
518508
) {
519509
Modal.createTrackedDialog('Call Handler', 'Call Failed', ErrorDialog, {
520510
title: _t("Answered Elsewhere"),

src/components/structures/CallEventGrouper.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ export default class CallEventGrouper extends EventEmitter {
7474
return this.hangup?.getContent()?.reason;
7575
}
7676

77+
public get rejectParty(): string {
78+
return this.reject?.getSender();
79+
}
80+
81+
public get gotRejected(): boolean {
82+
return Boolean(this.reject);
83+
}
84+
7785
/**
7886
* Returns true if there are only events from the other side - we missed the call
7987
*/

0 commit comments

Comments
 (0)