Skip to content

Commit 11cc0d2

Browse files
Merge pull request #850 from kmcfaul/chatbot-bot-icon
feat(Message): add default bot message avatar
2 parents d4ea0a4 + fb272cd commit 11cc0d2

41 files changed

Lines changed: 135 additions & 213 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 56 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
"@babel/preset-react": "^7.23.3",
4040
"@babel/preset-typescript": "^7.23.3",
4141
"@octokit/rest": "^18.0.0",
42-
"@patternfly/documentation-framework": "^6.44.0",
43-
"@patternfly/patternfly": "^6.5.2",
44-
"@patternfly/react-icons": "^6.5.1",
45-
"@patternfly/react-table": "^6.5.1",
42+
"@patternfly/documentation-framework": "^6.47.0",
43+
"@patternfly/patternfly": "^6.6.0",
44+
"@patternfly/react-icons": "^6.6.0",
45+
"@patternfly/react-table": "^6.6.0",
4646
"@swc/core": "1.3.96",
4747
"@testing-library/dom": "^9.3.4",
4848
"@testing-library/jest-dom": "^6.4.2",
@@ -92,6 +92,5 @@
9292
},
9393
"dependencies": {
9494
"react-dropzone": "^14.3.8"
95-
},
96-
"packageManager": "yarn@4.5.0+sha512.837566d24eec14ec0f5f1411adb544e892b3454255e61fdef8fd05f3429480102806bac7446bc9daff3896b01ae4b62d00096c7e989f1596f2af10b927532f39"
95+
}
9796
}

packages/module/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"tag": "prerelease"
3434
},
3535
"dependencies": {
36-
"@patternfly/react-code-editor": "^6.5.1",
37-
"@patternfly/react-core": "^6.5.1",
38-
"@patternfly/react-icons": "^6.5.1",
39-
"@patternfly/react-styles": "^6.5.1",
40-
"@patternfly/react-table": "^6.5.1",
36+
"@patternfly/react-code-editor": "^6.6.0",
37+
"@patternfly/react-core": "^6.6.0",
38+
"@patternfly/react-icons": "^6.6.0",
39+
"@patternfly/react-styles": "^6.6.0",
40+
"@patternfly/react-table": "^6.6.0",
4141
"@segment/analytics-next": "^1.76.0",
4242
"clsx": "^2.1.0",
4343
"path-browserify": "^1.0.1",
@@ -66,8 +66,8 @@
6666
},
6767
"devDependencies": {
6868
"@octokit/rest": "^18.0.0",
69-
"@patternfly/documentation-framework": "^6.44.0",
70-
"@patternfly/patternfly": "^6.5.2",
69+
"@patternfly/documentation-framework": "^6.47.0",
70+
"@patternfly/patternfly": "^6.6.0",
7171
"@patternfly/patternfly-a11y": "^5.0.0",
7272
"@types/dom-speech-recognition": "^0.0.4",
7373
"@types/react": "^18.2.61",

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
Ref
99
} from 'react';
1010
import Message from '@patternfly/chatbot/dist/dynamic/Message';
11-
import patternflyAvatar from './patternfly_avatar.jpg';
1211
import squareImg from './PF-social-color-square.svg';
1312
import {
1413
AlertActionLink,
@@ -290,25 +289,18 @@ _Italic text, formatted with single underscores_
290289

291290
return (
292291
<>
292+
<Message name="Bot" role="bot" content={`This is a text-based message from a bot named "Bot."`} />
293293
<Message
294294
name="Bot"
295295
role="bot"
296-
avatar={patternflyAvatar}
297-
content={`This is a text-based message from a bot named "Bot."`}
298-
/>
299-
<Message
300-
name="Bot"
301-
role="bot"
302-
avatar={patternflyAvatar}
303296
content={`This is a text-based message from "Bot," with an updated timestamp.`}
304297
timestamp="1 hour ago"
305298
/>
306-
<Message name="Bot" role="bot" avatar={patternflyAvatar} content="Example content" isLoading />
307-
<Message role="bot" avatar={patternflyAvatar} content="This message is from a nameless bot." />
299+
<Message name="Bot" role="bot" content="Example content" isLoading />
300+
<Message role="bot" content="This message is from a nameless bot." />
308301
<Message
309302
name="Default Openshift Container Platform Assistant That Can Help With Any Query You Might Need Help With"
310303
role="bot"
311-
avatar={patternflyAvatar}
312304
content="This is a message from a bot with really long name: it's truncated!"
313305
/>
314306
<Message
@@ -322,7 +314,6 @@ _Italic text, formatted with single underscores_
322314
<Message
323315
name="Bot"
324316
role="bot"
325-
avatar={patternflyAvatar}
326317
isMetadataVisible={false}
327318
content="This is a message from a bot with metadata not visible."
328319
/>
@@ -355,7 +346,6 @@ _Italic text, formatted with single underscores_
355346
<Message
356347
name="Bot"
357348
role="bot"
358-
avatar={patternflyAvatar}
359349
content={renderContent()}
360350
tableProps={
361351
variant === 'Table' ? { 'aria-label': 'App information and user roles for bot messages' } : undefined

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithClickedResponseActions.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { FunctionComponent } from 'react';
22

33
import Message from '@patternfly/chatbot/dist/dynamic/Message';
4-
import patternflyAvatar from './patternfly_avatar.jpg';
54

65
export const ResponseActionClickedExample: FunctionComponent = () => (
76
<Message
87
name="Bot"
98
role="bot"
10-
avatar={patternflyAvatar}
119
content="I updated your account with those settings. You're ready to set up your first dashboard!"
1210
actions={{
1311
// eslint-disable-next-line no-console

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { FunctionComponent } from 'react';
22

33
import Message from '@patternfly/chatbot/dist/dynamic/Message';
4-
import patternflyAvatar from './patternfly_avatar.jpg';
54
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
65
import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
76

87
export const CustomActionExample: FunctionComponent = () => (
98
<Message
109
name="Bot"
1110
role="bot"
12-
avatar={patternflyAvatar}
1311
content="I updated your account with those settings. You're ready to set up your first dashboard!"
1412
actions={{
1513
regenerate: {

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomStructure.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import ToolCall from '@patternfly/chatbot/dist/dynamic/ToolCall';
1111
import ToolResponse from '@patternfly/chatbot/dist/dynamic/ToolResponse';
1212
import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel';
1313
import ResponseActions, { ResponseActionsGroups } from '@patternfly/chatbot/dist/dynamic/ResponseActions';
14-
import patternflyAvatar from './patternfly_avatar.jpg';
1514
import userAvatar from './user_avatar.svg';
1615

1716
const handlePositiveResponse = () => {
@@ -36,7 +35,7 @@ const handleListen = () => {
3635

3736
export const MessageWithCustomStructure: FunctionComponent = () => (
3837
<>
39-
<Message name="Bot" role="bot" avatar={patternflyAvatar}>
38+
<Message name="Bot" role="bot">
4039
<MessageAndActions>
4140
<MarkdownContent
4241
content={`This is a basic message with a more custom, fine-tuned structure. You can pass markdown to the MarkdownContent component, such as **bold content with double asterisks** or _italic content with single underscores_.`}

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithDeepThinking.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { FunctionComponent } from 'react';
22
import Message from '@patternfly/chatbot/dist/dynamic/Message';
3-
import patternflyAvatar from './patternfly_avatar.jpg';
43

54
export const MessageWithDeepThinkingExample: FunctionComponent = () => (
65
<>
76
<Message
87
name="Bot"
98
role="bot"
10-
avatar={patternflyAvatar}
119
content="This example has a body description that's within the recommended limit of 2 lines."
1210
deepThinking={{
1311
toggleContent: 'Show thinking',
@@ -18,7 +16,6 @@ export const MessageWithDeepThinkingExample: FunctionComponent = () => (
1816
<Message
1917
name="Bot"
2018
role="bot"
21-
avatar={patternflyAvatar}
2219
content="This example has deep thinking that is collapsed by default:"
2320
deepThinking={{
2421
isDefaultExpanded: false,
@@ -30,7 +27,6 @@ export const MessageWithDeepThinkingExample: FunctionComponent = () => (
3027
<Message
3128
name="Bot"
3229
role="bot"
33-
avatar={patternflyAvatar}
3430
content="This example has deep thinking that is loading:"
3531
deepThinking={{
3632
isDefaultExpanded: false,

0 commit comments

Comments
 (0)