From f82f84c660721bbaf980fac38c576a5b3a7edf50 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:12:40 -0600 Subject: [PATCH] Render message preview in single line Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com> --- .../pinned-messages/PinnedMessagesBar.dom.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx index c5d4c18290..e08280aa4c 100644 --- a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx +++ b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx @@ -18,6 +18,7 @@ import { import type { HydratedBodyRangesType } from '../../../types/BodyRange.std.js'; import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; import { missingCaseError } from '../../../util/missingCaseError.std.js'; +import { stripNewlinesForLeftPane } from '../../../util/stripNewlinesForLeftPane.std.js'; export type PinMessageText = Readonly<{ body: string; @@ -483,6 +484,11 @@ function MessageTextPreview(props: { text: PinMessageText; }) { const { i18n } = props; + + const messagePreview = useMemo(() => { + return stripNewlinesForLeftPane(props.text.body); + }, [props.text.body]); + return ( null}