From ad8aecba016abd74f45558a92be80746b4c66b80 Mon Sep 17 00:00:00 2001 From: Corina Gum <> Date: Tue, 11 Mar 2025 18:19:45 -0700 Subject: [PATCH 1/3] Fixed pasted JSON card render --- .../AttachmentsContainer.tsx | 16 ++----- .../src/components/Card/AdaptiveCard.tsx | 10 ++-- .../ComposeBoxToolbar/ComposeBoxToolbar.tsx | 46 ++++++++++++------- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/packages/devtools/src/components/AttachmentsContainer/AttachmentsContainer.tsx b/packages/devtools/src/components/AttachmentsContainer/AttachmentsContainer.tsx index e90ce203..dcdecee4 100644 --- a/packages/devtools/src/components/AttachmentsContainer/AttachmentsContainer.tsx +++ b/packages/devtools/src/components/AttachmentsContainer/AttachmentsContainer.tsx @@ -1,4 +1,4 @@ -import { memo } from 'react'; +import { memo, useCallback } from 'react'; import { Button, Image } from '@fluentui/react-components'; import { Dismiss20Regular } from '@fluentui/react-icons/lib/fonts'; @@ -20,13 +20,7 @@ const AttachmentItem = memo( }) => { const classes = useClasses(); - // Create a stable key based on content - const contentKey = - typeof attachment.content === 'object' - ? JSON.stringify(attachment.content).substring(0, 20) - : String(attachment.content).substring(0, 20); - - const renderAttachmentContent = () => { + const renderAttachmentContent = useCallback(() => { switch (attachment.type) { case 'card': return attachment.content && ; @@ -45,10 +39,10 @@ const AttachmentItem = memo( default: return
{attachment.name || 'Attachment'}
; } - }; + }, [attachment.content, attachment.type, attachment.name, classes]); return ( -
+
{showRemoveButton && ( From a14e9e6c2111fea0c6bea39ec09c5e27e7a57453 Mon Sep 17 00:00:00 2001 From: Alex Acebo Date: Wed, 12 Mar 2025 07:20:56 -0700 Subject: [PATCH 2/3] Update ComposeBoxToolbar.tsx --- .../ComposeBox/ComposeBoxToolbar/ComposeBoxToolbar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/devtools/src/components/ComposeBox/ComposeBoxToolbar/ComposeBoxToolbar.tsx b/packages/devtools/src/components/ComposeBox/ComposeBoxToolbar/ComposeBoxToolbar.tsx index 2e9209ab..bd2cd92d 100644 --- a/packages/devtools/src/components/ComposeBox/ComposeBoxToolbar/ComposeBoxToolbar.tsx +++ b/packages/devtools/src/components/ComposeBox/ComposeBoxToolbar/ComposeBoxToolbar.tsx @@ -27,7 +27,6 @@ import { ToolbarButton, ToolbarProps, ToolbarDivider, - ToolbarProps, useId, } from '@fluentui/react-components'; import { useNavigate } from 'react-router'; From 5666d1833b172c15fb43a2213df08fada846736f Mon Sep 17 00:00:00 2001 From: Alex Acebo Date: Wed, 12 Mar 2025 07:28:53 -0700 Subject: [PATCH 3/3] Update package.json --- packages/graph/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/graph/package.json b/packages/graph/package.json index 4a7ac076..48e14fa0 100644 --- a/packages/graph/package.json +++ b/packages/graph/package.json @@ -25,8 +25,6 @@ ], "scripts": { "clean": "npx rimraf ./dist", - "lint": "npx eslint", - "lint:fix": "npx eslint --fix", "build": "npx cross-env NODE_OPTIONS='--max-old-space-size=16384' npx tsup && npx rimraf ./dist/index.d.mts", "test": "npx jest", "gen": "npm run gen:types && npm run gen:endpoints",