AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): Make input layout & padding consistent (#9170)
Zamil Majdy8f1a0659768e
diff --git a/autogpt_platform/frontend/src/components/CustomNode.tsx b/autogpt_platform/frontend/src/components/CustomNode.tsxindex 735abe5551..7d2e6c54b8 100644--- a/autogpt_platform/frontend/src/components/CustomNode.tsx+++ b/autogpt_platform/frontend/src/components/CustomNode.tsx@@ -726,13 +726,10 @@ export function CustomNode({</div>{/* Body */}- <div className="ml-5 mt-6 rounded-b-xl">+ <div className="mx-5 my-6 rounded-b-xl">{/* Input Handles */}{data.uiType !== BlockUIType.NOTE ? (- <div- className="flex w-fit items-start justify-between"- data-id="input-handles"- >+ <div data-id="input-handles"><div>{data.uiType === BlockUIType.WEBHOOK_MANUAL &&(data.webhook ? (@@ -781,7 +778,6 @@ export function CustomNode({<SwitchonCheckedChange={toggleAdvancedSettings}checked={isAdvancedOpen}- className="mr-5"/></div></>@@ -790,7 +786,7 @@ export function CustomNode({{data.uiType !== BlockUIType.NOTE && (<><LineSeparator />- <div className="flex items-start justify-end rounded-b-xl pb-2 pr-2 pt-6">+ <div className="flex items-start justify-end rounded-b-xl pt-6"><div className="flex-none">{data.outputSchema &&generateOutputHandles(data.outputSchema, data.uiType)}diff --git a/autogpt_platform/frontend/src/components/NodeHandle.tsx b/autogpt_platform/frontend/src/components/NodeHandle.tsxindex 137e5e4c37..f733c17631 100644--- a/autogpt_platform/frontend/src/components/NodeHandle.tsx+++ b/autogpt_platform/frontend/src/components/NodeHandle.tsx@@ -82,7 +82,7 @@ const NodeHandle: FC<HandleProps> = ({data-testid={`output-handle-${keyName}`}position={Position.Right}id={keyName}- className="group -mr-[26px]"+ className="group -mr-[38px]"><div className="pointer-events-none flex items-center">{label}diff --git a/autogpt_platform/frontend/src/components/customnode.css b/autogpt_platform/frontend/src/components/customnode.cssindex d947540f42..8e4ed0c87d 100644--- a/autogpt_platform/frontend/src/components/customnode.css+++ b/autogpt_platform/frontend/src/components/customnode.css@@ -15,15 +15,11 @@.custom-node [data-id^="date-picker"],.custom-node [data-list-container],.custom-node [data-add-item],-.custom-node [data-content-settings] {- min-width: calc(100% - 2.5rem);- max-width: 400px;-}--.array-item-container {+.custom-node [data-content-settings]. .array-item-container {display: flex;align-items: center;min-width: calc(100% - 2.5rem);+ max-width: 100%;}.custom-node .custom-switch {diff --git a/autogpt_platform/frontend/src/components/node-input-components.tsx b/autogpt_platform/frontend/src/components/node-input-components.tsxindex 04999420fb..b97e2ed4e1 100644--- a/autogpt_platform/frontend/src/components/node-input-components.tsx+++ b/autogpt_platform/frontend/src/components/node-input-components.tsx@@ -201,7 +201,7 @@ export const NodeGenericInputField: FC<{className,displayName,}) => {- className = cn(className, "my-2");+ className = cn(className);displayName ||= propSchema.title || beautifyString(propKey);if ("allOf" in propSchema) {@@ -876,18 +876,19 @@ const NodeArrayInput: FC<{(c) => c.targetHandle === entryKey && c.target === nodeId,);return (- <div key={entryKey} className="self-start">+ <div key={entryKey}>+ <NodeHandle+ keyName={entryKey}+ schema={schema.items!}+ isConnected={isConnected}+ isRequired={false}+ side="left"+ /><div className="mb-2 flex space-x-2">- <NodeHandle- keyName={entryKey}- schema={schema.items!}- isConnected={isConnected}- isRequired={false}- side="left"- />{!isConnected &&(schema.items ? (<NodeGenericInputField+ className="w-full"nodeId={nodeId}propKey={entryKey}propSchema={schema.items}