From 92c69ef6cbb6514619713a022f9e3d3b8f0c5905 Mon Sep 17 00:00:00 2001
From: Milho001 <l.milhomemfrancochristino@uu.nl>
Date: Wed, 30 Aug 2023 14:09:06 +0000
Subject: [PATCH] fix(qb): fix node attribute dropdown

---
 .husky/pre-commit                             |  0
 .husky/pre-commit-lint                        |  0
 ...erybuilder-simple-disconnected.stories.tsx | 57 ++++++++++---------
 .../entitypill/entitypill.module.scss         |  4 +-
 4 files changed, 33 insertions(+), 28 deletions(-)
 mode change 100644 => 100755 .husky/pre-commit
 mode change 100644 => 100755 .husky/pre-commit-lint

diff --git a/.husky/pre-commit b/.husky/pre-commit
old mode 100644
new mode 100755
diff --git a/.husky/pre-commit-lint b/.husky/pre-commit-lint
old mode 100644
new mode 100755
diff --git a/libs/shared/lib/querybuilder/panel/stories/querybuilder-simple-disconnected.stories.tsx b/libs/shared/lib/querybuilder/panel/stories/querybuilder-simple-disconnected.stories.tsx
index 736ae8d21..df2bc62e8 100644
--- a/libs/shared/lib/querybuilder/panel/stories/querybuilder-simple-disconnected.stories.tsx
+++ b/libs/shared/lib/querybuilder/panel/stories/querybuilder-simple-disconnected.stories.tsx
@@ -2,7 +2,7 @@ import React from 'react';
 import { querybuilderSlice, setQuerybuilderNodes, setSchema, store } from '@graphpolaris/shared/lib/data-access/store';
 
 import { configureStore } from '@reduxjs/toolkit';
-import { Meta } from '@storybook/react';
+import { Meta, StoryObj } from '@storybook/react';
 import { Provider } from 'react-redux';
 import QueryBuilderInner from '../querybuilder';
 import { Handles, NodeAttribute, QueryElementTypes, QueryMultiGraphology, toHandleId } from '../../model';
@@ -15,34 +15,39 @@ const Component: Meta<typeof QueryBuilderInner> = {
   decorators: [(story) => <div>{story()}</div>],
 };
 
-export const SimpleDisconnected = {
-  args: {},
+export const SimpleDisconnected: StoryObj = {
+  args: {
+    nodes: [
+      {
+        name: 'entity',
+        attributes: [
+          { name: 'city', type: 'string' },
+          { name: 'vip', type: 'bool' },
+          { name: 'state', type: 'string' },
+        ],
+      },
+    ],
+    edges: [
+      {
+        name: 'entity:entity',
+        from: 'entity',
+        to: 'entity',
+        collection: 'entity2entity',
+        attributes: [
+          { name: 'arrivalTime', type: 'int' },
+          { name: 'departureTime', type: 'int' },
+        ],
+      },
+    ],
+  },
   decorators: [
-    (story: any) => {
+    (story: any, { args }: any) => {
+      console.log(args);
+
       const graph = new QueryMultiGraphology();
       const schema = SchemaUtils.schemaBackend2Graphology({
-        nodes: [
-          {
-            name: 'entity',
-            attributes: [
-              { name: 'city', type: 'string' },
-              { name: 'vip', type: 'bool' },
-              { name: 'state', type: 'string' },
-            ],
-          },
-        ],
-        edges: [
-          {
-            name: 'entity:entity',
-            from: 'entity',
-            to: 'entity',
-            collection: 'entity2entity',
-            attributes: [
-              { name: 'arrivalTime', type: 'int' },
-              { name: 'departureTime', type: 'int' },
-            ],
-          },
-        ],
+        nodes: args.nodes,
+        edges: args.edges,
       });
 
       store.dispatch(setSchema(schema.export()));
diff --git a/libs/shared/lib/querybuilder/pills/customFlowPills/entitypill/entitypill.module.scss b/libs/shared/lib/querybuilder/pills/customFlowPills/entitypill/entitypill.module.scss
index d2b9ad3b2..e72268545 100644
--- a/libs/shared/lib/querybuilder/pills/customFlowPills/entitypill/entitypill.module.scss
+++ b/libs/shared/lib/querybuilder/pills/customFlowPills/entitypill/entitypill.module.scss
@@ -46,7 +46,7 @@
       transform: translateY(0%);
     }
     100% {
-      max-height: 100px;
+      max-height: 100000px;
       opacity: 1;
       transform: translateY(0);
     }
@@ -69,7 +69,7 @@
   .content_display {
     // visibility: visible;
     display: block;
-    max-height: 100px;
+    max-height: unset;
   }
 
   .io {
-- 
GitLab