Skip to content

Commit 06dbea6

Browse files
authored
New group call experience: Room header and PiP designs (matrix-org#9351)
* 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
1 parent 9a3ae23 commit 06dbea6

Some content is hidden

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

43 files changed

+844
-219
lines changed

cypress/e2e/lazy-loading/lazy-loading.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe("Lazy Loading", () => {
109109
}
110110

111111
function openMemberlist(): void {
112-
cy.get('.mx_HeaderButtons [aria-label="Room Info"]').click();
112+
cy.get('.mx_HeaderButtons [aria-label="Room info"]').click();
113113
cy.get(".mx_RoomSummaryCard").within(() => {
114114
cy.get(".mx_RoomSummaryCard_icon_people").click();
115115
});

res/css/_common.pcss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ legend {
453453
}
454454

455455
@define-mixin customisedCancelButton {
456-
mask: url('$(res)/img/feather-customised/cancel.svg');
456+
mask: url('$(res)/img/cancel.svg');
457457
mask-repeat: no-repeat;
458458
mask-position: center;
459459
mask-size: cover;
@@ -466,8 +466,8 @@ legend {
466466

467467
.mx_Dialog_cancelButton {
468468
@mixin customisedCancelButton;
469-
width: 14px;
470-
height: 14px;
469+
width: 18px;
470+
height: 18px;
471471
position: absolute;
472472
top: 10px;
473473
right: 0;

res/css/structures/_HeaderButtons.pcss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,3 @@ limitations under the License.
1717
.mx_HeaderButtons {
1818
display: flex;
1919
}
20-
21-
.mx_RoomHeader_buttons + .mx_HeaderButtons {
22-
/* remove the | separator line for when next to RoomHeaderButtons */
23-
/* TODO: remove this once when we redo communities and make the right panel similar to the new rooms one */
24-
&::before {
25-
content: unset;
26-
}
27-
}
28-
29-
.mx_HeaderButtons::before {
30-
content: "";
31-
background-color: $header-panel-text-primary-color;
32-
opacity: 0.5;
33-
margin: 6px 8px;
34-
border-radius: 1px;
35-
width: 1px;
36-
}

res/css/views/elements/_Tooltip.pcss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ limitations under the License.
7676
border: 0;
7777
text-align: center;
7878

79-
&:not(.mx_Tooltip_noMargin) {
80-
margin-left: 6px;
81-
margin-right: 6px;
82-
}
83-
8479
.mx_Tooltip_chevron {
8580
display: none;
8681
}

res/css/views/rooms/_JumpToBottomButton.pcss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ limitations under the License.
6868
bottom: 0;
6969
left: 0;
7070
right: 0;
71-
mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
71+
mask-image: url('$(res)/img/element-icons/message/chevron-up.svg');
7272
mask-repeat: no-repeat;
73-
mask-size: contain;
73+
mask-size: 20px;
74+
mask-position: center 6px;
75+
transform: rotate(180deg);
7476
background: $muted-fg-color;
7577
}

res/css/views/rooms/_RoomHeader.pcss

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,28 @@ limitations under the License.
1919
border-bottom: 1px solid $primary-hairline-color;
2020
background-color: $background;
2121

22-
.mx_RoomHeader_e2eIcon {
22+
.mx_RoomHeader_icon {
2323
height: 12px;
2424
width: 12px;
2525

26-
.mx_E2EIcon {
26+
&.mx_RoomHeader_icon_video {
27+
height: 14px;
28+
width: 14px;
29+
background-color: $secondary-content;
30+
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
31+
mask-size: 100%;
32+
}
33+
34+
&.mx_E2EIcon {
2735
margin: 0;
28-
position: absolute;
29-
height: 12px;
30-
width: 12px;
36+
height: 100%; /* To give the tooltip room to breathe */
3137
}
3238
}
39+
40+
.mx_CallDuration {
41+
margin-top: calc(($font-15px - $font-13px) / 2); /* To align with the name */
42+
font-size: $font-13px;
43+
}
3344
}
3445

3546
.mx_RoomHeader_wrapper {
@@ -38,7 +49,7 @@ limitations under the License.
3849
align-items: center;
3950
min-width: 0;
4051
margin: 0 20px 0 16px;
41-
padding-top: 8px;
52+
padding-top: 6px;
4253
border-bottom: 1px solid $system;
4354

4455
.mx_InviteOnlyIcon_large {
@@ -77,11 +88,6 @@ limitations under the License.
7788
padding-right: 12px;
7889
}
7990

80-
.mx_RoomHeader_buttons {
81-
display: flex;
82-
background-color: $background;
83-
}
84-
8591
.mx_RoomHeader_info {
8692
display: flex;
8793
flex: 1;
@@ -93,9 +99,11 @@ limitations under the License.
9399
overflow: hidden;
94100
color: $primary-content;
95101
font-weight: $font-semi-bold;
96-
font-size: $font-18px;
102+
font-size: $font-15px;
103+
min-height: 24px;
104+
align-items: center;
97105
border-radius: 6px;
98-
margin: 0 7px;
106+
margin: 0 3px;
99107
padding: 1px 4px;
100108
display: flex;
101109
user-select: none;
@@ -112,10 +120,10 @@ limitations under the License.
112120

113121
.mx_RoomHeader_chevron {
114122
align-self: center;
115-
width: 16px;
116-
height: 16px;
123+
width: 20px;
124+
height: 20px;
117125
mask-position: center;
118-
mask-size: contain;
126+
mask-size: 20px;
119127
mask-repeat: no-repeat;
120128
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
121129
background-color: $tertiary-content;
@@ -160,9 +168,6 @@ limitations under the License.
160168
line-height: $lineHeight;
161169
max-height: calc($lineHeight * $lines);
162170

163-
/* to align baseline of topic with room name */
164-
margin: 4px 7px 0;
165-
166171
overflow: hidden;
167172
-webkit-line-clamp: $lines; /* See: https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp */
168173
-webkit-box-orient: vertical;
@@ -177,7 +182,7 @@ limitations under the License.
177182

178183
.mx_RoomHeader_avatar {
179184
flex: 0;
180-
margin: 0 6px 0 7px;
185+
margin: 0 7px;
181186
position: relative;
182187
}
183188

@@ -206,7 +211,7 @@ limitations under the License.
206211
mask-size: contain;
207212
}
208213

209-
&:hover {
214+
&:not(.mx_RoomHeader_closeButton):hover {
210215
background: rgba($accent, 0.1);
211216

212217
&::before {
@@ -249,6 +254,37 @@ limitations under the License.
249254
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
250255
}
251256

257+
.mx_RoomHeader_layoutButton--freedom::before,
258+
.mx_RoomHeader_freedomIcon::before {
259+
mask-image: url('$(res)/img/element-icons/call/freedom.svg');
260+
}
261+
262+
.mx_RoomHeader_layoutButton--spotlight::before,
263+
.mx_RoomHeader_spotlightIcon::before {
264+
mask-image: url('$(res)/img/element-icons/call/spotlight.svg');
265+
}
266+
267+
.mx_RoomHeader_closeButton::before {
268+
mask-image: url('$(res)/img/cancel.svg');
269+
mask-size: 20px;
270+
mask-position: center;
271+
}
272+
273+
.mx_RoomHeader_minimiseButton::before {
274+
mask-image: url('$(res)/img/element-icons/reduce.svg');
275+
}
276+
277+
.mx_RoomHeader_layoutMenu .mx_IconizedContextMenu_icon::before {
278+
content: '';
279+
width: 16px;
280+
height: 16px;
281+
display: block;
282+
mask-position: center;
283+
mask-size: 20px;
284+
mask-repeat: no-repeat;
285+
background: $primary-content;
286+
}
287+
252288
@media only screen and (max-width: 480px) {
253289
.mx_RoomHeader_wrapper {
254290
padding: 0;

res/css/views/rooms/_TopUnreadMessagesBar.pcss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ limitations under the License.
5151
position: absolute;
5252
width: 36px;
5353
height: 36px;
54-
mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
54+
mask-image: url('$(res)/img/element-icons/message/chevron-up.svg');
5555
mask-repeat: no-repeat;
56-
mask-size: contain;
56+
mask-size: 20px;
57+
mask-position: center;
5758
background: $muted-fg-color;
58-
transform: rotate(180deg);
5959
}
6060

6161
.mx_TopUnreadMessagesBar_markAsRead {

res/css/views/voip/_LegacyCallViewHeader.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ limitations under the License.
2525
width: 100%;
2626

2727
&.mx_LegacyCallViewHeader_pip {
28-
cursor: pointer;
28+
cursor: grab;
2929
}
3030
}
3131

res/img/cancel.svg

Lines changed: 3 additions & 10 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)