From 800d7f0b57dac32a280fe85b5034e7fedd774944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=D1=81=20=D0=A1=D1=83=D0=BB=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Tue, 14 Jul 2026 17:00:26 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20textarea=20overlay=20=D1=88=D0=B8=D1=80?= =?UTF-8?q?=D0=B5=20=D0=B8=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BD=D0=B5?= =?UTF-8?q?=D0=B5,=20=D1=83=D1=81=D0=B8=D0=BB=D0=B5=D0=BD=D0=B0=20=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BA=D0=B0=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D1=83=D0=B5=D0=BC=D1=8B=D1=85=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FieldOverlay: border-2 border-primary/50 + shadow-lg для заметной границы - TaskDetail textarea/rich-text: overlay растянут на всю ширину контентной области, max-height min(70vh, 500px) - AutoResizeTextarea в TaskDetail: maxRows увеличен до 25 --- client/src/components/fields/FieldOverlay.tsx | 6 +++++- client/src/components/fields/InlineField.tsx | 4 ++++ client/src/pages/TaskDetail.tsx | 11 ++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/client/src/components/fields/FieldOverlay.tsx b/client/src/components/fields/FieldOverlay.tsx index 18f14d2..857ffc1 100644 --- a/client/src/components/fields/FieldOverlay.tsx +++ b/client/src/components/fields/FieldOverlay.tsx @@ -12,6 +12,8 @@ export interface FieldOverlayProps { minWidth?: number | string; /** Максимальная высота оверлея. */ maxHeight?: number | string; + /** Ширина оверлея. */ + width?: number | string; } export function FieldOverlay({ @@ -21,6 +23,7 @@ export function FieldOverlay({ fitContainer = true, minWidth, maxHeight, + width, }: FieldOverlayProps) { const [mounted, setMounted] = useState(false); @@ -34,11 +37,12 @@ export function FieldOverlay({ const style: React.CSSProperties = {}; if (minWidth !== undefined) style.minWidth = typeof minWidth === 'number' ? `${minWidth}px` : minWidth; if (maxHeight !== undefined) style.maxHeight = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight; + if (width !== undefined) style.width = typeof width === 'number' ? `${width}px` : width; return createPortal(
{editor} diff --git a/client/src/pages/TaskDetail.tsx b/client/src/pages/TaskDetail.tsx index 6c53dfc..a6e2783 100644 --- a/client/src/pages/TaskDetail.tsx +++ b/client/src/pages/TaskDetail.tsx @@ -986,9 +986,9 @@ function FieldValueRow({ if (field.type === 'textarea' || field.type === 'rich-text') { return ( onDraftChange?.(e.target.value)} onClick={e => e.stopPropagation()} @@ -1301,9 +1301,10 @@ function FieldValueRow({ onEnterEdit={handleEnterEdit} fitOverlay={field.type !== 'textarea' && field.type !== 'rich-text'} overlayClassName={field.type === 'textarea' || field.type === 'rich-text' ? 'flex flex-col overflow-hidden' : ''} - overlayMaxHeight={field.type === 'textarea' || field.type === 'rich-text' ? 320 : undefined} - overlayMinWidth={field.type === 'textarea' || field.type === 'rich-text' ? 300 : 180} - className={field.type === 'textarea' || field.type === 'rich-text' ? 'items-start min-h-[24px]' : 'items-center min-h-[28px]'} + overlayMaxHeight={field.type === 'textarea' || field.type === 'rich-text' ? 'min(70vh, 500px)' : undefined} + overlayMinWidth={field.type === 'textarea' || field.type === 'rich-text' ? '100%' : 180} + overlayWidth={field.type === 'textarea' || field.type === 'rich-text' ? '100%' : undefined} + className={field.type === 'textarea' || field.type === 'rich-text' ? 'items-start min-h-[24px] w-full' : 'items-center min-h-[28px]'} /> ) : readViewNode; })()}