-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump to PF6 and reorganize docs
- Loading branch information
1 parent
fdaa4b3
commit 6fa6e86
Showing
29 changed files
with
13,780 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...nt/extensions/virtual-assistant/examples/ConversationAlert/ConversationAlert.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# Sidenav top-level section | ||
# should be the same for all markdown files | ||
section: extensions | ||
subsection: Chat bots / AI | ||
# Sidenav secondary level section | ||
# should be the same for all markdown files | ||
id: Conversation alert | ||
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility) | ||
source: react | ||
# If you use typescript, the name of the interface to display props for | ||
# These are found through the sourceProps function provided in patternfly-docs.source.js | ||
propComponents: ['ConversationAlert'] | ||
sourceLink: https://github.com/patternfly/virtual-assistant/blob/main/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ConversationAlert/ConversationAlert.md | ||
--- | ||
|
||
import ConversationAlert from '@patternfly/virtual-assistant/dist/dynamic/ConversationAlert'; | ||
|
||
The **conversation alert** component renders an alert to be used in the body of the virtual assistant. | ||
|
||
### Conversation Alert | ||
|
||
You can configure a custom title and variant input value using `title` and `variant` props. | ||
|
||
```js file="./ConversationAlertBasic.tsx" | ||
|
||
``` |
8 changes: 8 additions & 0 deletions
8
...ontent/extensions/virtual-assistant/examples/ConversationAlert/ConversationAlertBasic.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import ConversationAlert from '@patternfly/virtual-assistant/dist/esm/ConversationAlert' | ||
|
||
export const BasicExample: React.FunctionComponent = () => ( | ||
<ConversationAlert title="You can start a new conversation at any time by typing below."> | ||
You can add any body content | ||
</ConversationAlert> | ||
); |
5 changes: 2 additions & 3 deletions
5
...les/VirtualAssistant/AssistantMessage.tsx → ...nt/examples/Messages/AssistantMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import React from 'react'; | ||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
import AssistantMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/AssistantMessageEntry'; | ||
import GrinIcon from '@patternfly/react-icons/dist/js/icons/bacon-icon'; | ||
|
||
export const AssistantMessage: React.FunctionComponent = () => ( | ||
<VirtualAssistant> | ||
<> | ||
<AssistantMessageEntry> | ||
How may I help you today? Do you have some question for me? | ||
</AssistantMessageEntry> | ||
<AssistantMessageEntry icon={GrinIcon}> | ||
Assistant message example with custom icon | ||
</AssistantMessageEntry> | ||
</VirtualAssistant> | ||
</> | ||
); |
11 changes: 11 additions & 0 deletions
11
...s/content/extensions/virtual-assistant/examples/Messages/AssistantMessageWithFollowup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import AssistantMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/AssistantMessageEntry'; | ||
|
||
export const AssistantMessage: React.FunctionComponent = () => ( | ||
<AssistantMessageEntry | ||
// eslint-disable-next-line no-console | ||
options={[ { title: "Option #1", props: { onClick: () => {console.log('This is an example of onClick event')} } }, { title: "Option #2" }, { title: "Option #3" } ]} | ||
> | ||
How may I help you today? Do you have some question for me? | ||
</AssistantMessageEntry> | ||
); |
65 changes: 65 additions & 0 deletions
65
...ternfly-docs/content/extensions/virtual-assistant/examples/Messages/Messages.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
# Sidenav top-level section | ||
# should be the same for all markdown files | ||
section: extensions | ||
subsection: Chat bots / AI | ||
# Sidenav secondary level section | ||
# should be the same for all markdown files | ||
id: Messages | ||
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility) | ||
source: react | ||
# If you use typescript, the name of the interface to display props for | ||
# These are found through the sourceProps function provided in patternfly-docs.source.js | ||
propComponents: ['UserMessageEntry', 'AssistantMessageEntry', 'LoadingMessage', 'SystemMessageEntry',] | ||
sourceLink: https://github.com/patternfly/virtual-assistant/blob/main/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Messages/Messages.md | ||
--- | ||
|
||
import SystemMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/SystemMessageEntry'; | ||
import LoadingMessage from '@patternfly/virtual-assistant/dist/dynamic/LoadingMessage'; | ||
import AssistantMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/AssistantMessageEntry'; | ||
import UserMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/UserMessageEntry'; | ||
import { GrinIcon } from '@patternfly/react-icons'; | ||
import { AngleDownIcon } from '@patternfly/react-icons'; | ||
|
||
|
||
### System Message Entry | ||
|
||
The `SystemMessageEntry` component provides a simple system message with an option for text links. | ||
|
||
|
||
```js file="./VirtualAssistantSystemMessageEntry.tsx" | ||
|
||
``` | ||
|
||
### Loading Messages | ||
|
||
The `LoadingMessage` component shows a typing indicator for messages still being processed, introducing an intentional delay to simulate a smoother flow of conversation. Additionally, it allows for the use of a custom icon through the `icon` property. | ||
|
||
|
||
```js file="./VirtualAssistantLoadingMessage.tsx" | ||
|
||
``` | ||
|
||
### Assistant Message | ||
|
||
This is an example of a message sent by assistant. Additionally, it allows for the use of a custom icon through the `icon` property. | ||
|
||
```js file="./AssistantMessage.tsx" | ||
|
||
``` | ||
|
||
### Assistant Message with follow-up options | ||
|
||
This is an example of a message sent by assistant with follow-up options. Follow-up options are defined within `options` property. | ||
|
||
```js file="./AssistantMessageWithFollowup.tsx" | ||
|
||
``` | ||
|
||
### User Message | ||
|
||
This is an example of a message sent by user. Additionally, it allows for the use of a custom icon through the `icon` property. | ||
|
||
```js file="./UserMessage.tsx" | ||
|
||
``` |
5 changes: 2 additions & 3 deletions
5
...examples/VirtualAssistant/UserMessage.tsx → ...sistant/examples/Messages/UserMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import React from 'react'; | ||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
import UserMessageEntry from '@patternfly/virtual-assistant/dist/dynamic/UserMessageEntry'; | ||
import GrinIcon from '@patternfly/react-icons/dist/js/icons/bacon-icon'; | ||
|
||
export const UserMessage: React.FunctionComponent = () => ( | ||
<VirtualAssistant> | ||
<> | ||
<UserMessageEntry>Hello, can you help me?</UserMessageEntry> | ||
<UserMessageEntry icon={GrinIcon}>User message example with custom icon</UserMessageEntry> | ||
</VirtualAssistant> | ||
</> | ||
); |
5 changes: 2 additions & 3 deletions
5
...istant/VirtualAssistantLoadingMessage.tsx → ...ssages/VirtualAssistantLoadingMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import React from 'react'; | ||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
import LoadingMessage from '@patternfly/virtual-assistant/dist/esm/LoadingMessage' | ||
import GrinIcon from '@patternfly/react-icons/dist/js/icons/bacon-icon'; | ||
|
||
export const BasicExample: React.FunctionComponent = () => ( | ||
<VirtualAssistant > | ||
<> | ||
<LoadingMessage /> | ||
<LoadingMessage icon={GrinIcon} /> | ||
</VirtualAssistant> | ||
</> | ||
); |
6 changes: 6 additions & 0 deletions
6
...ent/extensions/virtual-assistant/examples/Messages/VirtualAssistantSystemMessageEntry.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import SystemMessageEntry from '@patternfly/virtual-assistant/dist/esm/SystemMessageEntry' | ||
|
||
export const BasicExample: React.FunctionComponent = () => ( | ||
<SystemMessageEntry>End of conversation.</SystemMessageEntry> | ||
); |
14 changes: 0 additions & 14 deletions
14
...t/extensions/virtual-assistant/examples/VirtualAssistant/AssistantMessageWithFollowup.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
...ensions/virtual-assistant/examples/VirtualAssistant/VirtualAssistantConversationAlert.tsx
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...nsions/virtual-assistant/examples/VirtualAssistant/VirtualAssistantSystemMessageEntry.tsx
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...ternfly-docs/content/extensions/virtual-assistant/examples/demos/VirtualAssistantDemo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
|
||
export const BasicDemo: React.FunctionComponent = () => ( | ||
<VirtualAssistant /> | ||
); |
25 changes: 25 additions & 0 deletions
25
...le/patternfly-docs/content/extensions/virtual-assistant/examples/demos/demos.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
# Sidenav top-level section | ||
# should be the same for all markdown files | ||
section: extensions | ||
subsection: Chat bots / AI | ||
# Sidenav secondary level section | ||
# should be the same for all markdown files | ||
id: Virtual assistant | ||
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility) | ||
source: react-demos | ||
sourceLink: https://github.com/patternfly/virtual-assistant/blob/main/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/demos.md | ||
--- | ||
|
||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
|
||
# Demos | ||
|
||
### Basic example | ||
|
||
A blank example of the virtual assistant body. | ||
|
||
```js file="./VirtualAssistantDemo.tsx" isFullscreen | ||
|
||
``` | ||
|
Oops, something went wrong.