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

Commit 1f64835

Browse files
authored
Update video rooms to new design specs (#8207)
* 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
1 parent 020c1c6 commit 1f64835

38 files changed

+793
-1300
lines changed

res/css/_components.scss

-1
Original file line numberDiff line numberDiff line change
@@ -314,4 +314,3 @@
314314
@import "./views/voip/_DialPadModal.scss";
315315
@import "./views/voip/_PiPContainer.scss";
316316
@import "./views/voip/_VideoFeed.scss";
317-
@import "./views/voip/_VoiceChannelRadio.scss";

res/css/structures/_RoomView.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ hr.mx_RoomView_myReadMarker {
218218
margin-right: calc($container-gap-width / 2);
219219
width: auto;
220220
height: 100%;
221+
padding-top: 33px; // to match the right panel chat heading
221222

222-
background: none;
223-
border: none;
223+
border-radius: 8px;
224224
}
225225

226226
.mx_RoomView_callStatusBar .mx_UploadBar_uploadProgressInner {

res/css/views/elements/_FacePile.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020
flex-direction: row-reverse;
2121
vertical-align: middle;
2222

23-
> * + * {
23+
> .mx_FacePile_face + .mx_FacePile_face {
2424
margin-right: -8px;
2525
}
2626

res/css/views/rooms/_RoomList.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ limitations under the License.
2121
.mx_RoomList_iconPlus::before {
2222
mask-image: url('$(res)/img/element-icons/roomlist/plus-circle.svg');
2323
}
24-
.mx_RoomList_iconCreateNewRoom::before {
24+
.mx_RoomList_iconNewRoom::before {
2525
mask-image: url('$(res)/img/element-icons/roomlist/hash-plus.svg');
2626
}
27+
.mx_RoomList_iconNewVideoRoom::before {
28+
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
29+
}
2730
.mx_RoomList_iconAddExistingRoom::before {
2831
mask-image: url('$(res)/img/element-icons/roomlist/hash.svg');
2932
}

res/css/views/rooms/_RoomListHeader.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ limitations under the License.
103103
.mx_RoomListHeader_iconStartChat::before {
104104
mask-image: url('$(res)/img/element-icons/roomlist/member-plus.svg');
105105
}
106-
.mx_RoomListHeader_iconCreateRoom::before {
106+
.mx_RoomListHeader_iconNewRoom::before {
107107
mask-image: url('$(res)/img/element-icons/roomlist/hash-plus.svg');
108108
}
109+
.mx_RoomListHeader_iconNewVideoRoom::before {
110+
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
111+
}
109112
.mx_RoomListHeader_iconExplore::before {
110113
mask-image: url('$(res)/img/element-icons/roomlist/hash-search.svg');
111114
}

res/css/views/rooms/_RoomTile.scss

+108-138
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ limitations under the License.
1919
margin-bottom: 4px;
2020
padding: 4px;
2121

22+
// The tile is also a flexbox row itself
23+
display: flex;
2224
contain: content; // Not strict as it will break when resizing a sublist vertically
2325
box-sizing: border-box;
2426

25-
// The tile is also a flexbox row itself
26-
display: flex;
27+
font-size: $font-13px;
2728

2829
&.mx_RoomTile_selected,
2930
&:hover,
@@ -37,165 +38,138 @@ limitations under the License.
3738
margin-right: 10px;
3839
}
3940

40-
.mx_RoomTile_details {
41+
.mx_RoomTile_titleContainer {
42+
height: 32px;
43+
min-width: 0;
44+
flex-basis: 0;
4145
flex-grow: 1;
42-
min-width: 0; // allow flex to shrink it
46+
margin-right: 8px; // spacing to buttons/badges
47+
48+
// Create a new column layout flexbox for the title parts
4349
display: flex;
4450
flex-direction: column;
51+
justify-content: center;
4552

46-
.mx_RoomTile_primaryDetails {
47-
height: 32px;
48-
display: flex;
49-
flex-wrap: wrap;
50-
51-
.mx_RoomTile_titleContainer {
52-
min-width: 0;
53-
flex-basis: 0;
54-
flex-grow: 1;
55-
margin-right: 8px; // spacing to buttons/badges
56-
57-
// Create a new column layout flexbox for the title parts
58-
display: flex;
59-
flex-direction: column;
60-
justify-content: center;
61-
62-
.mx_RoomTile_title, .mx_RoomTile_subtitle {
63-
width: 100%;
64-
65-
// Ellipsize any text overflow
66-
text-overflow: ellipsis;
67-
overflow: hidden;
68-
white-space: nowrap;
69-
}
70-
71-
.mx_RoomTile_title {
72-
font-size: $font-14px;
73-
line-height: $font-18px;
74-
}
75-
76-
.mx_RoomTile_title.mx_RoomTile_titleHasUnreadEvents {
77-
font-weight: 600;
78-
}
79-
80-
.mx_RoomTile_subtitle {
81-
font-size: $font-13px;
82-
line-height: $font-18px;
83-
color: $secondary-content;
84-
}
85-
86-
.mx_RoomTile_subtitle.mx_RoomTile_voiceIndicator {
87-
&::before {
88-
display: inline-block;
89-
vertical-align: text-bottom;
90-
content: '';
91-
background-color: $secondary-content;
92-
mask-image: url('$(res)/img/voip/voice-room.svg');
93-
mask-size: 16px;
94-
width: 16px;
95-
height: 16px;
96-
margin-right: 4px;
97-
}
98-
99-
&.mx_RoomTile_voiceIndicator_active {
100-
color: $accent;
101-
102-
&::before {
103-
background-color: $accent;
104-
}
105-
}
106-
}
107-
108-
.mx_RoomTile_titleWithSubtitle {
109-
margin-top: -3px; // shift the title up a bit more
110-
}
111-
}
112-
113-
.mx_RoomTile_notificationsButton {
114-
margin-left: 4px; // spacing between buttons
115-
}
116-
117-
.mx_RoomTile_badgeContainer {
118-
height: 16px;
119-
// don't set width so that it takes no space when there is no badge to show
120-
margin: auto 0; // vertically align
53+
.mx_RoomTile_title, .mx_RoomTile_subtitle {
54+
width: 100%;
12155

122-
// Create a flexbox to make aligning dot badges easier
123-
display: flex;
124-
align-items: center;
56+
// Ellipsize any text overflow
57+
text-overflow: ellipsis;
58+
overflow: hidden;
59+
white-space: nowrap;
60+
}
12561

126-
.mx_NotificationBadge {
127-
margin-right: 2px; // centering
128-
}
62+
.mx_RoomTile_title {
63+
font-size: $font-14px;
64+
line-height: $font-18px;
12965

130-
.mx_NotificationBadge_dot {
131-
// make the smaller dot occupy the same width for centering
132-
margin-left: 5px;
133-
margin-right: 7px;
134-
}
66+
&.mx_RoomTile_titleHasUnreadEvents {
67+
font-weight: 600;
13568
}
69+
}
13670

137-
// The context menu buttons are hidden by default
138-
.mx_RoomTile_menuButton,
139-
.mx_RoomTile_notificationsButton {
140-
width: 20px;
141-
min-width: 20px; // yay flex
142-
height: 20px;
143-
margin-top: auto;
144-
margin-bottom: auto;
145-
position: relative;
146-
display: none;
71+
.mx_RoomTile_subtitle {
72+
line-height: $font-18px;
73+
color: $secondary-content;
14774

75+
.mx_RoomTile_videoIndicator {
14876
&::before {
149-
top: 2px;
150-
left: 2px;
77+
display: inline-block;
78+
vertical-align: text-bottom;
15179
content: '';
80+
background-color: $secondary-content;
81+
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
82+
mask-size: 16px;
15283
width: 16px;
15384
height: 16px;
154-
position: absolute;
155-
mask-position: center;
156-
mask-size: contain;
157-
mask-repeat: no-repeat;
158-
background: $primary-content;
85+
margin-right: 4px;
15986
}
160-
}
16187

162-
// If the room has an overriden notification setting then we always show the notifications menu button
163-
.mx_RoomTile_notificationsButton.mx_RoomTile_notificationsButton_show {
164-
display: block;
88+
&.mx_RoomTile_videoIndicator_active {
89+
color: $accent;
90+
91+
&::before {
92+
background-color: $accent;
93+
}
94+
}
16595
}
16696

167-
.mx_RoomTile_menuButton::before {
168-
mask-image: url('$(res)/img/element-icons/context-menu.svg');
97+
.mx_RoomTile_videoParticipants::before {
98+
display: inline-block;
99+
vertical-align: text-bottom;
100+
content: '';
101+
background-color: $secondary-content;
102+
mask-image: url('$(res)/img/element-icons/group-members.svg');
103+
mask-size: 16px;
104+
width: 16px;
105+
height: 16px;
106+
margin-right: 2px;
169107
}
170108
}
171109

172-
.mx_RoomTile_voiceChannel {
173-
width: 100%;
174-
display: flex;
175-
align-items: center;
110+
.mx_RoomTile_titleWithSubtitle {
111+
margin-top: -3px; // shift the title up a bit more
112+
}
113+
}
176114

177-
.mx_FacePile {
178-
margin: 6px 0 4px;
179-
}
115+
.mx_RoomTile_notificationsButton {
116+
margin-left: 4px; // spacing between buttons
117+
}
180118

181-
.mx_RoomTile_connectVoiceButton {
182-
font-weight: 600;
183-
padding-left: 10px;
184-
padding-right: 10px;
119+
.mx_RoomTile_badgeContainer {
120+
height: 16px;
121+
// don't set width so that it takes no space when there is no badge to show
122+
margin: auto 0; // vertically align
185123

186-
&::before {
187-
content: '';
188-
background-color: $accent;
189-
mask-image: url('$(res)/img/voip/voice-room.svg');
190-
mask-size: 16px;
191-
width: 16px;
192-
height: 16px;
193-
margin-right: 4px;
194-
}
195-
}
124+
// Create a flexbox to make aligning dot badges easier
125+
display: flex;
126+
align-items: center;
127+
128+
.mx_NotificationBadge {
129+
margin-right: 2px; // centering
130+
}
131+
132+
.mx_NotificationBadge_dot {
133+
// make the smaller dot occupy the same width for centering
134+
margin-left: 5px;
135+
margin-right: 7px;
136+
}
137+
}
138+
139+
// The context menu buttons are hidden by default
140+
.mx_RoomTile_menuButton,
141+
.mx_RoomTile_notificationsButton {
142+
width: 20px;
143+
min-width: 20px; // yay flex
144+
height: 20px;
145+
margin-top: auto;
146+
margin-bottom: auto;
147+
position: relative;
148+
display: none;
149+
150+
&::before {
151+
top: 2px;
152+
left: 2px;
153+
content: '';
154+
width: 16px;
155+
height: 16px;
156+
position: absolute;
157+
mask-position: center;
158+
mask-size: contain;
159+
mask-repeat: no-repeat;
160+
background: $primary-content;
196161
}
197162
}
198163

164+
// If the room has an overriden notification setting then we always show the notifications menu button
165+
.mx_RoomTile_notificationsButton.mx_RoomTile_notificationsButton_show {
166+
display: block;
167+
}
168+
169+
.mx_RoomTile_menuButton::before {
170+
mask-image: url('$(res)/img/element-icons/context-menu.svg');
171+
}
172+
199173
&:not(.mx_RoomTile_minimized) {
200174
&:hover,
201175
&:focus-within,
@@ -222,10 +196,6 @@ limitations under the License.
222196
.mx_DecoratedRoomAvatar, .mx_RoomTile_avatarContainer {
223197
margin-right: 0;
224198
}
225-
226-
.mx_RoomTile_details {
227-
display: none;
228-
}
229199
}
230200
}
231201

0 commit comments

Comments
 (0)