feat(ToolResponse): Add component#662
Conversation
|
Preview: https://chatbot-pr-chatbot-662.surge.sh A11y report: https://chatbot-pr-chatbot-662-a11y.surge.sh |
99697fb to
774181e
Compare
774181e to
7802691
Compare
| '--pf-v6-c-expandable-section__content--Opacity': '1', | ||
| '--pf-v6-c-expandable-section__content--PaddingInlineStart': 0, | ||
| '--pf-v6-c-expandable-section__content--TranslateY': 0, | ||
| '--pf-v6-c-expandable-section--m-expand-top__content--TranslateY': 0 |
There was a problem hiding this comment.
edonehoo
left a comment
There was a problem hiding this comment.
feel free to adjust my suggestions based on what's the most accurate! I wasn't sure, but wanted to leave some direction for replacing the lorem ipsum text
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
d706b7b to
fc2e132
Compare
edonehoo
left a comment
There was a problem hiding this comment.
just making the other Tool name instances to be toolName, but if others prefer Tool name we can switch all those back 👍
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
07e25d3 to
8fe284b
Compare
...ule/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx
Outdated
Show resolved
Hide resolved
| collapsedToggleText: string; | ||
| /** Toggle text shown on expandable section when it is expanded */ | ||
| expandedToggleText: string; |
There was a problem hiding this comment.
Would we want to expose both of these props on this base component, or instead just expose toggleContent and allow consumers to pass in these via the expandableSectionProps? At least in the example above it doesn't make sense to pass both of these in when the text remains the same.
There was a problem hiding this comment.
Good call-out! All set!
| <Card isCompact className="pf-chatbot__tool-response" {...cardProps}> | ||
| <CardBody {...cardBodyProps}> | ||
| <ExpandableSection | ||
| toggleText={isExpanded ? expandedToggleText : collapsedToggleText} |
There was a problem hiding this comment.
Couple nits:
- maybe using toggleContent instead? idk if we plan to deprecate toggleText, but toggleContent does what toggleText does but more)
- if we want to keep the 2 toggle props for expanded and collapsed, any reason to not pass those to the respective expanded/collapsedToggleText props instead?
There was a problem hiding this comment.
Also a good call-out and also all set!
Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com>
1c25c1a to
52b3730
Compare
|
🎉 This PR is included in version 6.4.0-prerelease.17 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Added new tool response component with demo and tests.
Here are some screenshots in situ:



Demo: https://chatbot-pr-chatbot-662.surge.sh/patternfly-ai/chatbot/messages#messages-with-tool-responses