Skip to content

Commit 221aa0d

Browse files
chore: fix message attachment combinations (voice recording widget) (#3069)
before/after <img width="361" height="185" alt="Screenshot 2026-03-26 at 3 05 50 PM" src="https://github.com/user-attachments/assets/3a5da8f0-5fc6-47ee-815c-aafba4e71c63" /> <img width="361" height="185" alt="Screenshot 2026-03-26 at 3 05 38 PM" src="https://github.com/user-attachments/assets/91c142c5-4f8a-4cee-b475-fbb987c06acb" />
1 parent f08b541 commit 221aa0d

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

src/components/Attachment/VoiceRecording.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const VoiceRecordingPlayerUI = ({ audioPlayer }: VoiceRecordingPlayerUIProps) =>
4343

4444
return (
4545
<div className={rootClassName} data-testid='voice-recording-widget'>
46-
<PlayButton isPlaying={!!isPlaying} onClick={audioPlayer.togglePlay} />
46+
<div className='str-chat__message-attachment__voice-recording-widget__play-button-container'>
47+
<PlayButton isPlaying={!!isPlaying} onClick={audioPlayer.togglePlay} />
48+
</div>
4749
<div className='str-chat__message-attachment__voice-recording-widget__metadata'>
4850
<div className='str-chat__message-attachment__voice-recording-widget__audio-state'>
4951
<div className='str-chat__message-attachment__voice-recording-widget__timer'>

src/components/Attachment/styling/Attachment.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,15 @@
416416
display: flex;
417417
align-items: center;
418418
justify-content: center;
419-
padding: var(--spacing-xs);
419+
padding-block: var(--spacing-xs);
420+
padding-inline-start: var(--spacing-xs);
421+
padding-inline-end: var(--spacing-sm);
420422
min-height: 60px;
421423

424+
.str-chat__message-attachment__voice-recording-widget__play-button-container {
425+
padding: var(--spacing-xxs);
426+
}
427+
422428
.str-chat__message-attachment__voice-recording-widget__metadata {
423429
min-width: 180px;
424430
padding-inline: var(--spacing-xs);
@@ -478,14 +484,17 @@
478484

479485
.str-chat__message.str-chat__message--has-single-attachment.str-chat__message--has-no-text {
480486
.str-chat__message-bubble {
481-
padding: 0;
482-
background-color: transparent;
483487
border: 1px solid var(--chat-border-incoming);
484488
box-shadow: var(--background-core-elevation-0);
485489
}
486490

487491
.str-chat__message-attachment {
488492
background-color: var(--chat-bg-incoming);
493+
494+
.str-chat__message-attachment__voice-recording-widget {
495+
padding: unset;
496+
padding-inline-end: var(--spacing-xxs);
497+
}
489498
}
490499
}
491500

src/components/Message/styling/Message.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,6 @@
167167
}
168168

169169
.str-chat__message.str-chat__message--has-single-attachment {
170-
&.str-chat__message--has-no-text {
171-
.str-chat__message-bubble {
172-
padding: 0;
173-
}
174-
}
175170
&.str-chat__message--has-giphy-attachment {
176171
.str-chat__message-bubble {
177172
padding: 0;
@@ -183,16 +178,6 @@
183178
}
184179
}
185180

186-
.str-chat__message.str-chat__message--has-single-attachment.str-chat__message--has-giphy-attachment {
187-
.str-chat__message-bubble {
188-
padding: 0;
189-
}
190-
191-
.str-chat__message-text {
192-
display: none;
193-
}
194-
}
195-
196181
.str-chat__message-mention {
197182
color: var(--str-chat__message-mention-color);
198183
font: var(--str-chat__body2-medium-text);

0 commit comments

Comments
 (0)