From 2df6ada71c956c978242f14fc9021d51085ee3cf Mon Sep 17 00:00:00 2001 From: Yash Gadia Date: Mon, 1 Jun 2026 03:18:27 +0530 Subject: [PATCH] fix: remove trailing space in formatting toolbar tooltips The Tooltip text template literal unconditionally inserted a space between the formatter name and the (optional) shortcut. For formatters without a keyboard shortcut (strike, code, multiline), `item.shortcut` is an empty string, so the tooltip rendered as "strike ", "code ", "multiline " with a trailing space. Made the space conditional so it only appears alongside an actual shortcut. Applied to both the main toolbar and the small-screen toolbar. Closes #1280 --- .../src/views/ChatInput/ChatInputFormattingToolbar.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js b/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js index a68dc340f..04e0fe634 100644 --- a/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js +++ b/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js @@ -216,7 +216,7 @@ const ChatInputFormattingToolbar = ({ ) : ( @@ -296,8 +296,10 @@ const ChatInputFormattingToolbar = ({ if (itemInFormatter) { return (