From e1e5b68e8aa12f8911708d7b0807e4f1ac20f7fd Mon Sep 17 00:00:00 2001 From: 777genius Date: Fri, 29 May 2026 15:43:03 +0300 Subject: [PATCH] perf: simplify kanban task card chrome --- .../components/team/kanban/KanbanTaskCard.tsx | 64 ++++++------------- 1 file changed, 20 insertions(+), 44 deletions(-) diff --git a/src/renderer/components/team/kanban/KanbanTaskCard.tsx b/src/renderer/components/team/kanban/KanbanTaskCard.tsx index 273d2917..022995d9 100644 --- a/src/renderer/components/team/kanban/KanbanTaskCard.tsx +++ b/src/renderer/components/team/kanban/KanbanTaskCard.tsx @@ -1,4 +1,4 @@ -import { memo, useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'; +import { memo, useEffect, useMemo, useReducer, useState } from 'react'; import { useAppTranslation } from '@features/localization/renderer'; import { OngoingIndicator } from '@renderer/components/common/OngoingIndicator'; @@ -169,34 +169,14 @@ const TruncatedTitle = ({ }: { text: string; className?: string; -}): React.JSX.Element => { - const ref = useRef(null); - const [isTruncated, setIsTruncated] = useState(false); - - const checkTruncation = useCallback(() => { - const el = ref.current; - if (el) { - setIsTruncated(el.scrollHeight > el.clientHeight); - } - }, []); - - return ( - - -
- {text} -
-
- - {text} - -
- ); -}; +}): React.JSX.Element => ( +
+ {text} +
+); const CancelTaskButton = ({ taskId, @@ -273,21 +253,17 @@ const TaskActionIconButton = ({ variant = 'outline', disabled = false, }: TaskActionIconButtonProps): React.JSX.Element => ( - - - - - {label} - + ); export const KanbanTaskCard = memo(