From 02da7382c358674c9d4c1b429b2d634d73e803e9 Mon Sep 17 00:00:00 2001 From: JoshuaLai <9044372+JoshuaLai@users.noreply.github.com> Date: Fri, 6 Sep 2024 17:10:32 -0400 Subject: [PATCH] [Storybook] Fixing outstanding bugs found in MessageThread page (#5123) --- .../storybook8/stories/Components/MessageThread/Docs.mdx | 7 ++++++- .../stories/Components/MessageThread/index.stories.tsx | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/storybook8/stories/Components/MessageThread/Docs.mdx b/packages/storybook8/stories/Components/MessageThread/Docs.mdx index bf56ae5f9d..fc4d194524 100644 --- a/packages/storybook8/stories/Components/MessageThread/Docs.mdx +++ b/packages/storybook8/stories/Components/MessageThread/Docs.mdx @@ -36,6 +36,11 @@ MessageThread internally uses the `Chat` & `ChatMessage` components from `@fluen checkout the details about these components [here](https://microsoft.github.io/fluentui-contrib/react-chat/?path=/story/chat--default). +The MessageThread component supports lazy loading for the rich text editor used for editing messages. This means +that the rich text editor and its dependencies can be excluded from the bundle if they're not required, +utilizing tree-shaking techniques such as [the sideEffects +option](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free) in webpack. + ## Importing ```ts @@ -177,7 +182,7 @@ icon shown below. ### Advanced Usage: Customizing Attachment Rendering - + The MessageThread component also supports multiple ways to customize the rendering. You can leverage the `attachmentOptions.downloadOptions` props to provide a dynamic list of menu action buttons that will be based diff --git a/packages/storybook8/stories/Components/MessageThread/index.stories.tsx b/packages/storybook8/stories/Components/MessageThread/index.stories.tsx index 40dc48d3a4..9653be40b0 100644 --- a/packages/storybook8/stories/Components/MessageThread/index.stories.tsx +++ b/packages/storybook8/stories/Components/MessageThread/index.stories.tsx @@ -95,7 +95,7 @@ export const RichTextEditorOnPasteTextDocsOnly = { }; // Main story meta export -const meta: Meta = { +const meta: Meta = { title: 'Components/Message Thread', component: MessageThreadComponent, argTypes: { @@ -123,7 +123,9 @@ const meta: Meta = { // hide unnecessary props since we "send message with attachments" option onRenderAttachmentDownloads: hiddenControl, attachmentOptions: hiddenControl, - onSendMessage: hiddenControl + onSendMessage: hiddenControl, + onCancelEditMessage: hiddenControl, + onDisplayDateTimeString: hiddenControl }, args: { showMessageDate: true,