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

Commit e7a8dbd

Browse files
authored
Revert recent composer changes (#8840)
* Revert "Prevent new composer from overflowing from non-breakable text (#8829)" This reverts commit 57dff81. * Revert "Fix scroll jump issue with the composer (#8791)" This reverts commit 5167521. * Revert "Fix scroll jump issue with the composer (#8788)" This reverts commit f568a76. * Revert "Revert link color change in composer (#8784)" This reverts commit aedbeb2. * Revert "Improve composer visiblity (#8578)" This reverts commit f14374a.
1 parent 7d3c750 commit e7a8dbd

File tree

18 files changed

+176
-327
lines changed

18 files changed

+176
-327
lines changed

res/css/_components.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
@import "./views/avatars/_DecoratedRoomAvatar.scss";
8585
@import "./views/avatars/_WidgetAvatar.scss";
8686
@import "./views/beta/_BetaCard.scss";
87-
@import "./views/buttons/_Cancel.scss";
8887
@import "./views/context_menus/_CallContextMenu.scss";
8988
@import "./views/context_menus/_DeviceContextMenu.scss";
9089
@import "./views/context_menus/_IconizedContextMenu.scss";

res/css/structures/_RoomView.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ limitations under the License.
3232
position: relative;
3333
}
3434

35-
.mx_MainSplit_timeline {
36-
.mx_MessageComposer_wrapper {
37-
margin: $spacing-8 $spacing-16;
38-
}
39-
}
40-
4135
.mx_RoomView_auxPanel {
4236
min-width: 0px;
4337
width: 100%;
@@ -161,7 +155,7 @@ limitations under the License.
161155
.mx_RoomView_messageListWrapper {
162156
justify-content: flex-start;
163157

164-
> .mx_RoomView_MessageList > li > ol {
158+
>.mx_RoomView_MessageList > li > ol {
165159
list-style-type: none;
166160
}
167161
}

res/css/views/buttons/_Cancel.scss

Lines changed: 0 additions & 32 deletions
This file was deleted.

res/css/views/rooms/_MessageComposer.scss

Lines changed: 54 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,31 @@ limitations under the License.
2020
margin: auto;
2121
border-top: 1px solid $primary-hairline-color;
2222
position: relative;
23+
padding-left: 42px;
24+
padding-right: 16px;
25+
}
2326

24-
display: grid;
25-
grid-template:
26-
"reply reply" auto
27-
"composer controls" auto
28-
/ 1fr auto;
29-
30-
/* the below is required, without this some unexpected scroll jump
31-
will occur when erasing the composer content or jumping to voice note
32-
recording */
33-
min-height: 45px;
34-
35-
.mx_ReplyPreview {
36-
grid-area: reply;
37-
}
38-
39-
.mx_MessageComposer_row {
40-
min-width: 0;
41-
grid-area: composer;
42-
}
43-
44-
.mx_MessageComposer_controls {
45-
grid-area: controls;
46-
display: flex;
47-
align-items: flex-end;
48-
margin-bottom: 2px;
49-
}
50-
51-
>[role=button] {
52-
margin-bottom: 7px;
53-
}
27+
.mx_MessageComposer_replaced_wrapper {
28+
margin-left: auto;
29+
margin-right: auto;
30+
}
5431

55-
.mx_VoiceRecordComposerTile_delete {
56-
margin-bottom: 9px;
57-
}
32+
.mx_MessageComposer_replaced_valign {
33+
height: 60px;
34+
display: table-cell;
35+
vertical-align: middle;
36+
}
5837

59-
.mx_VoiceRecordComposerTile_stop,
60-
.mx_MessageComposer_sendMessage {
61-
margin-bottom: $spacing-4;
62-
}
38+
.mx_MessageComposer_roomReplaced_icon {
39+
float: left;
40+
margin-right: 20px;
41+
margin-top: 5px;
42+
width: 31px;
43+
height: 31px;
44+
}
6345

64-
.mx_VoiceMessagePrimaryContainer {
65-
margin-right: $spacing-8;
66-
}
46+
.mx_MessageComposer_roomReplaced_header {
47+
font-weight: bold;
6748
}
6849

6950
.mx_MessageComposer_autocomplete_wrapper {
@@ -75,36 +56,7 @@ limitations under the License.
7556
display: flex;
7657
flex-direction: row;
7758
align-items: center;
78-
border: 1px solid $quaternary-content;
79-
border-radius: 12px;
80-
padding: $spacing-12 $spacing-8;
81-
margin-right: $spacing-16;
82-
83-
transition: border-color var(--transition-short);
84-
85-
&[data-notice=true] {
86-
border-color: transparent;
87-
color: $secondary-content;
88-
89-
p {
90-
margin: 0;
91-
line-height: 0;
92-
}
93-
94-
svg {
95-
vertical-align: middle;
96-
position: relative;
97-
top: -2px;
98-
}
99-
}
100-
101-
&:focus-within {
102-
border-color: $tertiary-content;
103-
}
104-
105-
&[aria-disabled=true] {
106-
cursor: not-allowed;
107-
}
59+
width: 100%;
10860
}
10961

11062
.mx_MessageComposer .mx_MessageComposer_avatar {
@@ -121,16 +73,22 @@ limitations under the License.
12173
}
12274

12375
.mx_MessageComposer_e2eIcon.mx_E2EIcon {
124-
margin: 0 0 2px;
76+
position: absolute;
77+
left: 20px;
78+
margin-right: 0; // Counteract the E2EIcon class
79+
margin-left: 3px; // Counteract the E2EIcon class
12580
width: 12px;
12681
height: 12px;
127-
align-self: end;
12882
}
12983

13084
.mx_MessageComposer_noperm_error {
85+
width: 100%;
86+
height: 60px;
13187
font-style: italic;
132-
color: $tertiary-content;
133-
font-size: $font-12px;
88+
color: $info-plinth-fg-color;
89+
display: flex;
90+
align-items: center;
91+
justify-content: center;
13492
}
13593

13694
.mx_MessageComposer_input_wrapper {
@@ -166,19 +124,13 @@ limitations under the License.
166124
.mx_MessageComposer_editor > :first-child {
167125
margin-top: 0 !important;
168126
}
169-
170127
.mx_MessageComposer_editor > :last-child {
171128
margin-bottom: 0 !important;
172129
}
173130

174131
@keyframes visualbell {
175-
from {
176-
background-color: $visual-bell-bg-color;
177-
}
178-
179-
to {
180-
background-color: $background;
181-
}
132+
from { background-color: $visual-bell-bg-color; }
133+
to { background-color: $background; }
182134
}
183135

184136
.mx_MessageComposer_input_error {
@@ -214,14 +166,12 @@ limitations under the License.
214166
color: $accent;
215167
opacity: 1.0;
216168
}
217-
218169
.mx_MessageComposer_input textarea::-webkit-input-placeholder {
219170
color: $accent;
220171
}
221172

222173
.mx_MessageComposer_button_highlight {
223174
background: rgba($accent, 0.25);
224-
225175
// make the icon the accent color too
226176
&::before {
227177
background-color: $accent !important;
@@ -238,7 +188,6 @@ limitations under the License.
238188
padding-left: var(--size);
239189
border-radius: 50%;
240190
margin-right: 6px;
241-
margin-bottom: 7px;
242191

243192
&:last-child {
244193
margin-right: auto;
@@ -312,30 +261,11 @@ limitations under the License.
312261
mask-image: url('$(res)/img/image-view/more.svg');
313262
}
314263

315-
.mx_MessageComposer_sendMessageWrapper {
316-
--sendMessageSize: 32px;
317-
transition: all var(--transition-short);
318-
}
319-
320-
.mx_MessageComposer_sendMessageWrapper,
321-
.mx_MessageComposer_sendMessageWrapper-enter,
322-
.mx_MessageComposer_sendMessageWrapper-exit {
323-
width: 0;
324-
transform: scale(.6);
325-
opacity: 0;
326-
}
327-
328-
.mx_MessageComposer_sendMessageWrapper-enter-active {
329-
width: var(--sendMessageSize);
330-
transform: scale(1);
331-
opacity: 1;
332-
}
333-
334264
.mx_MessageComposer_sendMessage {
335265
cursor: pointer;
336266
position: relative;
337-
width: var(--sendMessageSize);
338-
height: var(--sendMessageSize);
267+
width: 32px;
268+
height: 32px;
339269
border-radius: 100%;
340270
background-color: $accent;
341271

@@ -428,6 +358,10 @@ limitations under the License.
428358
.mx_MessageComposer_input {
429359
min-height: 50px;
430360
}
361+
362+
.mx_MessageComposer_noperm_error {
363+
height: 50px;
364+
}
431365
}
432366

433367
/**
@@ -437,7 +371,21 @@ limitations under the License.
437371
.mx_MessageComposer.mx_MessageComposer--compact {
438372
margin-right: 0;
439373

374+
.mx_MessageComposer_wrapper {
375+
padding: 0 0 0 25px;
376+
}
377+
378+
&:not(.mx_MessageComposer_e2eStatus) {
379+
.mx_MessageComposer_wrapper {
380+
padding: 0;
381+
}
382+
}
383+
440384
.mx_MessageComposer_button:last-child {
441385
margin-right: 0;
442386
}
387+
388+
.mx_MessageComposer_e2eIcon {
389+
left: 0;
390+
}
443391
}

res/css/views/rooms/_ReplyPreview.scss

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,48 @@ limitations under the License.
1515
*/
1616

1717
.mx_ReplyPreview {
18-
border: 1px solid $system;
19-
20-
margin-left: calc(-1 * $spacing-16);
21-
margin-right: calc(-1 * $spacing-16);
22-
padding: $spacing-8 $spacing-16 0 $spacing-16;
23-
24-
border-top-left-radius: 16px;
25-
border-top-right-radius: 16px;
26-
18+
border: 1px solid $primary-hairline-color;
2719
border-bottom: none;
2820
background: $background;
2921
max-height: 50vh;
3022
overflow: auto;
31-
}
3223

33-
.mx_ReplyPreview_header {
34-
display: flex;
35-
font-size: $font-12px;
36-
color: $secondary-content;
37-
position: relative;
38-
39-
> svg {
40-
width: 1em;
41-
vertical-align: middle;
42-
margin-right: $spacing-8;
43-
}
44-
45-
.mx_CancelButton {
46-
position: absolute;
47-
right: 0;
48-
top: 50%;
49-
transform: translateY(-50%);
24+
.mx_ReplyPreview_section {
25+
border-bottom: 1px solid $primary-hairline-color;
26+
display: flex;
27+
flex-flow: column;
28+
row-gap: $spacing-8;
29+
padding: $spacing-8 $spacing-8 0 $spacing-8;
30+
31+
.mx_ReplyPreview_header {
32+
display: flex;
33+
justify-content: space-between;
34+
column-gap: 8px;
35+
36+
color: $primary-content;
37+
font-weight: 400;
38+
opacity: 0.4;
39+
40+
.mx_ReplyPreview_header_cancel {
41+
background-color: $primary-content;
42+
mask: url('$(res)/img/cancel.svg');
43+
mask-repeat: no-repeat;
44+
mask-position: center;
45+
mask-size: 18px;
46+
width: 18px;
47+
height: 18px;
48+
min-width: 18px;
49+
min-height: 18px;
50+
}
51+
}
5052
}
5153
}
5254

53-
.mx_ReplyPreview_header_cancel {
54-
position: absolute;
55-
right: 0;
56-
color: $primary-content;
57-
width: 18px;
55+
.mx_RoomView_body {
56+
.mx_ReplyPreview {
57+
// Add box-shadow to the reply preview on the main (left) panel only.
58+
// It is not added to the preview on the (right) panel for threads and a chat with a maximized widget.
59+
box-shadow: 0px -16px 32px $composer-shadow-color;
60+
border-radius: 8px 8px 0 0;
61+
}
5862
}

0 commit comments

Comments
 (0)