Skip to content

Commit 91febe0

Browse files
committed
fix bubble layout overflow
1 parent a623086 commit 91febe0

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: patch
3+
---
4+
5+
Fix bubble layout messages overflowing off the screen with embeds/images.

src/app/components/message/layout/Bubble.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>(
7070
{hideBubble ? (
7171
children
7272
) : (
73-
<Box>
73+
<Box className={css.BubbleWrapper}>
7474
<Box
7575
className={
7676
hideBubble

src/app/components/message/layout/layout.css.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,14 @@ export const BubbleBefore = style({
152152
minWidth: toRem(36),
153153
});
154154

155+
export const BubbleWrapper = style({
156+
maxWidth: '100%',
157+
minWidth: 0,
158+
});
159+
155160
export const BubbleContent = style({
156-
maxWidth: toRem(800),
161+
maxWidth: `min(${toRem(800)}, 100%)`,
162+
minWidth: 0,
157163
padding: config.space.S200,
158164
backgroundColor: color.SurfaceVariant.Container,
159165
color: color.SurfaceVariant.OnContainer,

0 commit comments

Comments
 (0)