Skip to content

Commit 1de9630

Browse files
authored
Fixes following threads design implementation review (matrix-org#7100)
1 parent b8edebe commit 1de9630

File tree

16 files changed

+280
-115
lines changed

16 files changed

+280
-115
lines changed

res/css/structures/_ContextualMenu.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ limitations under the License.
3838
position: absolute;
3939
font-size: $font-14px;
4040
z-index: 5001;
41-
contain: content;
4241
}
4342

4443
.mx_ContextualMenu_right {

res/css/structures/_RightPanel.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222
display: flex;
2323
flex-direction: column;
2424
border-radius: 8px;
25-
padding: 4px 0;
25+
padding: 8px 0;
2626
box-sizing: border-box;
2727
height: 100%;
2828
contain: strict;

res/css/views/right_panel/_BaseCard.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222
flex: 1;
2323

2424
.mx_BaseCard_header {
25-
margin: 8px 0;
25+
margin: 4px 0;
2626

2727
> h2 {
2828
margin: 0 44px;
@@ -40,13 +40,13 @@ limitations under the License.
4040
width: 20px;
4141
margin: 12px;
4242
top: 0;
43-
border-radius: 10px;
43+
border-radius: 50%;
4444

4545
&::before {
4646
content: "";
4747
position: absolute;
48-
height: 20px;
49-
width: 20px;
48+
height: inherit;
49+
width: inherit;
5050
top: 0;
5151
left: 0;
5252
mask-repeat: no-repeat;

res/css/views/right_panel/_ThreadPanel.scss

Lines changed: 103 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,29 @@ limitations under the License.
1818
display: flex;
1919
flex-direction: column;
2020

21-
padding-right: 0;
22-
2321
.mx_BaseCard_header {
22+
margin-bottom: 12px;
2423
.mx_BaseCard_close,
2524
.mx_BaseCard_back {
26-
margin-top: 15px;
25+
width: 24px;
26+
height: 24px;
27+
}
28+
.mx_BaseCard_back {
29+
left: -4px;
2730
}
2831
.mx_BaseCard_close {
29-
right: -8px;
32+
right: -4px;
3033
}
3134
}
3235

33-
.mx_ThreadPanel__header {
36+
.mx_BaseCard_back ~ .mx_ThreadPanel__header {
3437
width: calc(100% - 60px);
3538
margin-left: 30px;
39+
}
40+
41+
.mx_ThreadPanel__header {
42+
width: calc(100% - 30px);
43+
height: 24px;
3644
display: flex;
3745
flex: 1;
3846
justify-content: space-between;
@@ -47,13 +55,23 @@ limitations under the License.
4755

4856
.mx_AccessibleButton {
4957
font-size: 12px;
50-
color: $primary-content;
58+
color: $secondary-content;
5159
}
5260

5361
.mx_MessageActionBar_optionsButton {
5462
position: relative;
5563
}
5664

65+
.mx_MessageActionBar_maskButton {
66+
--size: 24px;
67+
width: var(--size);
68+
height: var(--size);
69+
&::after {
70+
mask-size: var(--size);
71+
mask-image: url("$(res)/img/element-icons/message/overflow-large.svg");
72+
}
73+
}
74+
5775
.mx_ContextualMenu_wrapper {
5876
// It's added here due to some weird error if I pass it directly in the style, even though it's a numeric value, so it's being passed 0 instead.
5977
// The error: react_devtools_backend.js:2526 Warning: `NaN` is an invalid value for the `top` css style property.
@@ -70,38 +88,59 @@ limitations under the License.
7088

7189
font-size: 12px;
7290
color: $secondary-content;
91+
padding-top: 10px;
92+
padding-bottom: 10px;
93+
94+
border: 1px solid $quinary-content;
95+
box-shadow: 0px 1px 3px rgba(23, 25, 28, 0.05);
96+
}
97+
98+
.mx_ContextualMenu_chevron_top {
99+
left: auto;
100+
right: 22px;
101+
border-bottom-color: $quinary-content;
102+
&::after {
103+
content: "";
104+
border: inherit;
105+
border-bottom-color: $background;
106+
position: absolute;
107+
top: 1px;
108+
left: -8px;
109+
}
73110
}
74111

75112
.mx_ThreadPanel_Header_FilterOptionItem {
76113
display: flex;
77114
flex-grow: 1;
78115
justify-content: space-between;
79116
flex-direction: column;
80-
overflow: visible;
81-
width: 100%;
82-
padding: 20px;
83-
padding-left: 30px;
117+
padding: 10px 20px 10px 30px;
84118
position: relative;
85119

86120
&:hover {
87121
background-color: $event-selected-color;
88122
}
89123
&[aria-selected="true"] {
90-
&::before {
124+
:first-child {
125+
margin-left: -20px;
126+
}
127+
:first-child::before {
91128
content: "";
92129
width: 12px;
93130
height: 12px;
94-
grid-column: 1;
95-
grid-row: 1;
131+
margin-right: 8px;
96132
mask-image: url("$(res)/img/feather-customised/check.svg");
97133
mask-size: 100%;
98134
mask-repeat: no-repeat;
99-
position: absolute;
100-
top: 22px;
101-
left: 10px;
102135
background-color: $primary-content;
136+
display: inline-block;
137+
vertical-align: middle;
103138
}
104139
}
140+
141+
:last-child {
142+
color: $secondary-content;
143+
}
105144
}
106145
}
107146

@@ -131,24 +170,20 @@ limitations under the License.
131170
}
132171

133172
.mx_AutoHideScrollbar {
134-
border-radius: 8px;
135-
}
136-
137-
.mx_RoomView_messageListWrapper {
173+
background: #fff;
138174
background-color: $background;
139-
padding: 8px;
140-
border-radius: inherit;
175+
border-radius: 8px;
176+
width: calc(100% - 16px);
177+
padding-right: 16px;
141178
}
142179

143-
.mx_ScrollPanel {
144-
.mx_RoomView_MessageList {
145-
padding: 0;
146-
}
180+
.mx_RoomView_MessageList {
181+
padding-left: 12px;
182+
padding-right: 0;
147183
}
148184

149185
.mx_EventTile, .mx_EventListSummary {
150186
// Account for scrollbar when hovering
151-
width: calc(100% - 3px);
152187
margin: 0 2px;
153188
padding-top: 0;
154189

@@ -170,19 +205,28 @@ limitations under the License.
170205
.mx_DateSeparator {
171206
display: none;
172207
}
208+
209+
&.mx_EventTile_clamp:hover {
210+
cursor: pointer;
211+
}
212+
}
213+
214+
.mx_EventTile:not([data-layout=bubble]) {
215+
.mx_EventTile_e2eIcon {
216+
left: 8px;
217+
}
173218
}
174219

175220
.mx_MessageComposer {
176221
background-color: $background;
177222
border-radius: 8px;
178223
margin-top: 8px;
179-
width: calc(100% - 8px);
180224
padding: 0 8px;
181225
box-sizing: border-box;
182226
}
183227

184228
.mx_ThreadPanel_dropdown {
185-
padding: 4px 8px;
229+
padding: 3px 8px;
186230
border-radius: 4px;
187231
line-height: 1.5;
188232
user-select: none;
@@ -207,6 +251,36 @@ limitations under the License.
207251
.mx_ThreadPanel_dropdown[aria-expanded=true]::before {
208252
transform: rotate(180deg);
209253
}
254+
255+
.mx_MessageTimestamp {
256+
font-size: $font-12px;
257+
}
258+
}
259+
260+
.mx_ThreadPanel_replies {
261+
margin-top: 8px;
262+
}
263+
264+
.mx_ThreadPanel_repliesSummary {
265+
&::before {
266+
content: "";
267+
mask-image: url('$(res)/img/element-icons/thread-summary.svg');
268+
mask-position: center;
269+
display: inline-block;
270+
height: 18px;
271+
min-width: 18px;
272+
background-color: currentColor;
273+
mask-repeat: no-repeat;
274+
mask-size: contain;
275+
margin-right: 8px;
276+
vertical-align: middle;
277+
}
278+
279+
color: $secondary-content;
280+
font-weight: 600;
281+
float: left;
282+
margin-right: 12px;
283+
font-size: $font-12px;
210284
}
211285

212286
.mx_ThreadPanel_viewInRoom::before {

0 commit comments

Comments
 (0)