Skip to content

Commit e72c6ef

Browse files
feat(EmptyStateIndicator): apply Figma design to str-chat__empty-channel
- Add EmptyStateIndicator/styling with Figma styles (tertiary color, caption typography, 12px gap) - Update copy to 'Send a message to start the conversation' and i18n (all locales) - Register styling in index.scss; leave str-chat__channel-list-empty unchanged Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 25150c2 commit e72c6ef

19 files changed

Lines changed: 53 additions & 4 deletions

File tree

src/components/EmptyStateIndicator/EmptyStateIndicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const UnMemoizedEmptyStateIndicator = (props: EmptyStateIndicatorProps) => {
2828
}
2929

3030
if (listType === 'message') {
31-
const text = t('No chats here yet…');
31+
const text = t('Send a message to start the conversation');
3232
return (
3333
<div className='str-chat__empty-channel'>
3434
<ChatBubble />

src/components/EmptyStateIndicator/__tests__/EmptyStateIndicator.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ describe('EmptyStateIndicator', () => {
2222

2323
it('should display correct text when listType is message', () => {
2424
render(<EmptyStateIndicator listType='message' />);
25-
expect(screen.queryByText('No chats here yet…')).toBeInTheDocument();
25+
expect(
26+
screen.queryByText('Send a message to start the conversation'),
27+
).toBeInTheDocument();
2628
});
2729

2830
it('should display correct text when listType is channel', () => {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Figma design: empty channel only (str-chat__empty-channel). str-chat__channel-list-empty unchanged.
2+
.str-chat__empty-channel {
3+
--str-chat-icon-color: var(--text-tertiary);
4+
display: flex;
5+
flex-direction: column;
6+
align-items: center;
7+
justify-content: center;
8+
height: 100%;
9+
padding: var(--str-chat__spacing-4);
10+
position: relative;
11+
gap: var(--str-chat__spacing-3); // 12px – Figma spacing/sm
12+
text-align: center;
13+
14+
svg {
15+
width: calc(var(--str-chat__spacing-px) * 136);
16+
height: calc(var(--str-chat__spacing-px) * 136);
17+
18+
path {
19+
fill: var(--text-tertiary);
20+
}
21+
}
22+
23+
.str-chat__empty-channel-notifications {
24+
position: absolute;
25+
inset-block-end: var(--str-chat__spacing-2);
26+
}
27+
28+
.str-chat__empty-channel-text {
29+
font: 400 14px / 20px var(--str-chat__font-family); // Figma caption/default
30+
color: var(--text-tertiary);
31+
margin: 0;
32+
}
33+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@use 'EmptyStateIndicator';

src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageList.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports[`VirtualizedMessageList should render the list without any message 1`] =
4747
class="str-chat__empty-channel-text"
4848
role="listitem"
4949
>
50-
No chats here yet…
50+
Send a message to start the conversation
5151
</p>
5252
</div>
5353
</div>

src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageListComponents.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports[`VirtualizedMessageComponents EmptyPlaceholder should render for main me
4242
class="str-chat__empty-channel-text"
4343
role="listitem"
4444
>
45-
No chats here yet…
45+
Send a message to start the conversation
4646
</p>
4747
</div>
4848
</div>

src/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
"Select up to {{count}}_one": "Bis zu {{count}} auswählen",
245245
"Select up to {{count}}_other": "Bis zu {{count}} auswählen",
246246
"Send": "Senden",
247+
"Send a message to start the conversation": "Sende eine Nachricht, um die Unterhaltung zu starten",
247248
"Send Anyway": "Trotzdem senden",
248249
"Send message request failed": "Senden der Nachrichtenanfrage fehlgeschlagen",
249250
"Send poll": "Umfrage senden",

src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
"Select up to {{count}}_one": "Select up to {{count}}",
245245
"Select up to {{count}}_other": "Select up to {{count}}",
246246
"Send": "Send",
247+
"Send a message to start the conversation": "Send a message to start the conversation",
247248
"Send Anyway": "Send Anyway",
248249
"Send message request failed": "Send message request failed",
249250
"Send poll": "Send poll",

src/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
"Select up to {{count}}_many": "Selecciona hasta {{count}}",
254254
"Select up to {{count}}_other": "Selecciona hasta {{count}}",
255255
"Send": "Enviar",
256+
"Send a message to start the conversation": "Envía un mensaje para iniciar la conversación",
256257
"Send Anyway": "Enviar de todos modos",
257258
"Send message request failed": "Error al enviar la solicitud de mensaje",
258259
"Send poll": "Enviar encuesta",

src/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
"Select up to {{count}}_many": "Sélectionner jusqu'à {{count}}",
254254
"Select up to {{count}}_other": "Sélectionner jusqu'à {{count}}",
255255
"Send": "Envoyer",
256+
"Send a message to start the conversation": "Envoyez un message pour commencer la conversation",
256257
"Send Anyway": "Envoyer quand même",
257258
"Send message request failed": "Échec de la demande d'envoi de message",
258259
"Send poll": "Envoyer le sondage",

0 commit comments

Comments
 (0)