Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
feat(pipeline-builder): user can have consistent node width between T…
Browse files Browse the repository at this point in the history
…EST_VIEW and BUILD_VIEW (#957)

Because

- improve UX

This commit

- user can have consistent node width between TEST_VIEW and BUILD_VIEW
  • Loading branch information
EiffelFly committed Oct 12, 2023
1 parent a679fd6 commit 82f2a04
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@instill-ai/toolkit",
"version": "0.68.3-rc.60",
"version": "0.68.3-rc.63",
"description": "Instill AI's frontend toolkit",
"repository": "https://github.com/instill-ai/design-system.git",
"bugs": "https://github.com/instill-ai/design-system/issues",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,11 @@ export const ConnectorNode = ({ data, id }: NodeProps<ConnectorNodeData>) => {
<>
<div
className={cn(
"flex flex-col rounded-sm border-2 border-semantic-bg-primary bg-semantic-bg-base-bg px-3 py-2.5 shadow-md hover:shadow-lg",
"flex flex-col w-[340px] rounded-sm border-2 border-semantic-bg-primary bg-semantic-bg-base-bg px-3 py-2.5 shadow-md hover:shadow-lg",
{
"outline outline-2 outline-semantic-accent-default outline-offset-1":
id === selectedConnectorNodeId,
},
testModeEnabled ? "w-[480px]" : "w-[340px]"
}
)}
>
<div className="mb-3 flex flex-row w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NodeData } from "../type";

// This is the default dimension of a connector node we have right now
const CONNECTOR_NODE_DIMENSION = {
width: 246,
width: 340,
height: 305,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,16 @@ function getOutputFieldComponent({
const fields: React.ReactElement[] = [];

for (const property of properties) {
const title = property.title ? property.title : property.path ?? null;
const title = property.path ? property.path : property.title ?? null;

let propertyValue: any = null;

if (property.type === "array" && !property.instillFormat) {
const arrayFields = getOutputFieldComponent({
properties: property.items as InstillAIOpenAPIProperty[],
trace,
});

fields.push(
<ArrayObjectField nodeType="connector" title={title}>
{arrayFields}
</ArrayObjectField>
...getOutputFieldComponent({
properties: property.items as InstillAIOpenAPIProperty[],
trace,
})
);
}

Expand Down

1 comment on commit 82f2a04

@vercel
Copy link

@vercel vercel bot commented on 82f2a04 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.