You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/design-guidelines.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ import "./images.css"
15
15
</div>
16
16
17
17
1.**Container:** The window that contains the entire ChatBot experience and all of its components.
18
-
1.**Header:** A persistent region at the top of the ChatBot window that contains navigation, branding, and actions.
19
-
1.**Chat history menu:** A menu that contains a history of previous chats.
18
+
1.**Header:** A persistent region at the top of the ChatBot window that contains chat history, branding, and actions.
19
+
1.**Chat history drawer:** A menu used to access previous chats.
20
20
1.**Options menu:** A menu that contains settings that are relevant to your product. This typically includes display options (more details in the [ChatBot variations section](#variations)) and other general settings (more details in the [ChatBot settings and preferences section](#chatbot-settings-and-preferences)).
21
21
1.**Messages:** Elements of the conversation between a ChatBot and user. More details can be found in the [message guidelines](#messages).
22
22
1.**Attachments:** Details about files that a user has uploaded to the ChatBot.
@@ -288,7 +288,7 @@ When a ChatBot is launched via an AI-supported action, the action should be sent
288
288
289
289
Each time a user begins a new chat, display a [welcome message](#welcome-message), with prompts that provide initial suggestions and indicate the actions that the ChatBot can take.
290
290
291
-
The default approach for users to create a new chat is by clicking the "New chat" button (which contains a "pen to square" icon) placed at the top of the [chat history menu](#using-the-chat-history-menu).
291
+
The default approach for users to create a new chat is by clicking the "New chat" button (which contains a "pen to square" icon) placed at the top of the [chat history drawer](#using-the-chat-history-drawer).
292
292
293
293
<divclass="ws-docs-content-img">
294
294

@@ -310,14 +310,12 @@ This can be done using the [quick response](/extensions/chatbot/messages#message
310
310

311
311
</div>
312
312
313
-
### Using the chat history menu
313
+
### Using the chat history drawer
314
314
315
-
The ChatBot history menu contains a log of a user's previous chats. Clicking the menu icon opens a side drawer in the ChatBot window.
316
-
317
-
By clicking into the history menu, users can search through previous conversations and perform additional actions, such as sharing a conversation with others.
315
+
The chat history drawer can be opened via the hamburger menu in the ChatBot header. In this drawer, users can search through previous conversations and perform additional actions, such as sharing a conversation with others.
318
316
319
317
<divclass="ws-docs-content-img">
320
-

318
+

321
319
</div>
322
320
323
321
When the chat history is still loading, display skeleton items:
@@ -383,16 +381,16 @@ If a message attachment fails, an error message should share the reason for fail
383
381
384
382
You can enable users to download chat transcripts, for their personal records or to share with others. When users choose to download a transcript, you can choose how you want to configure the behavior in your ChatBot.
385
383
386
-
For guidance, refer to our download transcripts demo, which opens a Markdown file for a conversation within a new tab.
384
+
For guidance, refer to our [chat transcripts demo](/extensions/chatbot/overview/demo#chat-transcripts), which opens a Markdown file for a conversation within a new tab.
387
385
388
386
Choose the download action location that best works for your ChatBot:
389
387
390
388
#### Download via chat history drawer
391
389
392
-
If your ChatBot uses a chat history drawer, you can provide a download option in the [actions menu linked to a previous conversation](/extensions/chatbot/ui#drawer-with-conversation-actions).
390
+
If your ChatBot uses chat history, you can provide a download option in the [actions menu linked to a previous conversation](/extensions/chatbot/ui#drawer-with-conversation-actions).
393
391
394
392
<divclass="ws-docs-content-img">
395
-

393
+

396
394
</div>
397
395
398
396
#### Download message response action
@@ -405,7 +403,7 @@ To allow users to download individual bot messages, the message actions can incl
405
403
406
404
#### Download control in header
407
405
408
-
If you don't use a chat history drawer, you can place an option to download the transcript for the active chat within the header options menu.
406
+
If you don't use chat history, you can place an option to download the transcript for the active chat within the header options menu.
409
407
410
408
<divclass="ws-docs-content-img">
411
409

Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,9 +189,9 @@ The ChatBot header is persistent, and contains the title for the ChatBot window,
189
189
190
190
The `<ChatbotHeader>` has 2 sections:
191
191
192
-
-`<ChatbotHeaderMain>` contains the title and an optional menu toggle or new chat button:
192
+
-`<ChatbotHeaderMain>` contains the title and an optional hamburger menu toggle or new chat button:
193
193
-`<ChatbotHeaderTitle>` handles the layout and display of a title or image at different responsive sizes.
194
-
-`<ChatbotHeaderMenu>` (optional) is placed on the left side of the header and used to toggle a chat history menu.
194
+
-`<ChatbotHeaderMenu>` (optional) is placed on the left side of the header and used to toggle a chat history drawer.
195
195
-`<ChatbotHeaderNewChatButton>` (optional) is placed on the left side of the header and used to initiate a new chat.
196
196
-`<ChatbotHeaderActions>` contains any additional controls:
197
197
- The `<ChatbotHeaderSelectorDropdown>` component is a standard PatternFly dropdown that matches the ChatBot styles.
@@ -227,8 +227,8 @@ There are a variety of options and customizations you can make to the header, to
227
227
228
228
In this example, select the respective checkbox to toggle these features:
229
229
230
-
-**Menu:** Users can select the menu toggle to open a menu of additional options or actions.
231
-
-**New chat button:** Used to start a new chat session. The header button can be used in addition to or in place of a new chat button within the [conversation history drawer](/extensions/chatbot/ui/#drawer-with-search-and-new-chat-button).
230
+
-**Chat history drawer:** Users can select the hamburger menu toggle to open the [chat history drawer](#chat-history).
231
+
-**New chat button:** Used to start a new chat session. The header button can be used in addition to or in place of a new chat button within the [chat history drawer](/extensions/chatbot/ui/#drawer-with-search-and-new-chat-button).
232
232
-**Left-aligned logo**
233
233
-**Centered logo**
234
234
-**Selector dropdown:** Users can choose from preselected options in a dropdown menu. For example, they can toggle between AI models.
@@ -339,11 +339,11 @@ This example shows a simplified method of handling the "thinking" animation: aft
339
339
340
340
```
341
341
342
-
## Navigation
342
+
## Chat history
343
343
344
-
### Side nav in a drawer
344
+
### Chat history drawer
345
345
346
-
The ChatBot conversation history is contained in an interactive drawer, where users can interact with previous conversations or start a new conversation.
346
+
A user's chat history is contained in an interactive drawer, where they can interact with previous conversations or start a new conversation.
347
347
348
348
The `<ChatbotConversationHistoryNav>` component is a wrapper placed within `<Chatbot>`, which contains all other ChatBot components in `drawerContent`. There is a focus trap so users can only tab within the drawer while it is open.
349
349
@@ -367,14 +367,14 @@ The code structure will look like this:
367
367
</Chatbot>
368
368
```
369
369
370
-
The conversation history drawer looks different depending on the `displayMode` of the parent `<Chatbot>`. (As shown in the [main ChatBot demo](/extensions/chatbot/overview/demo#basic-chatbot).):
370
+
The chat history drawer looks different depending on the `displayMode` of the parent `<Chatbot>` (as shown in the [main ChatBot demo](/extensions/chatbot/overview/demo#basic-chatbot).):
371
371
372
-
-`Default` and `docked` display modes display the conversation history on top of the rest of the ChatBot content, with a PatternFly backdrop between the drawer panel and drawer content.
373
-
-`Fullscreen` and `embedded` display modes display the conversation history in line with the drawer content.
372
+
-`Default` and `docked` display modes display the chat history on top of the rest of the ChatBot content, with a PatternFly backdrop between the drawer panel and drawer content.
373
+
-`Fullscreen` and `embedded` display modes display the chat history in line with the drawer content.
374
374
375
375
### Drawer with search and "new chat" button
376
376
377
-
In the conversation history drawer, users can search previous ChatBot conversations via an input field. To customize the placeholder text, use `searchInputPlaceholder`. Provide an aria label via `searchInputAriaLabel`.
377
+
In the chat history drawer, users can search previous ChatBot conversations via an input field. To customize the placeholder text, use `searchInputPlaceholder`. Provide an aria label via `searchInputAriaLabel`.
378
378
379
379
They can also start new conversations via a "New chat" button. To customize the button label, use `newChatButtonText`.
380
380
@@ -386,7 +386,7 @@ Both the search input field and "New chat" buttons are optional. The `reverseBut
386
386
387
387
### Drawer with search actions
388
388
389
-
You can customize the search experience within the conversation history drawer via the `searchActionStart` and `searchActionEnd` props, which provide additional search controls before and after the input field. These props are useful for adding filtering, sorting, or other search-related functionality.
389
+
You can customize the search experience within the chat history drawer via the `searchActionStart` and `searchActionEnd` props, which provide additional search controls before and after the input field. These props are useful for adding filtering, sorting, or other search-related functionality.
390
390
391
391
You can also add a visual divider between the drawer head and the title by setting `hasDrawerHeadDivider` to `true`.
392
392
@@ -404,15 +404,15 @@ Actions can be added to conversations with `menuItems`. Optionally, you can also
404
404
405
405
### Pinning conversations
406
406
407
-
To help users track important conversations, add a "pin" option to the conversation action menus. This action moves a conversation to a dedicated "pinned" section at the top of the history drawer for quick access. Pinned items should contain an "unpin" option, so that users can remove pinned conversations as needed.
407
+
To help users track important conversations, add a "pin" option to the conversation action menus. This action moves a conversation to a dedicated "pinned" section at the top of the chat history drawer for quick access. Pinned items should contain an "unpin" option, so that users can remove pinned conversations as needed.
408
408
409
409
```js file="./ChatbotHeaderDrawerWithPin.tsx"
410
410
411
411
```
412
412
413
-
### Renaming conversations in history drawer
413
+
### Renaming conversations in chat history drawer
414
414
415
-
You can allow users to rename a conversation in the history drawer by implementing a modal that opens upon clicking a "Rename" (or similar) action. When doing so, you must ensure the following:
415
+
You can allow users to rename a conversation in the chat history drawer by implementing a modal that opens upon clicking a "Rename" (or similar) action. When doing so, you must ensure the following:
416
416
417
417
- When the modal opens, focus is placed at the end of the text input.
418
418
- When the modal closes, focus goes back to the action toggle that was previously opened.
@@ -433,7 +433,7 @@ If you're showing a conversation that is already active, you can set the `active
433
433
434
434
### Resizable drawer
435
435
436
-
By default, the conversation history drawer has a fixed width (384px) and a focus trap. To provide users with more flexibility as they navigate their conversation history, or to better support embedded ChatBots on tablet-sized devices or smaller browser windows, you can instead make the drawer resizable. By default, even resizable drawers will still open to their full width on mobile devices.
436
+
By default, the chat history drawer has a fixed width (384px) and a focus trap. To provide users with more flexibility as they navigate their chat history, or to better support embedded ChatBots on tablet-sized devices or smaller browser windows, you can instead make the drawer resizable. By default, even resizable drawers will still open to their full width on mobile devices.
437
437
438
438
In this example, the drawer can be resized up to the max size of the parent and resized down to 200px wide. To customize this behavior further (including width, style, and focus behavior) use PatternFly [`<Drawer>` props](/components/drawer#props), [`<DrawerPanelContent>` props](/components/drawer/#drawerpanelcontent), or any other drawer subcomponents.
Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ This demo displays a basic ChatBot, which includes:
95
95
- Sending a message to the ChatBot.
96
96
- Receiving a response from a backend AI tool with a loading message state.
97
97
98
-
6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#navigation) toggled open and closed by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
98
+
6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#chat-history) toggled open and closed by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
99
99
100
100
7. A "Skip to chatbot" button that allows you to skip to the chatbot content via the [PatternFly skip to content component](/extensions/chatbot/ui#skip-to-content). To display this button you must tab into the main window.
101
101
@@ -126,7 +126,7 @@ This demo displays an embedded ChatBot. Embedded ChatBots are meant to be placed
126
126
-[Speech to text.](/extensions/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
127
127
- Sending a message to the ChatBot.
128
128
- Receiving a response from a backend AI tool with a loading message state.
129
-
6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
129
+
6. A [`<ChatbotConversationHistoryNav>`](/extensions/chatbot/ui#chat-history) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
130
130
131
131
```js file="./EmbeddedChatbot.tsx" isFullscreen
132
132
@@ -196,7 +196,7 @@ This demo illustrates how you could add downloadable transcripts to your ChatBot
196
196
197
197
A message transcript includes details from a single chat message. To download a sample message transcript in this demo, click the "Download" action under a bot message.
198
198
199
-
A conversation transcript includes details from the entirety of a ChatBot conversation. To download a sample conversation transcript in this demo, open the chat history menu and click "Download" in the options menu for the conversation.
199
+
A conversation transcript includes details from the entirety of a ChatBot conversation. To download a sample conversation transcript in this demo, open the chat history drawer and click "Download" in the options menu for the conversation.
200
200
201
201
In this example, file download is implemented with [file-saver](https://www.npmjs.com/package/file-saver).
0 commit comments