feat: custom footer slots#1001
feat: custom footer slots#1001warrenmblood wants to merge 9 commits intocarbon-design-system:mainfrom
Conversation
✅ Deploy Preview for carbon-ai-chat-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-ai-chat-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ai-chat-components-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ethanwinters
left a comment
There was a problem hiding this comment.
Probably would be good to add a section under user defined responses to https://github.com/carbon-design-system/carbon-ai-chat/blob/main/packages/ai-chat/docs/React.md and the web component one, too.
| <Copy16 /> | ||
| </IconButton> | ||
| )} | ||
| {Boolean(additionalData?.allow_regenerate) && ( |
There was a problem hiding this comment.
Feels like we should make an issue to make a regeneration examples/react and examples/web-component and then apply those changes to the demo site as well... and maybe just remove this for now?
| return ( | ||
| <div className="cds-aichat--received--feedback"> | ||
| <div className="cds-aichat--message-footer"> | ||
| {customFooter} |
There was a problem hiding this comment.
Lets put the customFooter after the feedback buttons.
There was a problem hiding this comment.
My only reason for this ordering was to avoid the action buttons moving to the left when the feedback buttons don't persist. Now that I test it out it doesn't look bad, but here's what I mean:
Closes #646
Adds support for custom footer slots on assistant messages. This enables developers to insert any set of action buttons alongside the feedback buttons.
Changelog
New
BusEventCustomFooterSlotrenderCustomMessageFooteradded toChatContainerProps. This is the function called when a custom footer should be rendered.GenericItemMessageOptionssupports custom footersGenericItemCustomFooterSlotOptionsCustomFooterPortalsContainer.tsxcomponent to manage all custom footer slotsattachCustomFooterHandlerChanged
Removed
feedback-buttons.scssas styling now applied to container element with classcds-aichat--message-footerTesting / Reviewing