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

Commit

Permalink
New group call experience: Room header and PiP designs (#9351)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
robintown authored Oct 7, 2022
1 parent 9a3ae23 commit 06dbea6
Show file tree
Hide file tree
Showing 43 changed files with 844 additions and 219 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/lazy-loading/lazy-loading.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe("Lazy Loading", () => {
}

function openMemberlist(): void {
cy.get('.mx_HeaderButtons [aria-label="Room Info"]').click();
cy.get('.mx_HeaderButtons [aria-label="Room info"]').click();
cy.get(".mx_RoomSummaryCard").within(() => {
cy.get(".mx_RoomSummaryCard_icon_people").click();
});
Expand Down
6 changes: 3 additions & 3 deletions res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ legend {
}

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

.mx_Dialog_cancelButton {
@mixin customisedCancelButton;
width: 14px;
height: 14px;
width: 18px;
height: 18px;
position: absolute;
top: 10px;
right: 0;
Expand Down
17 changes: 0 additions & 17 deletions res/css/structures/_HeaderButtons.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,3 @@ limitations under the License.
.mx_HeaderButtons {
display: flex;
}

.mx_RoomHeader_buttons + .mx_HeaderButtons {
/* remove the | separator line for when next to RoomHeaderButtons */
/* TODO: remove this once when we redo communities and make the right panel similar to the new rooms one */
&::before {
content: unset;
}
}

.mx_HeaderButtons::before {
content: "";
background-color: $header-panel-text-primary-color;
opacity: 0.5;
margin: 6px 8px;
border-radius: 1px;
width: 1px;
}
5 changes: 0 additions & 5 deletions res/css/views/elements/_Tooltip.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ limitations under the License.
border: 0;
text-align: center;

&:not(.mx_Tooltip_noMargin) {
margin-left: 6px;
margin-right: 6px;
}

.mx_Tooltip_chevron {
display: none;
}
Expand Down
6 changes: 4 additions & 2 deletions res/css/views/rooms/_JumpToBottomButton.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ limitations under the License.
bottom: 0;
left: 0;
right: 0;
mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
mask-image: url('$(res)/img/element-icons/message/chevron-up.svg');
mask-repeat: no-repeat;
mask-size: contain;
mask-size: 20px;
mask-position: center 6px;
transform: rotate(180deg);
background: $muted-fg-color;
}
78 changes: 57 additions & 21 deletions res/css/views/rooms/_RoomHeader.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,28 @@ limitations under the License.
border-bottom: 1px solid $primary-hairline-color;
background-color: $background;

.mx_RoomHeader_e2eIcon {
.mx_RoomHeader_icon {
height: 12px;
width: 12px;

.mx_E2EIcon {
&.mx_RoomHeader_icon_video {
height: 14px;
width: 14px;
background-color: $secondary-content;
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
mask-size: 100%;
}

&.mx_E2EIcon {
margin: 0;
position: absolute;
height: 12px;
width: 12px;
height: 100%; /* To give the tooltip room to breathe */
}
}

.mx_CallDuration {
margin-top: calc(($font-15px - $font-13px) / 2); /* To align with the name */
font-size: $font-13px;
}
}

.mx_RoomHeader_wrapper {
Expand All @@ -38,7 +49,7 @@ limitations under the License.
align-items: center;
min-width: 0;
margin: 0 20px 0 16px;
padding-top: 8px;
padding-top: 6px;
border-bottom: 1px solid $system;

.mx_InviteOnlyIcon_large {
Expand Down Expand Up @@ -77,11 +88,6 @@ limitations under the License.
padding-right: 12px;
}

.mx_RoomHeader_buttons {
display: flex;
background-color: $background;
}

.mx_RoomHeader_info {
display: flex;
flex: 1;
Expand All @@ -93,9 +99,11 @@ limitations under the License.
overflow: hidden;
color: $primary-content;
font-weight: $font-semi-bold;
font-size: $font-18px;
font-size: $font-15px;
min-height: 24px;
align-items: center;
border-radius: 6px;
margin: 0 7px;
margin: 0 3px;
padding: 1px 4px;
display: flex;
user-select: none;
Expand All @@ -112,10 +120,10 @@ limitations under the License.

.mx_RoomHeader_chevron {
align-self: center;
width: 16px;
height: 16px;
width: 20px;
height: 20px;
mask-position: center;
mask-size: contain;
mask-size: 20px;
mask-repeat: no-repeat;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
background-color: $tertiary-content;
Expand Down Expand Up @@ -160,9 +168,6 @@ limitations under the License.
line-height: $lineHeight;
max-height: calc($lineHeight * $lines);

/* to align baseline of topic with room name */
margin: 4px 7px 0;

overflow: hidden;
-webkit-line-clamp: $lines; /* See: https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp */
-webkit-box-orient: vertical;
Expand All @@ -177,7 +182,7 @@ limitations under the License.

.mx_RoomHeader_avatar {
flex: 0;
margin: 0 6px 0 7px;
margin: 0 7px;
position: relative;
}

Expand Down Expand Up @@ -206,7 +211,7 @@ limitations under the License.
mask-size: contain;
}

&:hover {
&:not(.mx_RoomHeader_closeButton):hover {
background: rgba($accent, 0.1);

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

.mx_RoomHeader_layoutButton--freedom::before,
.mx_RoomHeader_freedomIcon::before {
mask-image: url('$(res)/img/element-icons/call/freedom.svg');
}

.mx_RoomHeader_layoutButton--spotlight::before,
.mx_RoomHeader_spotlightIcon::before {
mask-image: url('$(res)/img/element-icons/call/spotlight.svg');
}

.mx_RoomHeader_closeButton::before {
mask-image: url('$(res)/img/cancel.svg');
mask-size: 20px;
mask-position: center;
}

.mx_RoomHeader_minimiseButton::before {
mask-image: url('$(res)/img/element-icons/reduce.svg');
}

.mx_RoomHeader_layoutMenu .mx_IconizedContextMenu_icon::before {
content: '';
width: 16px;
height: 16px;
display: block;
mask-position: center;
mask-size: 20px;
mask-repeat: no-repeat;
background: $primary-content;
}

@media only screen and (max-width: 480px) {
.mx_RoomHeader_wrapper {
padding: 0;
Expand Down
6 changes: 3 additions & 3 deletions res/css/views/rooms/_TopUnreadMessagesBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ limitations under the License.
position: absolute;
width: 36px;
height: 36px;
mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
mask-image: url('$(res)/img/element-icons/message/chevron-up.svg');
mask-repeat: no-repeat;
mask-size: contain;
mask-size: 20px;
mask-position: center;
background: $muted-fg-color;
transform: rotate(180deg);
}

.mx_TopUnreadMessagesBar_markAsRead {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/voip/_LegacyCallViewHeader.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ limitations under the License.
width: 100%;

&.mx_LegacyCallViewHeader_pip {
cursor: pointer;
cursor: grab;
}
}

Expand Down
13 changes: 3 additions & 10 deletions res/img/cancel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/img/element-icons/call/freedom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/img/element-icons/call/spotlight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions res/img/element-icons/reduce.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions res/img/feather-customised/cancel.svg

This file was deleted.

3 changes: 0 additions & 3 deletions res/img/feather-customised/chevron-down-thin.svg

This file was deleted.

Loading

0 comments on commit 06dbea6

Please sign in to comment.