From c9204dea8a3ab42308d0c93f58de2ba66ba081ce Mon Sep 17 00:00:00 2001 From: bilalesi Date: Thu, 18 Sep 2025 13:21:44 +0100 Subject: [PATCH 1/2] vlab name too long --- src/ui/molecules/more-less-text/index.tsx | 2 ++ src/ui/segments/project/team/team.tsx | 2 ++ .../segments/virtual-lab-settings/index.tsx | 35 +++++++++++++++---- .../virtual-lab-settings/sections/team.tsx | 2 ++ .../workspaces/space-switcher/item.tsx | 13 ++++--- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/ui/molecules/more-less-text/index.tsx b/src/ui/molecules/more-less-text/index.tsx index 43cc3a47c..0da0ecc20 100644 --- a/src/ui/molecules/more-less-text/index.tsx +++ b/src/ui/molecules/more-less-text/index.tsx @@ -13,6 +13,8 @@ type ExpandableTextProps = { const clampClassFor = (lines: number): string => { switch (lines) { + case 1: + return 'line-clamp-1'; case 2: return 'line-clamp-2'; case 3: diff --git a/src/ui/segments/project/team/team.tsx b/src/ui/segments/project/team/team.tsx index 1cb5a4ff2..107ae7534 100644 --- a/src/ui/segments/project/team/team.tsx +++ b/src/ui/segments/project/team/team.tsx @@ -485,6 +485,8 @@ function AddMemberStep({ onBack, list, allowedOperation }: AddMemberStepProps) { >
{ diff --git a/src/ui/segments/virtual-lab-settings/index.tsx b/src/ui/segments/virtual-lab-settings/index.tsx index ddc7c53f0..bd25ffc46 100644 --- a/src/ui/segments/virtual-lab-settings/index.tsx +++ b/src/ui/segments/virtual-lab-settings/index.tsx @@ -21,6 +21,7 @@ import { Button } from '@/ui/molecules/button'; import { cn } from '@/utils/css-class'; import type { VirtualLab, VirtualLabListResponse } from '@/api/virtual-lab-svc/queries/types'; +import { ExpandableText } from '@/ui/molecules/more-less-text'; const baseNameSchema = z .string() @@ -236,8 +237,8 @@ function EditableName({ if (isEditing) { return ( -
-
+
+
-

+
+ + {({ isExpanded, toggle }) => ( + + )} + + {/*

{currentName} -

+

*/} {isAdmin && ( @@ -101,7 +126,7 @@ export function ProjectCard(): ReactElement { variant="icon" aria-label="revert changes" onClick={onCancel} - className="transform bg-red-500/80 transition-all duration-200 hover:scale-105 hover:bg-red-500" + className="transform bg-red-500/80 transition-all duration-200 hover:scale-105 hover:bg-red-500 disabled:opacity-50" > @@ -139,42 +164,57 @@ export function ProjectCard(): ReactElement {
{isEditing ? ( -