Open musale opened 1 year ago
Good call @musale
In a case where we want developers to provide their own logic to render the content (replace an adaptive card, for instance), we should provide a onUnsupportedContentRender
callback that developers can use to return a JSX element if required.
In a case where we want developers to provide their own logic to render the content (replace an adaptive card, for instance), we should provide a
onUnsupportedContentRender
callback that developers can use to return a JSX element if required.
~Good idea, we should make this its own issue.~ Update: https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/3122
Describe the bug Currently, rendering the
UnsupportedContent
component is done by stringifying the component and appending it as a string in the content property. This brings in state mutation of the props that is not advised.To Reproduce Steps to reproduce the behavior:
Expected behavior Rendered
UnsupportedContent
component as a react component. Wrap it inChatMessage
orChatMyMessage
components from@fluentui/react-components
. Add the chat message header customizations for a similar look to the rest of the messages. Remove any state mutations on the props passed inonRenderMessage
.Additional Context
ChatMessage
andChatMyMessage