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/examples/Messages/Messages.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,14 +95,16 @@ For example, you can use the default divider to display a "timestamp" for more s
95
95
96
96
### Message actions
97
97
98
-
You can add actions to a message, to allow users to interact with the message content. These actions can include:
98
+
To let users interact with a bot's responses, you can add support for message actions. While you can customize message actions to your needs, default options include the following:
99
99
100
-
-Feedback responses that allow users to rate a message as "good" or "bad".
101
-
- Copy and share controls that allow users to share the message content with others.
102
-
-An edit action to allow users to edit a message they previously sent. This should only be applied to user messages - see the [user messages example](#user-messages) for details on how to implement this action.
103
-
-A listen action, that will read the message content out loud.
100
+
-Positive and negative feedback: Allows users to rate a message as "good" or "bad."
101
+
- Copy: Allows users to copy the message content to their clipboard.
102
+
-Download: Allows users to download the message content.
103
+
-Listen: Reads the message content out loud using text-to-speech.
104
104
105
-
**Note:** The logic for the actions is not built into the component and must be implemented by the consuming application.
105
+
You can display message actions by default, or use the `showActionsOnInteraction` prop to reveal actions on hover or keyboard focus.
106
+
107
+
**Note**: The underlying logic for these actions is not built-in and must be implemented within the consuming application.
106
108
107
109
```js file="./MessageWithResponseActions.tsx"
108
110
@@ -140,11 +142,10 @@ When `persistActionSelection` is `true`:
140
142
141
143
### Message actions that fill
142
144
143
-
To provide enhanced visual feedback when users interact with response actions, you can enable icon swapping by setting `useFilledIconsOnClick` to `true`. When enabled, the predefined "positive" and "negative" actions will automatically swap to their filled icon counterparts when clicked, replacing the original outlined icon variants.
145
+
To provide enhanced visual feedback when users interact with response actions, you can enable icon swapping by setting `useFilledIconsOnClick` to `true`. When enabled, the predefined "positive" and "negative" actions will automatically swap to their filled icon counterparts when clicked, replacing the original outlined icon variants.
144
146
145
147
This is especially useful for actions that are intended to persist (such as the "positive" and "negative" responses), so that a user's selection is more clear and emphasized.
0 commit comments