From 88aa9d2c1f46843154a564febf9a3be55091c8f2 Mon Sep 17 00:00:00 2001 From: iberdinsky-skilld Date: Fri, 1 Nov 2024 06:36:45 +0100 Subject: [PATCH] Fix for long action name/description --- client/src/components/ActionsFlow.tsx | 26 +++++++++++++++++-- client/src/utils/react-flow-builder.tsx | 18 ++++++++++++- .../very-long-name-action-copy/action.yaml | 16 ++++++++++++ .../actions/very-long-name-action/action.yaml | 16 ++++++++++++ 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 very-long-name-action-group/very-long-action-childgroup/actions/very-long-name-action-copy/action.yaml create mode 100644 very-long-name-action-group/very-long-action-childgroup/actions/very-long-name-action/action.yaml diff --git a/client/src/components/ActionsFlow.tsx b/client/src/components/ActionsFlow.tsx index d0c1550..a4db576 100644 --- a/client/src/components/ActionsFlow.tsx +++ b/client/src/components/ActionsFlow.tsx @@ -1,5 +1,6 @@ import 'reactflow/dist/style.css' +import { Typography } from '@mui/material' import Box from '@mui/material/Box' import CircularProgress from '@mui/material/CircularProgress' import Paper from '@mui/material/Paper' @@ -118,6 +119,11 @@ const WhiteBand = ({ data }: { data: INodeData }) => { typography: 'subtitle2', fontSize: `${16 * elementsScaleCoef}px`, lineHeight: 1, + overflow: 'hidden', + textOverflow: 'ellipsis', + display: '-webkit-box', + WebkitLineClamp: '1', + WebkitBoxOrient: 'vertical', }} > {data?.label} @@ -128,7 +134,12 @@ const WhiteBand = ({ data }: { data: INodeData }) => { typography: 'subtitle2', fontSize: `${11 * elementsScaleCoef}px`, color: '#667085', - lineHeight: 1.2, + lineHeight: 1, + overflow: 'hidden', + textOverflow: 'ellipsis', + display: '-webkit-box', + WebkitLineClamp: '1', + WebkitBoxOrient: 'vertical', }} > {data?.description} @@ -232,7 +243,18 @@ function NodeWrapper({ data }: { data: INodeData }) { color: '#fff', }} > - {data?.label} + + {data?.label} + {data.actionsAmount && (