-
Notifications
You must be signed in to change notification settings - Fork 34
feat(Messages): allowed more composable structures #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Preview: https://chatbot-pr-chatbot-785.surge.sh A11y report: https://chatbot-pr-chatbot-785-a11y.surge.sh |
edonehoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of small tweaks, but looks pretty good as it is!
| When creating custom message structures, you must follow an intended composable structure: | ||
|
|
||
| 1. **Message content and actions** must be wrapped in `<MessageAndActions>`. This includes, but is not limited to: | ||
|
|
||
| - `<MarkdownContent>` - For rendering markdown or plain text content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| When creating custom message structures, you must follow an intended composable structure: | |
| 1. **Message content and actions** must be wrapped in `<MessageAndActions>`. This includes, but is not limited to: | |
| - `<MarkdownContent>` - For rendering markdown or plain text content | |
| When creating custom message structures, you must follow an intended composable structure. | |
| 1. **Message content and actions:** Wrap in `<MessageAndActions>`. This includes, but is not limited to: | |
| - `<MarkdownContent>`: For rendering markdown or plain text content |
formatting changes - might look a little funky, but is technically consistent with other docs
| 2. **File attachments** must be placed outside `<MessageAndActions>`, wrapped in attachment containers: | ||
| - `<MessageAttachmentsContainer>` - Container for all attachments | ||
| - `<MessageAttachmentItem>` - Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. **File attachments** must be placed outside `<MessageAndActions>`, wrapped in attachment containers: | |
| - `<MessageAttachmentsContainer>` - Container for all attachments | |
| - `<MessageAttachmentItem>` - Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) | |
| 2. **File attachments:** Placed outside `<MessageAndActions>` and wrapped in attachment containers: | |
| - `<MessageAttachmentsContainer>`: Container for all attachments | |
| - `<MessageAttachmentItem>`: Individual attachment wrapper (contains `<FileDetailsLabel>` or other attachment components) |
| /> | ||
| <ToolCall titleText="Calling 'more_awesome_tool'" loadingText="Loading 'more_awesome_tool'" isLoading={true} /> | ||
| <ToolCall titleText="Calling 'even_more_awesome_tool'" loadingText="Loading 'even_more_awesome_tool'" /> | ||
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
| content={`You can even place a message loading state in the middle of a message, as seen above.`} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| content={`You can even place a message loading state in the middle of a message, as seen above.`} | |
| /> | |
| content={`You can even place a message loading state in the middle of a message:`} | |
| /> | |
| <MessageLoading loadingWord="Loading something in the middle of a custom structured message" /> |
could we reorder this to place the loading thing after this line, so that we can avoid saying "above"?
28674f6 to
ccb4163
Compare
edonehoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
|
🎉 This PR is included in version 6.5.0-prerelease.28 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #679 and closes #678
New custom message structure example