Skip to content

Commit a43f9b4

Browse files
Bil0000ipanasenkojuliusmarminge
authored
fix(web): preserve snapshot preview size in sent messages (#11429)
Co-authored-by: Illia Panasenko <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
1 parent 5349522 commit a43f9b4

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎apps/web/src/components/chat/MessagesTimeline.test.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ describe("MessagesTimeline", () => {
700700
expect(markup).toContain("t3code — Tests");
701701
expect(markup).toContain('src="data:image/png;base64,aWNvbg=="');
702702
expect(markup).toContain("h-28 w-52 max-w-full");
703-
expect(markup).not.toContain("col-span-2");
704703
expect(onAnchorReady).toHaveBeenCalledOnce();
705704
expect(onAnchorReady).toHaveBeenCalledWith(firstEntry.message.id, 0);
706705
});

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message"
15691569
className={cn(
15701570
"bg-background/70",
15711571
image.source?.kind === "snap-shot" && image.previewUrl
1572-
? SNAP_SHOT_ATTACHMENT_FRAME_CLASS
1572+
? cn(SNAP_SHOT_ATTACHMENT_FRAME_CLASS, "col-span-2")
15731573
: "aspect-[4/3] overflow-hidden rounded-lg border border-border/80",
15741574
)}
15751575
>

0 commit comments

Comments
 (0)