Skip to content

Commit cda10eb

Browse files
committed
feat(ChatBotFooter/MessageBar): Add white background variants
Request from OpenShift AI since they have more complex embedded layouts.
1 parent e1092d3 commit cda10eb

File tree

8 files changed

+502
-9
lines changed

8 files changed

+502
-9
lines changed

packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,27 @@ This demo displays an embedded ChatBot. Embedded ChatBots are meant to be placed
118118

119119
```
120120

121+
### Embedded ChatBot with Primary Background
122+
123+
This demo displays an embedded ChatBot with a primary background color. Embedded ChatBots are meant to be placed within a page in your product. This demo includes:
124+
125+
1. A [PatternFly page](/components/page) with a sidebar, "Skip to chatbot" button, and masthead. To display the "Skip to chatbot" button you must tab into the main window.
126+
2. A [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
127+
3. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>`
128+
4. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
129+
- A `<ChatbotWelcomePrompt>`
130+
- An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages/#message-actions)
131+
- Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
132+
5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
133+
- [Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
134+
- Sending a message to the ChatBot.
135+
- Receiving a response from a backend AI tool with a loading message state.
136+
6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
137+
138+
```js file="./WhiteEmbeddedChatbot.tsx" isFullscreen
139+
140+
```
141+
121142
### Inline drawer ChatBot
122143

123144
This demo displays a ChatBot in a static, inline drawer. This demo includes:
@@ -137,9 +158,9 @@ This demo showcases how the ChatBot can be rendered in different display modes t
137158

138159
1. The ability to switch between overlay, drawer, and fullscreen modes using the [`<ChatbotHeaderOptionsDropdown>`](/patternfly-ai/chatbot/ui#header-options) in the header.
139160
2. A conditional page layout that renders the ChatBot for each display mode option:
140-
- **Overlay:** As a floating window on top of the page content.
141-
- **Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
142-
- **Fullscreen:** As a top-level component that covers the entire screen for an embedded experience.
161+
- **Overlay:** As a floating window on top of the page content.
162+
- **Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
163+
- **Fullscreen:** As a top-level component that covers the entire screen for an embedded experience.
143164
3. Logic to show or hide the `<ChatbotToggle>` button, which is only present in the default overlay mode.
144165
4. A [basic ChatBot](#basic-chatbot) with a header, welcome prompt, and message bar to populate the different layouts.
145166

@@ -170,7 +191,7 @@ Your code structure should look like this:
170191

171192
### Chat transcripts
172193

173-
This demo illustrates how you could add downloadable transcripts to your ChatBot, which outline conversation details in a Markdown file. This approach allows users to easily share information from a conversation with others.
194+
This demo illustrates how you could add downloadable transcripts to your ChatBot, which outline conversation details in a Markdown file. This approach allows users to easily share information from a conversation with others.
174195

175196
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.
176197

0 commit comments

Comments
 (0)