From e2ccc22d2a75e479a671ddcaada58b09244118b2 Mon Sep 17 00:00:00 2001 From: Eric Olkowski Date: Wed, 3 Jun 2026 15:05:23 -0400 Subject: [PATCH] fix(MessageBar): removed gradient and thinking animation --- .../UI/ChatbotMessageBarIndicatorThinking.tsx | 15 --------------- .../content/extensions/chatbot/examples/UI/UI.md | 10 ---------- .../module/src/MessageBar/MessageBar.test.tsx | 12 ------------ packages/module/src/MessageBar/MessageBar.tsx | 8 -------- 4 files changed, 45 deletions(-) delete mode 100644 packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx b/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx deleted file mode 100644 index 6b7c63e4e..000000000 --- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { FunctionComponent, useState } from 'react'; -import { MessageBar } from '@patternfly/chatbot/dist/dynamic/MessageBar'; - -export const ChatbotMessageBarIndicatorThinking: FunctionComponent = () => { - const [isThinking, setIsThinking] = useState(false); - const handleSend = (_message: string | number) => { - setIsThinking(true); - - setTimeout(() => { - setIsThinking(false); - }, 10000); - }; - - return ; -}; diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md b/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md index b61ea4dc7..42268f667 100644 --- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +++ b/packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md @@ -329,16 +329,6 @@ To enable the stop button, set `hasStopButton` to `true` and pass in a `handleSt ``` -### Message bar with AI indicator styles - -To add a more pronounced AI indicator style to the message bar, pass `hasAiIndicator` to the `` component. You can also enable a "thinking" animation by passing in `isThinking`. - -This example shows a simplified method of handling the "thinking" animation: after a user sends a message, the `isThinking` property is set to `true` to trigger the animation, then returns to `false` after 10 seconds to halt the animation. - -```ts file="./ChatbotMessageBarIndicatorThinking.tsx" isBeta - -``` - ## Chat history ### Chat history drawer diff --git a/packages/module/src/MessageBar/MessageBar.test.tsx b/packages/module/src/MessageBar/MessageBar.test.tsx index 279215013..2e970e2b2 100644 --- a/packages/module/src/MessageBar/MessageBar.test.tsx +++ b/packages/module/src/MessageBar/MessageBar.test.tsx @@ -477,18 +477,6 @@ describe('Message bar', () => { expect(container.querySelector('.pf-m-primary')).toBeTruthy(); }); - it('Renders with class pf-v6-m-ai-indicator when hasAiIndicator is true', () => { - render(); - - expect(screen.getByRole('textbox').closest('.pf-chatbot__message-bar')).toHaveClass('pf-v6-m-ai-indicator'); - }); - - it('Renders with class pf-v6-m-thinking when isThinking is true', () => { - render(); - - expect(screen.getByRole('textbox').closest('.pf-chatbot__message-bar')).toHaveClass('pf-v6-m-thinking'); - }); - it('Renders with flex-basis of auto by default', () => { render(); diff --git a/packages/module/src/MessageBar/MessageBar.tsx b/packages/module/src/MessageBar/MessageBar.tsx index 3ac5fa144..70a868b89 100644 --- a/packages/module/src/MessageBar/MessageBar.tsx +++ b/packages/module/src/MessageBar/MessageBar.tsx @@ -122,10 +122,6 @@ export interface MessageBarProps extends Omit { additionalActions?: React.ReactNode; /** Flag indicating whether a multiline layout for the message input and actions should be forced. This can be used to always render actions below the message input. */ forceMultilineLayout?: boolean; - /** @beta Flag indicating whether the message bar has an AI indicator border. */ - hasAiIndicator?: boolean; - /** @beta Flag indicating whether the chatbot is thinking in response to a query, adding an animation to the message bar. */ - isThinking?: boolean; } export const MessageBarBase: FunctionComponent = ({ @@ -160,8 +156,6 @@ export const MessageBarBase: FunctionComponent = ({ isPrimary, additionalActions, forceMultilineLayout = false, - hasAiIndicator, - isThinking, ...props }: MessageBarProps) => { // Text Input @@ -539,8 +533,6 @@ export const MessageBarBase: FunctionComponent = ({ className={css( 'pf-chatbot__message-bar', isPrimary && 'pf-m-primary', - hasAiIndicator && 'pf-v6-m-ai-indicator', - isThinking && 'pf-v6-m-thinking', isMultiline && 'pf-m-multiline', className )}