From 463f8cd3cefc416be57ea17b50f481136339f1f5 Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Mon, 19 Feb 2024 15:14:55 -0330 Subject: [PATCH] Style and flow nudges --- apps/database-new/app/[thread_id]/[message_id]/Messages.tsx | 6 +++--- .../components/SchemaFlowHandler/SchemaFlow.utils.ts | 2 +- apps/database-new/components/SchemaFlowHandler/index.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/database-new/app/[thread_id]/[message_id]/Messages.tsx b/apps/database-new/app/[thread_id]/[message_id]/Messages.tsx index 29209bb16f8..030f08ed375 100644 --- a/apps/database-new/app/[thread_id]/[message_id]/Messages.tsx +++ b/apps/database-new/app/[thread_id]/[message_id]/Messages.tsx @@ -35,8 +35,8 @@ export const Messages = async ({ threadId }: { threadId: string }) => { return ( -
-
+ +
{userMessages.map((message, idx) => { const createdAtTimestamp = dayjs(message.createdAt) const isLatest = Array.isArray(messages) && idx === messages.length - 1 @@ -58,7 +58,7 @@ export const Messages = async ({ threadId }: { threadId: string }) => { })}
-
+ ) } diff --git a/apps/database-new/components/SchemaFlowHandler/SchemaFlow.utils.ts b/apps/database-new/components/SchemaFlowHandler/SchemaFlow.utils.ts index fd2ea3af829..4b43c6287b9 100644 --- a/apps/database-new/components/SchemaFlowHandler/SchemaFlow.utils.ts +++ b/apps/database-new/components/SchemaFlowHandler/SchemaFlow.utils.ts @@ -131,7 +131,7 @@ const getLayoutedElements = (nodes: Node[], edges: Edge[]) => { const dagreGraph = new dagre.graphlib.Graph() dagreGraph.setDefaultEdgeLabel(() => ({})) dagreGraph.setGraph({ - rankdir: 'LR', + rankdir: 'TB', align: 'UR', nodesep: 25, ranksep: 50, diff --git a/apps/database-new/components/SchemaFlowHandler/index.tsx b/apps/database-new/components/SchemaFlowHandler/index.tsx index 7eb0cb5b328..f98aaa5425d 100644 --- a/apps/database-new/components/SchemaFlowHandler/index.tsx +++ b/apps/database-new/components/SchemaFlowHandler/index.tsx @@ -46,7 +46,7 @@ const SchemaFlowHandler = ({ content }: SchemaGraphProps) => { getGraphDataFromTables(tables).then(({ nodes, edges }) => { reactFlowInstance.setNodes(nodes) reactFlowInstance.setEdges(edges) - setTimeout(() => reactFlowInstance.fitView({}), 50) + setTimeout(() => reactFlowInstance.fitView({minZoom: 1}), 50) }) }, [tables, resolvedTheme, reactFlowInstance])