Skip to content

Commit 0ef3aa1

Browse files
authored
fix: CSS issue on OGMessage EmojiReactions & resolve SASS deprecation warnings (#1209)
#### Fixes * Fixed an issue where the style was breaking in OG messages due to emoji reactions. * Improved the CSS structure to prevent Sass deprecation warnings from occurring.
1 parent 634b94e commit 0ef3aa1

File tree

13 files changed

+222
-64
lines changed

13 files changed

+222
-64
lines changed

src/modules/GroupChannelList/components/GroupChannelListItem/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@
171171
}
172172

173173
.sendbird-channel-preview--active {
174+
padding: 12px 16px 12px 12px;
174175
@include themed() {
175176
border-left: solid 4px t(primary-3);
176177
border-bottom: solid 1px t(on-bg-4);
177178
background-color: t(primary--1-7);
178179
}
179-
padding: 12px 16px 12px 12px;
180180

181181
.sendbird-channel-preview__content__upper__header__channel-name {
182182
@include themed() {

src/modules/OpenChannelList/components/OpenChannelPreview/index.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
white-space: nowrap;
8181
overflow: hidden;
8282
text-overflow: ellipsis;
83-
&.frozen {
84-
max-width: calc(100% - 20px);
85-
}
8683
box-sizing: border-box;
8784

8885
overflow-x: hidden;
@@ -91,6 +88,9 @@
9188
@include mobile() {
9289
overflow-y: hidden;
9390
}
91+
&.frozen {
92+
max-width: calc(100% - 20px);
93+
}
9494
}
9595

9696
.sendbird-open-channel-preview__context__title__frozen {

src/modules/Thread/components/ThreadList/ThreadListItemContent.scss

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
flex-direction: row;
77
width: 100%;
88
height: 100%;
9+
910
&.incoming {
1011
justify-content: flex-start;
1112
}
13+
1214
&.outgoing {
1315
justify-content: flex-end;
1416
}
17+
1518
.sendbird-thread-list-item-content__middle {
1619
max-width: 200px;
20+
1721
@include mobile() {
1822
max-width: calc(100vw - 100px);
1923
}
@@ -60,6 +64,7 @@
6064
display: flex;
6165
flex-direction: row;
6266
min-width: 80px;
67+
6368
&.sendbird-mouse-hover {
6469
display: none;
6570
}
@@ -79,8 +84,15 @@
7984
position: relative;
8085
width: 100%;
8186
display: inline-flex;
82-
&.outgoing { justify-content: flex-end }
83-
&.incoming { justify-content: flex-start }
87+
88+
&.outgoing {
89+
justify-content: flex-end
90+
}
91+
92+
&.incoming {
93+
justify-content: flex-start
94+
}
95+
8496
&:hover {
8597
cursor: pointer;
8698
}
@@ -91,11 +103,17 @@
91103
position: relative;
92104
display: inline-flex;
93105
width: 50px;
94-
&.use-reactions { width: 70px; }
106+
95107
margin-left: 4px;
96108
padding-top: 18px;
109+
110+
&.use-reactions {
111+
width: 70px;
112+
}
113+
97114
&.chain-top {
98115
padding-top: 2px;
116+
99117
&.use-quote {
100118
padding-top: 18px;
101119
}
@@ -106,6 +124,7 @@
106124
flex-direction: row;
107125
height: 32px;
108126
display: none;
127+
109128
&.sendbird-mouse-hover {
110129
display: inline-flex;
111130
}
@@ -118,6 +137,7 @@
118137
display: inline-flex;
119138
}
120139
}
140+
121141
.sendbird-thread-list-item-content__middle {
122142
.sendbird-thread-list-item-content__middle__body-container {
123143
.sendbird-thread-list-item-content__middle__body-container__created-at {
@@ -136,7 +156,11 @@
136156
display: inline-flex;
137157
justify-content: flex-end;
138158
width: 50px;
139-
&.use-reactions { width: 70px }
159+
160+
&.use-reactions {
161+
width: 70px
162+
}
163+
140164
&.use-quote {
141165
.sendbird-thread-list-item-content-menu {
142166
top: 18px;
@@ -149,6 +173,7 @@
149173
right: 4px;
150174
flex-direction: row;
151175
display: none;
176+
152177
&.sendbird-mouse-hover {
153178
display: inline-flex;
154179
}
@@ -165,12 +190,19 @@
165190
position: relative;
166191
width: 100%;
167192
display: inline-flex;
168-
&.outgoing { justify-content: flex-end }
169-
&.incoming { justify-content: flex-start }
193+
194+
&.outgoing {
195+
justify-content: flex-end
196+
}
197+
198+
&.incoming {
199+
justify-content: flex-start
200+
}
170201
}
171202

172203
.sendbird-thread-list-item-content__middle__body-container {
173204
position: relative;
205+
174206
.sendbird-thread-list-item-content__middle__body-container__created-at {
175207
position: absolute;
176208
bottom: 2px;
@@ -181,9 +213,11 @@
181213
box-sizing: content-box;
182214
min-width: 80px;
183215
min-height: 16px;
216+
184217
&.sendbird-mouse-hover {
185218
display: none;
186219
}
220+
187221
.sendbird-thread-list-item-content__middle__body-container__created-at__component-container {
188222
position: relative;
189223
display: inline-flex;
@@ -202,6 +236,7 @@
202236
display: inline-flex;
203237
}
204238
}
239+
205240
.sendbird-thread-list-item-content__middle {
206241
.sendbird-thread-list-item-content__middle__body-container {
207242
.sendbird-thread-list-item-content__middle__body-container__created-at {
@@ -228,14 +263,27 @@
228263
width: 100%;
229264
max-width: 400px;
230265
border-radius: 0px 0px 16px 16px;
231-
@include themed() { background-color: t(bg-1) }
266+
267+
@include themed() {
268+
background-color: t(bg-1)
269+
}
270+
232271
&.primary {
233-
@include themed() { background-color: t(primary-3) }
272+
@include themed() {
273+
background-color: t(primary-3)
274+
}
234275
}
235-
&.mouse-hover, &:hover {
236-
@include themed() { background-color: t(bg-2) }
276+
277+
&.mouse-hover,
278+
&:hover {
279+
@include themed() {
280+
background-color: t(bg-2)
281+
}
282+
237283
&.primary {
238-
@include themed() { background-color: t(primary-4) }
284+
@include themed() {
285+
background-color: t(primary-4)
286+
}
239287
}
240288
}
241289
}
@@ -244,14 +292,17 @@
244292
.sendbird-thread-list-item-content__middle__thread-replies {
245293
margin-top: 4px;
246294
}
295+
247296
.sendbird-thread-list-item-content__middle__message-item-body.sendbird-og-message-item-body,
248297
.sendbird-thread-list-item-content__middle__message-item-body.sendbird-thumbnail-message-item-body {
249298
min-width: 200px;
250299
max-width: 200px;
251300
}
301+
252302
.sendbird-thread-list-item-content__middle__message-item-body.sendbird-thumbnail-message-item-body {
253303
height: 148px;
254304
}
305+
255306
.sendbird-thread-list-item-content__middle__message-item-body .sendbird-thumbnail-message-item-body__placeholder,
256307
.sendbird-thread-list-item-content__middle__message-item-body .sendbird-thumbnail-message-item-body__icon-wrapper,
257308
.sendbird-thread-list-item-content__middle__message-item-body .sendbird-thumbnail-message-item-body__video {

0 commit comments

Comments
 (0)