From 1c44253b6d164e6af49158f618bec73e33656791 Mon Sep 17 00:00:00 2001
From: MarcosPierasNL <pieras.marcos@gmail.com>
Date: Fri, 5 Jul 2024 10:41:52 +0200
Subject: [PATCH] feat: truncate headers card

---
 libs/shared/lib/components/CardToolTipVis/index.tsx |  2 +-
 libs/shared/lib/schema/panel/Schema.tsx             | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/libs/shared/lib/components/CardToolTipVis/index.tsx b/libs/shared/lib/components/CardToolTipVis/index.tsx
index 9c2f32d2e..af71c655d 100644
--- a/libs/shared/lib/components/CardToolTipVis/index.tsx
+++ b/libs/shared/lib/components/CardToolTipVis/index.tsx
@@ -46,7 +46,7 @@ export const CardToolTipVis: React.FC<CardToolTipVisProps> = ({
     <div className="border-1 border-sec-200 bg-white w-[12rem] -mx-2 -my-1">
       <div className="flex m-0 items-center border-b border-sec-200">
         <div className="h-9 w-2" style={{ backgroundColor: colorHeader }}></div>
-        <div className="flex-1 min-w-0">
+        <div className="flex-1 min-w-0 truncate">
           <Tooltip>
             <TooltipTrigger>
               <span className="text-xl ml-2 font-semibold truncate">{name}</span>
diff --git a/libs/shared/lib/schema/panel/Schema.tsx b/libs/shared/lib/schema/panel/Schema.tsx
index 898e63108..7c3f3e2f7 100644
--- a/libs/shared/lib/schema/panel/Schema.tsx
+++ b/libs/shared/lib/schema/panel/Schema.tsx
@@ -102,7 +102,6 @@ export const Schema = (props: Props) => {
       data: { ...node.data, reactFlowRef },
     }));
 
-    //setNodes(schemaFlow.nodes);
     setNodes(nodesWithRef);
     setEdges(schemaFlow.edges);
     setTimeout(() => fitView(), 100);
@@ -172,7 +171,15 @@ export const Schema = (props: Props) => {
           </Tooltip>
           <Tooltip>
             <TooltipTrigger>
-              <Button variantType="secondary" variant="ghost" size="xs" iconComponent={<Fullscreen />} onClick={() => {}} />
+              <Button
+                variantType="secondary"
+                variant="ghost"
+                size="xs"
+                iconComponent={<Fullscreen />}
+                onClick={() => {
+                  fitView();
+                }}
+              />
             </TooltipTrigger>
             <TooltipContent side={'top'}>
               <p>Fit to screen</p>
-- 
GitLab