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

Commit 4bb279b

Browse files
committed
Merge branch 'develop' into resizable-call-view
2 parents 9a2036c + 427f649 commit 4bb279b

File tree

67 files changed

+447
-271
lines changed

Some content is hidden

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

67 files changed

+447
-271
lines changed

res/css/_common.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
395395
border: 1px solid $accent-color;
396396
color: $accent-color;
397397
background-color: $button-secondary-bg-color;
398+
font-family: inherit;
398399
}
399400

400401
.mx_Dialog button:last-child {

res/css/structures/_LeftPanel.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ $roomListCollapsedWidth: 68px;
1919

2020
.mx_LeftPanel {
2121
background-color: $roomlist-bg-color;
22-
min-width: 260px;
22+
// TODO decrease this once Spaces launches as it'll no longer need to include the 56px Community Panel
23+
min-width: 206px;
2324
max-width: 50%;
2425

2526
// Create a row-based flexbox for the GroupFilterPanel and the room list

res/css/structures/_MatrixChat.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ limitations under the License.
6666
}
6767

6868
/* not the left panel, and not the resize handle, so the roomview/groupview/... */
69-
.mx_MatrixChat > :not(.mx_LeftPanel):not(.mx_ResizeHandle) {
69+
.mx_MatrixChat > :not(.mx_LeftPanel):not(.mx_SpacePanel):not(.mx_ResizeHandle) {
7070
background-color: $primary-bg-color;
7171

7272
flex: 1 1 0;

res/css/structures/_SpacePanel.scss

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ limitations under the License.
1616

1717
$topLevelHeight: 32px;
1818
$nestedHeight: 24px;
19-
$gutterSize: 17px;
20-
$activeStripeSize: 4px;
21-
$activeBorderTransparentGap: 2px;
19+
$gutterSize: 16px;
20+
$activeBorderTransparentGap: 1px;
2221

2322
$activeBackgroundColor: $roomtile-selected-bg-color;
2423
$activeBorderColor: $secondary-fg-color;
@@ -36,6 +35,7 @@ $activeBorderColor: $secondary-fg-color;
3635

3736
.mx_SpacePanel_spaceTreeWrapper {
3837
flex: 1;
38+
overflow-y: scroll;
3939
}
4040

4141
.mx_SpacePanel_toggleCollapse {
@@ -63,21 +63,26 @@ $activeBorderColor: $secondary-fg-color;
6363
}
6464

6565
.mx_AutoHideScrollbar {
66-
padding: 16px 12px 16px 0;
66+
padding: 16px 0;
6767
}
6868

6969
.mx_SpaceButton_toggleCollapse {
7070
cursor: pointer;
7171
}
7272

73-
.mx_SpaceItem.collapsed {
74-
.mx_SpaceButton {
75-
.mx_NotificationBadge {
76-
right: -4px;
77-
top: -4px;
78-
}
79-
}
73+
.mx_SpaceTreeLevel {
74+
display: flex;
75+
flex-direction: column;
76+
max-width: 250px;
77+
flex-grow: 1;
78+
}
79+
80+
.mx_SpaceItem {
81+
display: inline-flex;
82+
flex-flow: wrap;
83+
}
8084

85+
.mx_SpaceItem.collapsed {
8186
& > .mx_SpaceButton > .mx_SpaceButton_toggleCollapse {
8287
transform: rotate(-90deg);
8388
}
@@ -89,42 +94,50 @@ $activeBorderColor: $secondary-fg-color;
8994

9095
.mx_SpaceItem:not(.hasSubSpaces) > .mx_SpaceButton {
9196
margin-left: $gutterSize;
97+
min-width: 40px;
9298
}
9399

94100
.mx_SpaceButton {
95101
border-radius: 8px;
96-
position: relative;
97102
margin-bottom: 2px;
98103
display: flex;
99104
align-items: center;
100-
padding: 4px;
105+
padding: 4px 4px 4px 0;
106+
width: 100%;
101107

102108
&.mx_SpaceButton_active {
103109
&:not(.mx_SpaceButton_narrow) .mx_SpaceButton_selectionWrapper {
104110
background-color: $activeBackgroundColor;
105-
border-radius: 8px;
106111
}
107112

108-
&.mx_SpaceButton_narrow {
109-
.mx_BaseAvatar, .mx_SpaceButton_avatarPlaceholder {
110-
border: 2px $activeBorderColor solid;
111-
border-radius: 11px;
112-
}
113+
&.mx_SpaceButton_narrow .mx_SpaceButton_selectionWrapper {
114+
padding: $activeBorderTransparentGap;
115+
border: 3px $activeBorderColor solid;
113116
}
114117
}
115118

116119
.mx_SpaceButton_selectionWrapper {
120+
position: relative;
117121
display: flex;
118122
flex: 1;
119123
align-items: center;
124+
border-radius: 12px;
125+
padding: 4px;
126+
}
127+
128+
&:not(.mx_SpaceButton_narrow) {
129+
.mx_SpaceButton_selectionWrapper {
130+
width: 100%;
131+
padding-right: 16px;
132+
overflow: hidden;
133+
}
120134
}
121135

122136
.mx_SpaceButton_name {
123137
flex: 1;
124138
margin-left: 8px;
125139
white-space: nowrap;
126140
display: block;
127-
max-width: 150px;
128141
text-overflow: ellipsis;
129142
overflow: hidden;
130143
padding-right: 8px;
@@ -133,8 +146,10 @@ $activeBorderColor: $secondary-fg-color;
133146
}
134147

135148
.mx_SpaceButton_toggleCollapse {
136-
width: calc($gutterSize - $activeStripeSize);
137-
margin-left: 1px;
149+
width: $gutterSize;
150+
// negative margin to place it correctly even with the complex
151+
// 4px selection border each space button has when active
152+
margin-right: -4px;
138153
height: 20px;
139154
mask-position: center;
140155
mask-size: 20px;
@@ -172,11 +187,6 @@ $activeBorderColor: $secondary-fg-color;
172187
}
173188
}
174189

175-
.mx_SpaceButton_avatarPlaceholder {
176-
border: $activeBorderTransparentGap transparent solid;
177-
padding: $activeBorderTransparentGap;
178-
}
179-
180190
&.mx_SpaceButton_new .mx_SpaceButton_icon {
181191
background-color: $accent-color;
182192
transition: all .1s ease-in-out; // TODO transition
@@ -196,21 +206,8 @@ $activeBorderColor: $secondary-fg-color;
196206
}
197207
}
198208

199-
.mx_BaseAvatar {
200-
/* moving the border-radius to this element from _image
201-
element so we can add a border to it without the initials being displaced */
202-
overflow: hidden;
203-
border: 2px transparent solid;
204-
padding: $activeBorderTransparentGap;
205-
206-
.mx_BaseAvatar_initial {
207-
top: $activeBorderTransparentGap;
208-
left: $activeBorderTransparentGap;
209-
}
210-
211-
.mx_BaseAvatar_image {
212-
border-radius: 8px;
213-
}
209+
.mx_BaseAvatar_image {
210+
border-radius: 8px;
214211
}
215212

216213
.mx_SpaceButton_menuButton {
@@ -219,8 +216,9 @@ $activeBorderColor: $secondary-fg-color;
219216
height: 20px;
220217
margin-top: auto;
221218
margin-bottom: auto;
222-
position: relative;
223219
display: none;
220+
position: absolute;
221+
right: 4px;
224222

225223
&::before {
226224
top: 2px;
@@ -239,9 +237,8 @@ $activeBorderColor: $secondary-fg-color;
239237
}
240238

241239
.mx_SpacePanel_badgeContainer {
240+
position: absolute;
242241
height: 16px;
243-
// don't set width so that it takes no space when there is no badge to show
244-
margin: auto 0; // vertically align
245242

246243
// Create a flexbox to make aligning dot badges easier
247244
display: flex;
@@ -261,14 +258,25 @@ $activeBorderColor: $secondary-fg-color;
261258
&.collapsed {
262259
.mx_SpaceButton {
263260
.mx_SpacePanel_badgeContainer {
264-
position: absolute;
265-
right: 0px;
266-
top: 2px;
261+
right: -3px;
262+
top: -3px;
263+
}
264+
265+
&.mx_SpaceButton_active .mx_SpacePanel_badgeContainer {
266+
// when we draw the selection border we move the relative bounds of our parent
267+
// so update our position within the bounds of the parent to maintain position overall
268+
right: -6px;
269+
top: -6px;
267270
}
268271
}
269272
}
270273

271274
&:not(.collapsed) {
275+
.mx_SpacePanel_badgeContainer {
276+
position: absolute;
277+
right: 4px;
278+
}
279+
272280
.mx_SpaceButton:hover,
273281
.mx_SpaceButton:focus-within,
274282
.mx_SpaceButton_hasMenuOpen {

res/css/structures/_SpaceRoomDirectory.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ limitations under the License.
132132
height: min-content;
133133
margin-left: auto;
134134
margin-right: 16px;
135+
display: inline-flex;
135136
}
136137
}
137138

res/css/structures/auth/_CompleteSecurity.scss

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,6 @@ limitations under the License.
2626
position: relative;
2727
}
2828

29-
.mx_CompleteSecurity_clients {
30-
width: max-content;
31-
margin: 36px auto 0;
32-
33-
.mx_CompleteSecurity_clients_desktop, .mx_CompleteSecurity_clients_mobile {
34-
position: relative;
35-
width: 160px;
36-
text-align: center;
37-
padding-top: 64px;
38-
display: inline-block;
39-
40-
&::before {
41-
content: '';
42-
position: absolute;
43-
height: 48px;
44-
width: 48px;
45-
left: 56px;
46-
top: 0;
47-
background-color: $muted-fg-color;
48-
mask-repeat: no-repeat;
49-
mask-size: contain;
50-
}
51-
}
52-
53-
.mx_CompleteSecurity_clients_desktop {
54-
margin-right: 56px;
55-
}
56-
57-
.mx_CompleteSecurity_clients_desktop::before {
58-
mask-image: url('$(res)/img/feather-customised/monitor.svg');
59-
}
60-
61-
.mx_CompleteSecurity_clients_mobile::before {
62-
mask-image: url('$(res)/img/feather-customised/smartphone.svg');
63-
}
64-
65-
p {
66-
margin-top: 16px;
67-
font-size: $font-12px;
68-
color: $muted-fg-color;
69-
text-align: center;
70-
}
71-
}
72-
7329
.mx_CompleteSecurity_heroIcon {
7430
width: 128px;
7531
height: 128px;

res/css/views/rooms/_RoomTile.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ limitations under the License.
189189
mask-image: url('$(res)/img/element-icons/settings.svg');
190190
}
191191

192+
.mx_RoomTile_iconInvite::before {
193+
mask-image: url('$(res)/img/element-icons/room/invite.svg');
194+
}
195+
192196
.mx_RoomTile_iconSignOut::before {
193197
mask-image: url('$(res)/img/element-icons/leave.svg');
194198
}

res/img/feather-customised/monitor.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

res/img/feather-customised/smartphone.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/CallHandler.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,11 @@ export default class CallHandler {
788788
// don't remove the call yet: let the hangup event handler do it (otherwise it will throw
789789
// the hangup event away)
790790
break;
791+
case 'hangup_all':
792+
for (const call of this.calls.values()) {
793+
call.hangup(CallErrorCode.UserHangup, false);
794+
}
795+
break;
791796
case 'answer': {
792797
if (!this.calls.has(payload.room_id)) {
793798
return; // no call to answer

0 commit comments

Comments
 (0)