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

Commit f706ac4

Browse files
authored
Update styling of UserInfo right panel card (#12788)
* Add colour to PresenceLabel in UserInfo Signed-off-by: Michael Telatynski <[email protected]> * Update button positions & styles in UserInfo Signed-off-by: Michael Telatynski <[email protected]> * Update UserInfo styles Signed-off-by: Michael Telatynski <[email protected]> * Update tests Signed-off-by: Michael Telatynski <[email protected]> * Revert Ignore->Block copy change Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 2920e76 commit f706ac4

File tree

8 files changed

+667
-416
lines changed

8 files changed

+667
-416
lines changed
480 Bytes
Loading

res/css/views/right_panel/_UserInfo.pcss

Lines changed: 28 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,17 @@ limitations under the License.
4141
}
4242
}
4343

44-
h2 {
45-
font-size: $font-18px;
46-
font-weight: var(--cpd-font-weight-semibold);
47-
margin: 18px 0 0 0;
48-
}
49-
5044
.mx_UserInfo_container {
51-
padding: $spacing-8 $spacing-16;
52-
53-
&:not(.mx_UserInfo_separator) {
54-
padding-top: $spacing-16;
55-
padding-bottom: 0;
56-
57-
> :not(h3) {
58-
margin-inline-start: $spacing-8;
59-
display: flex;
60-
flex-flow: column;
61-
align-items: flex-start;
62-
row-gap: $spacing-8;
63-
}
64-
}
45+
padding: var(--cpd-space-4x) 0;
46+
margin: 0 var(--cpd-space-4x);
6547

6648
.mx_UserInfo_container_verifyButton {
6749
margin-top: $spacing-8;
6850
}
69-
}
7051

71-
.mx_UserInfo_separator {
72-
border-bottom: 1px solid $separator;
52+
& + .mx_UserInfo_container {
53+
border-top: 1px solid $separator;
54+
}
7355
}
7456

7557
.mx_UserInfo_memberDetailsContainer {
@@ -94,7 +76,7 @@ limitations under the License.
9476
margin: $spacing-24 $spacing-32 0 $spacing-32;
9577

9678
.mx_UserInfo_avatar_transition {
97-
max-width: 30vh;
79+
max-width: 120px;
9880
aspect-ratio: 1 / 1;
9981
margin: 0 auto;
10082
transition: 0.5s;
@@ -112,7 +94,7 @@ limitations under the License.
11294
}
11395
}
11496

115-
h3 {
97+
h2 {
11698
text-transform: uppercase;
11799
color: $tertiary-content;
118100
font: var(--cpd-font-heading-sm-semibold);
@@ -125,41 +107,36 @@ limitations under the License.
125107
}
126108

127109
.mx_UserInfo_profile {
128-
text-align: center;
129-
130-
h2 {
131-
display: flex;
132-
font-size: $font-17px;
110+
h1 {
111+
font-size: $font-20px;
133112
line-height: $font-25px;
134-
flex: 1;
135-
justify-content: center;
136-
/* We reverse things here so for accessible technologies the name comes before the e2e shield */
137-
flex-direction: row-reverse;
138-
139-
span {
140-
/* limit to 2 lines, show an ellipsis if it overflows */
141-
/* this looks webkit specific but is supported by Firefox 68+ */
142-
display: -webkit-box;
143-
-webkit-box-orient: vertical;
144-
-webkit-line-clamp: 2;
145-
146-
overflow: hidden;
147-
word-break: break-all;
148-
text-overflow: ellipsis;
149-
}
150113

151-
.mx_E2EIcon {
152-
margin-top: 3px; /* visual vertical centering to the top line of text. */
153-
margin-inline-end: $spacing-4; /* margin from displayName */
154-
min-width: 18px; /* convince flexbox to not collapse it */
114+
/* limit to 2 lines, show an ellipsis if it overflows */
115+
/* this looks webkit specific but is supported by Firefox 68+ */
116+
display: -webkit-box;
117+
-webkit-box-orient: vertical;
118+
-webkit-line-clamp: 2;
119+
120+
overflow: hidden;
121+
word-break: break-all;
122+
text-overflow: ellipsis;
123+
124+
/* E2E icon wrapper */
125+
.mx_Flex > span {
126+
display: inline-block;
155127
}
156128
}
157129

158130
.mx_UserInfo_profileStatus {
159-
margin-top: $spacing-12;
131+
margin: var(--cpd-space-1x) 0;
160132
}
161133
}
162134

135+
.mx_PresenceLabel {
136+
font: var(--cpd-font-body-sm-regular);
137+
opacity: 1;
138+
}
139+
163140
.mx_UserInfo_memberDetails {
164141
.mx_UserInfo_profileField {
165142
display: flex;
@@ -184,10 +161,6 @@ limitations under the License.
184161

185162
.mx_UserInfo_field {
186163
line-height: $font-16px;
187-
188-
&.mx_UserInfo_destructive {
189-
color: $alert;
190-
}
191164
}
192165

193166
.mx_UserInfo_statusMessage {

res/css/views/rooms/_PresenceLabel.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ limitations under the License.
1818
font-size: $font-11px;
1919
opacity: 0.5;
2020
}
21+
22+
.mx_PresenceLabel_online {
23+
color: var(--cpd-color-text-success-primary);
24+
}

0 commit comments

Comments
 (0)