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

Commit

Permalink
Merge pull request #5398 from matrix-org/t3chguy/fix/8141
Browse files Browse the repository at this point in the history
Improvements around new room empty space interactions
  • Loading branch information
t3chguy authored Nov 10, 2020
2 parents 50bce64 + 80bb091 commit 0766519
Show file tree
Hide file tree
Showing 32 changed files with 644 additions and 413 deletions.
3 changes: 3 additions & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
@import "./views/elements/_InfoTooltip.scss";
@import "./views/elements/_InlineSpinner.scss";
@import "./views/elements/_ManageIntegsButton.scss";
@import "./views/elements/_MiniAvatarUploader.scss";
@import "./views/elements/_PowerSelector.scss";
@import "./views/elements/_ProgressBar.scss";
@import "./views/elements/_QRCode.scss";
Expand All @@ -139,6 +140,7 @@
@import "./views/groups/_GroupUserSettings.scss";
@import "./views/messages/_CreateEvent.scss";
@import "./views/messages/_DateSeparator.scss";
@import "./views/messages/_EventTileBubble.scss";
@import "./views/messages/_MEmoteBody.scss";
@import "./views/messages/_MFileBody.scss";
@import "./views/messages/_MImageBody.scss";
Expand Down Expand Up @@ -182,6 +184,7 @@
@import "./views/rooms/_MemberList.scss";
@import "./views/rooms/_MessageComposer.scss";
@import "./views/rooms/_MessageComposerFormatBar.scss";
@import "./views/rooms/_NewRoomIntro.scss";
@import "./views/rooms/_NotificationBadge.scss";
@import "./views/rooms/_PinnedEventTile.scss";
@import "./views/rooms/_PinnedEventsPanel.scss";
Expand Down
36 changes: 1 addition & 35 deletions res/css/structures/_HomePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,8 @@ limitations under the License.
color: $muted-fg-color;
}

.mx_HomePage_userAvatar {
position: relative;
width: min-content;
.mx_MiniAvatarUploader {
margin: 0 auto;

&::before, &::after {
content: '';
position: absolute;

height: 26px;
width: 26px;

right: -6px;
bottom: -6px;
}

&::before {
background-color: $primary-bg-color;
border-radius: 50%;
z-index: 1;
}

&::after {
background-color: $secondary-fg-color;
mask-position: center;
mask-repeat: no-repeat;
mask-image: url('$(res)/img/element-icons/camera.svg');
mask-size: 16px;
z-index: 2;
}

&.mx_HomePage_userAvatar_busy::after {
background: url("$(res)/img/spinner.gif") no-repeat center;
background-size: 80%;
mask: unset;
}
}

.mx_HomePage_default_buttons {
Expand Down
10 changes: 0 additions & 10 deletions res/css/structures/_RoomStatusBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,6 @@ limitations under the License.
display: block;
}

.mx_RoomStatusBar_isAlone {
height: 50px;
line-height: $font-50px;

color: $primary-fg-color;
opacity: 0.5;
overflow-y: hidden;
display: block;
}

.mx_MatrixChat_useCompactLayout {
.mx_RoomStatusBar {
min-height: 40px;
Expand Down
56 changes: 56 additions & 0 deletions res/css/views/elements/_MiniAvatarUploader.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_MiniAvatarUploader {
position: relative;
width: min-content;

&::before, &::after {
content: '';
position: absolute;

height: 26px;
width: 26px;

right: -6px;
bottom: -6px;
}

&::before {
background-color: $primary-bg-color;
border-radius: 50%;
z-index: 1;
}

&::after {
background-color: $secondary-fg-color;
mask-position: center;
mask-repeat: no-repeat;
mask-image: url('$(res)/img/element-icons/camera.svg');
mask-size: 16px;
z-index: 2;
}

&.mx_MiniAvatarUploader_busy::after {
background: url("$(res)/img/spinner.gif") no-repeat center;
background-size: 80%;
mask: unset;
}
}

.mx_MiniAvatarUploader_input {
display: none;
}
27 changes: 5 additions & 22 deletions res/css/views/messages/_CreateEvent.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018 New Vector Ltd
Copyright 2018, 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,25 +15,8 @@ limitations under the License.
*/

.mx_CreateEvent {
background-color: $info-plinth-bg-color;
padding-left: 20px;
padding-right: 20px;
padding-top: 10px;
padding-bottom: 10px;
}

.mx_CreateEvent_image {
float: left;
margin-right: 20px;
width: 72px;
height: 34px;

background-color: $primary-fg-color;
mask: url('$(res)/img/room-continuation.svg');
mask-repeat: no-repeat;
mask-position: center;
}

.mx_CreateEvent_header {
font-weight: bold;
&::before {
background-color: $composer-e2e-icon-color;
mask-image: url('$(res)/img/element-icons/chat-bubbles.svg');
}
}
60 changes: 60 additions & 0 deletions res/css/views/messages/_EventTileBubble.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_EventTileBubble {
background-color: $dark-panel-bg-color;
padding: 10px;
border-radius: 8px;
margin: 10px auto;
max-width: 75%;
box-sizing: border-box;
display: grid;
grid-template-columns: 24px minmax(0, 1fr) min-content;

&::before, &::after {
position: relative;
grid-column: 1;
grid-row: 1 / 3;
width: 16px;
height: 16px;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
margin-top: 4px;
}

.mx_EventTileBubble_title, .mx_EventTileBubble_subtitle {
overflow-wrap: break-word;
}

.mx_EventTileBubble_title {
font-weight: 600;
font-size: $font-15px;
grid-column: 2;
grid-row: 1;
}

.mx_EventTileBubble_subtitle {
font-size: $font-12px;
grid-column: 2;
grid-row: 2;
}
}
33 changes: 0 additions & 33 deletions res/css/views/messages/_MJitsiWidgetEvent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,8 @@ limitations under the License.
*/

.mx_MJitsiWidgetEvent {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) min-content;

&::before {
grid-column: 1;
grid-row: 1 / 3;
width: 16px;
height: 16px;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
background-color: $composer-e2e-icon-color; // XXX: Variable abuse
margin-top: 4px;
mask-image: url('$(res)/img/element-icons/call/video-call.svg');
}

.mx_MJitsiWidgetEvent_title {
font-weight: 600;
font-size: $font-15px;
grid-column: 2;
grid-row: 1;
}

.mx_MJitsiWidgetEvent_subtitle {
grid-column: 2;
grid-row: 2;
}

.mx_MJitsiWidgetEvent_title,
.mx_MJitsiWidgetEvent_subtitle {
overflow-wrap: break-word;
}
}
48 changes: 7 additions & 41 deletions res/css/views/messages/_common_CryptoEvent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@ limitations under the License.
*/

.mx_cryptoEvent {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) min-content;

&.mx_cryptoEvent_icon::before,
&.mx_cryptoEvent_icon::after {
grid-column: 1;
grid-row: 1 / 3;
width: 16px;
height: 16px;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
mask-image: url('$(res)/img/e2e/normal.svg');
background-color: $composer-e2e-icon-color;
margin-top: 4px;
}

// white infill for the transparency
&.mx_cryptoEvent_icon::before {
background-color: #ffffff;
Expand All @@ -46,6 +24,11 @@ limitations under the License.
mask-size: 90%;
}

&.mx_cryptoEvent_icon::after {
mask-image: url('$(res)/img/e2e/normal.svg');
background-color: $composer-e2e-icon-color;
}

&.mx_cryptoEvent_icon_verified::after {
mask-image: url("$(res)/img/e2e/verified.svg");
background-color: $accent-color;
Expand All @@ -56,25 +39,6 @@ limitations under the License.
background-color: $notice-primary-color;
}

.mx_cryptoEvent_title, .mx_cryptoEvent_subtitle, .mx_cryptoEvent_state {
overflow-wrap: break-word;
}

.mx_cryptoEvent_title {
font-weight: 600;
font-size: $font-15px;
grid-column: 2;
grid-row: 1;
}

.mx_cryptoEvent_subtitle {
grid-column: 2;
grid-row: 2;
}

.mx_cryptoEvent_state, .mx_cryptoEvent_subtitle {
font-size: $font-12px;
}

.mx_cryptoEvent_state, .mx_cryptoEvent_buttons {
grid-column: 3;
Expand All @@ -92,5 +56,7 @@ limitations under the License.
margin: auto 0;
text-align: center;
color: $notice-secondary-color;
overflow-wrap: break-word;
font-size: $font-12px;
}
}
14 changes: 3 additions & 11 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ $left-gutter: 64px;
position: relative;
}

.mx_EventTile_bubble {
background-color: $dark-panel-bg-color;
padding: 10px;
border-radius: 5px;
margin: 10px auto;
max-width: 75%;
box-sizing: border-box;
}

.mx_EventTile.mx_EventTile_info {
padding-top: 0px;
}
Expand Down Expand Up @@ -131,9 +122,10 @@ $left-gutter: 64px;
grid-template-columns: 1fr 100px;

.mx_EventTile_line {
margin-right: 0px;
margin-right: 0;
grid-column: 1 / 3;
padding: 0;
// override default padding of mx_EventTile_line so that we can be centered
padding: 0 !important;
}

.mx_EventTile_msgOption {
Expand Down
Loading

0 comments on commit 0766519

Please sign in to comment.