Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you also cleanup the tailwind classes to something more sensible, such as z-[60] and min-w-[400px] to their actual tailwind values

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ export default function AddSubcomponentModal({ onClose, possibleChildren, onAddC
useSubmitOnEnter(handleAddChild)

return createPortal(
<div className="fixed inset-0 z-[60] flex items-center justify-center bg-black/40" onClick={handleClose}>
<div
className="fixed inset-0 z-[60] flex items-center justify-center bg-black/40"
onClick={(mouseEvent) => {
mouseEvent.stopPropagation()
handleClose(mouseEvent)
}}
>
<div className="bg-background border-border relative flex h-1/2 w-1/3 min-w-[400px] flex-col rounded-lg border p-6 shadow-lg">
{/* Close button */}
<Button
Expand Down
2 changes: 2 additions & 0 deletions src/main/frontend/app/routes/studio/canvas/flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
logApiError('Failed to save XML', error as Error)
setIdle()
}
}, [])

Check warning on line 394 in src/main/frontend/app/routes/studio/canvas/flow.tsx

View workflow job for this annotation

GitHub Actions / Build & Run All Tests

React Hook useCallback has missing dependencies: 'setIdle', 'setSaved', and 'setSaving'. Either include them or remove the dependency array

const autosaveEnabled = useSettingsStore((s) => s.general.autoSave.enabled)
const autosaveDelay = useSettingsStore((s) => s.general.autoSave.delayMs)
Expand Down Expand Up @@ -1301,7 +1301,7 @@
setParentId(null)
}

function addNodeAtPosition(

Check warning on line 1304 in src/main/frontend/app/routes/studio/canvas/flow.tsx

View workflow job for this annotation

GitHub Actions / Build & Run All Tests

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed
position: { x: number; y: number },
elementName: string,
sourceInfo?: { nodeId: string | null; handleId: string | null; handleType: 'source' | 'target' | null },
Expand Down Expand Up @@ -1779,6 +1779,8 @@
}}
deleteKeyCode={null}
minZoom={0.2}
nodeDragThreshold={4}
nodeClickDistance={4}
>
<Controls position="top-left">
{hiddenForwardNodeIds.size > 0 && (
Expand Down
Loading