Skip to content

Commit fcc2882

Browse files
committed
fix(web): update icon sizes in workflow components and add keyboard shortcuts for dialog closing
1 parent 522fd98 commit fcc2882

2 files changed

Lines changed: 28 additions & 13 deletions

File tree

apps/web/src/components/workflow/workflow-canvas.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,37 +148,37 @@ function ActionButton({
148148
}: ActionButtonProps) {
149149
const statusConfig = {
150150
idle: {
151-
icon: <Play className="w-6 h-6" />,
151+
icon: <Play className="!size-5" />,
152152
title: "Execute Workflow",
153153
className: "bg-green-600 hover:bg-green-700 text-white",
154154
},
155155
submitted: {
156-
icon: <Square className="w-6 h-6" />,
156+
icon: <Square className="!size-5" />,
157157
title: "Stop Execution",
158158
className: "bg-red-500 hover:bg-red-600 text-white",
159159
},
160160
executing: {
161-
icon: <Square className="w-6 h-6" />,
161+
icon: <Square className="!size-5" />,
162162
title: "Stop Execution",
163163
className: "bg-red-500 hover:bg-red-600 text-white",
164164
},
165165
completed: {
166-
icon: <X className="w-6 h-6" />,
166+
icon: <X className="!size-5" />,
167167
title: "Clear Outputs & Reset",
168168
className: "bg-emerald-600 hover:bg-emerald-700 text-white",
169169
},
170170
error: {
171-
icon: <X className="w-6 h-6" />,
171+
icon: <X className="!size-5" />,
172172
title: "Clear Errors & Reset",
173173
className: "bg-rose-600 hover:bg-rose-700 text-white",
174174
},
175175
cancelled: {
176-
icon: <Play className="w-6 h-6" />,
176+
icon: <Play className="!size-5" />,
177177
title: "Restart Workflow",
178178
className: "bg-neutral-600 hover:bg-neutral-700 text-white",
179179
},
180180
paused: {
181-
icon: <Play className="w-6 h-6" />,
181+
icon: <Play className="!size-5" />,
182182
title: "Resume Workflow",
183183
className: "bg-blue-500 hover:bg-blue-600 text-white",
184184
},
@@ -215,7 +215,7 @@ function DeployButton({
215215
position="right-16"
216216
tooltip="Deploy Workflow"
217217
>
218-
<ArrowUpToLine className="w-6 h-6" />
218+
<ArrowUpToLine className="!size-5" />
219219
</CanvasButton>
220220
);
221221
}
@@ -233,9 +233,9 @@ function SidebarToggle({ onClick, isSidebarVisible }: SidebarToggleProps) {
233233
tooltip={isSidebarVisible ? "Hide Sidebar" : "Show Sidebar"}
234234
>
235235
{isSidebarVisible ? (
236-
<PanelLeftClose className="w-6 h-6" />
236+
<PanelLeftClose className="!size-5 rotate-180" />
237237
) : (
238-
<PanelLeft className="w-6 h-6" />
238+
<PanelLeft className="!size-5 rotate-180" />
239239
)}
240240
</CanvasButton>
241241
);
@@ -265,9 +265,9 @@ function OutputsToggle({
265265
}
266266
>
267267
{expandedOutputs ? (
268-
<ChevronUp className="w-6 h-6" />
268+
<ChevronUp className="!size-5" />
269269
) : (
270-
<ChevronDown className="w-6 h-6" />
270+
<ChevronDown className="!size-5" />
271271
)}
272272
</CanvasButton>
273273
);
@@ -363,7 +363,7 @@ export function WorkflowCanvas({
363363
position="bottom-4 right-4"
364364
tooltip="Add Node"
365365
>
366-
<Plus className="w-6 h-6" />
366+
<Plus className="!size-5" />
367367
</CanvasButton>
368368
)}
369369

apps/web/src/components/workflow/workflow-node.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ export const WorkflowNode = memo(
241241
setSelectedInput(null);
242242
};
243243

244+
const handleKeyDown = (e: React.KeyboardEvent) => {
245+
if (e.key === "Enter" && !e.shiftKey) {
246+
e.preventDefault();
247+
handleDialogClose();
248+
}
249+
};
250+
244251
const handleNameClick = () => {
245252
if (readonly) return;
246253

@@ -484,6 +491,7 @@ export const WorkflowNode = memo(
484491
type="number"
485492
value={inputValue}
486493
onChange={(e) => handleInputChange(e.target.value)}
494+
onKeyDown={handleKeyDown}
487495
placeholder="Enter number value"
488496
disabled={readonly}
489497
/>
@@ -503,6 +511,12 @@ export const WorkflowNode = memo(
503511
id="input-value"
504512
value={inputValue}
505513
onChange={(e) => handleInputChange(e.target.value)}
514+
onKeyDown={(e) => {
515+
if (e.key === "Enter" && e.ctrlKey) {
516+
e.preventDefault();
517+
handleDialogClose();
518+
}
519+
}}
506520
placeholder="Enter text value"
507521
className="min-h-[100px] resize-y"
508522
disabled={readonly}
@@ -523,6 +537,7 @@ export const WorkflowNode = memo(
523537
id="input-value"
524538
value={inputValue}
525539
onChange={(e) => handleInputChange(e.target.value)}
540+
onKeyDown={handleKeyDown}
526541
placeholder="Enter text value"
527542
disabled={readonly}
528543
/>

0 commit comments

Comments
 (0)