Skip to content

Commit fc49748

Browse files
authored
feat: align the autocomplete and link preview styles with message composer addition (#328)
### 🎯 Goal Needed for GetStream/stream-chat-react#2669
1 parent bda8dc9 commit fc49748

4 files changed

Lines changed: 58 additions & 0 deletions

File tree

src/v2/styles/Autocomplete/Autocomplete-layout.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@
3838
padding: unset;
3939
margin: unset;
4040
}
41+
42+
.str-chat__suggestion-list--react {
43+
overflow-y: unset;
44+
45+
.str-chat__suggestion-list-item {
46+
> button {
47+
width: 100%;
48+
}
49+
}
50+
}
4151
}
4252

4353
.str-chat__slash-command {
@@ -58,6 +68,8 @@
5868
.str-chat__user-item--name {
5969
@include utils.ellipsis-text;
6070
@include utils.prevent-glitch-text-overflow;
71+
display: flex;
72+
align-items: center;
6173
width: 100%;
6274
}
6375
}
@@ -69,6 +81,8 @@
6981

7082
.str-chat__emoji-item--name {
7183
@include utils.ellipsis-text;
84+
display: flex;
85+
align-items: center;
7286
width: 100%;
7387
}
7488
}

src/v2/styles/Autocomplete/Autocomplete-theme.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156

157157
.str-chat__slash-command {
158158
@include utils.component-layer-overrides('slash-command');
159+
text-align: left;
160+
font: var(--str-chat__subtitle-text);
159161

160162
.str-chat__slash-command-header {
161163
.str-chat__slash-command-name {
@@ -206,4 +208,13 @@
206208
background-color: var(--str-chat__suggestion-list-item--selected-background-color);
207209
}
208210
}
211+
212+
.str-chat__suggestion-list--react {
213+
.str-chat__suggestion-list-item {
214+
> button {
215+
@include utils.button-reset;
216+
text-decoration: none;
217+
}
218+
}
219+
}
209220
}

src/v2/styles/LinkPreview/LinkPreview-layout.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,22 @@
4646
@include utils.button-reset;
4747
cursor: pointer;
4848
}
49+
}
50+
51+
.str-chat__link-preview-card--loading {
52+
.str-chat__link-preview-card__content {
53+
display: flex;
54+
flex-direction: column;
55+
gap: 0.25rem;
56+
57+
.str-chat__link-preview-card__content-title {
58+
height: calc(var(--str-chat__spacing-px) * 16);
59+
width: 100%
60+
}
61+
62+
.str-chat__link-preview-card__content-description {
63+
height: calc(var(--str-chat__spacing-px) * 12);
64+
width: 100%;
65+
}
66+
}
4967
}

src/v2/styles/LinkPreview/LinkPreview-theme.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
@use '../utils';
2+
3+
.str-chat {
4+
--str-chat__link-preview-loading-state-color: var(--str-chat__disabled-color);
5+
}
6+
17
.str-chat__link-preview-card {
28
.str-chat__link-preview-card__content {
39
border-left: 2px solid var(--str-chat__primary-color);
@@ -14,4 +20,13 @@
1420
.str-chat__link-preview-card__dismiss-button svg path {
1521
fill: var(--str-chat__text-low-emphasis-color);
1622
}
23+
}
24+
25+
.str-chat__link-preview-card--loading {
26+
.str-chat__link-preview-card__content-title,
27+
.str-chat__link-preview-card__content-description {
28+
@include utils.loading-item-background('link-preview');
29+
@include utils.loading-animation;
30+
border-radius: calc(var(--str-chat__spacing-px) * 3);
31+
}
1732
}

0 commit comments

Comments
 (0)