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
60 changes: 30 additions & 30 deletions client/src/pages/platform/workflow-editor/WorkflowEditorLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,37 +177,37 @@ const WorkflowEditorLayout = ({includeComponents, runDisabled, showWorkflowInput
<DialogContent className="absolute bottom-4 left-16 top-12 h-[calc(100vh-64px)] w-[calc(100vw-80px)] max-w-none translate-x-0 translate-y-0 gap-2 bg-surface-main p-0">
<ClusterElementsWorkflowEditor />

{currentComponent && (
<>
<WorkflowNodeDetailsPanel
className="fixed inset-y-0 right-0 rounded-l-none border-none"
invalidateWorkflowQueries={invalidateWorkflowQueries!}
previousComponentDefinitions={previousComponentDefinitions}
updateWorkflowMutation={updateWorkflowMutation!}
workflowNodeOutputs={filteredWorkflowNodeOutputs ?? []}
/>
<>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sada je ovaj fragment <> visak

<WorkflowNodeDetailsPanel
className="fixed inset-y-0 right-0 rounded-l-none"
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

[nitpick] The border-none class was removed from the className prop. Since WorkflowNodeDetailsPanel has a default border (border border-stroke-neutral-secondary on line 1124), this panel will now display a border in the cluster elements canvas. If this is unintentional and you want to maintain the previous borderless appearance, add border-none back to the className: className="fixed inset-y-0 right-0 rounded-l-none border-none"

Suggested change
className="fixed inset-y-0 right-0 rounded-l-none"
className="fixed inset-y-0 right-0 rounded-l-none border-none"

Copilot uses AI. Check for mistakes.
closeButton={
<DialogClose asChild>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ivicac je li zelimo da se NodeDetailsPanel nikako ne moze zatvoriti -> da se automatski zatvara i canvas klikom na X ?

Jer onda bi tribali dodati i logiku kada se brise vec selektirani cluster element, da se u panelu mozda otvori mainRoot (trenutno brisanje selektiranog elementa samo zatvara panel) 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

<Button
className="absolute right-2 top-2"
size="icon"
title="Close the canvas"
variant="ghost"
>
<XIcon />
</Button>
</DialogClose>
}
invalidateWorkflowQueries={invalidateWorkflowQueries!}
previousComponentDefinitions={previousComponentDefinitions}
updateWorkflowMutation={updateWorkflowMutation!}
workflowNodeOutputs={filteredWorkflowNodeOutputs ?? []}
/>

{dataPillPanelOpen && (
<Suspense fallback={<DataPillPanelSkeleton />}>
<DataPillPanel
className="fixed inset-y-0 right-[465px] rounded-none"
previousComponentDefinitions={previousComponentDefinitions}
workflowNodeOutputs={filteredWorkflowNodeOutputs ?? []}
/>
</Suspense>
)}
</>
)}

<DialogClose asChild>
<Button
className="absolute right-2 top-2 size-10 border bg-white p-2 shadow-none [&_svg]:size-5"
title="Close the canvas"
variant="ghost"
>
<XIcon />
</Button>
</DialogClose>
{dataPillPanelOpen && (
<Suspense fallback={<DataPillPanelSkeleton />}>
<DataPillPanel
className="fixed inset-y-0 right-[465px] rounded-none"
previousComponentDefinitions={previousComponentDefinitions}
workflowNodeOutputs={filteredWorkflowNodeOutputs ?? []}
/>
</Suspense>
)}
</>
</DialogContent>
</Dialog>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import {TooltipPortal} from '@radix-ui/react-tooltip';
import {useQueryClient} from '@tanstack/react-query';
import {InfoIcon, XIcon} from 'lucide-react';
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {ReactNode, useCallback, useEffect, useMemo, useRef, useState} from 'react';
import isEqual from 'react-fast-compare';
import InlineSVG from 'react-inlinesvg';
import {twMerge} from 'tailwind-merge';
Expand Down Expand Up @@ -106,6 +106,7 @@

interface WorkflowNodeDetailsPanelProps {
className?: string;
closeButton?: ReactNode;
invalidateWorkflowQueries: () => void;
previousComponentDefinitions: Array<ComponentDefinitionBasic>;
updateWorkflowMutation: UpdateWorkflowMutationType;
Expand All @@ -114,6 +115,7 @@

const WorkflowNodeDetailsPanel = ({
className,
closeButton,
invalidateWorkflowQueries,
previousComponentDefinitions,
updateWorkflowMutation,
Expand Down Expand Up @@ -1155,13 +1157,17 @@
</Tooltip>
)}

<button
aria-label="Close the node details dialog"
className="ml-auto pr-0"
onClick={handlePanelClose}
>
<XIcon aria-hidden="true" className="size-4 cursor-pointer" />
</button>
{closeButton ? (
closeButton
) : (
<button
aria-label="Close the node details dialog"
className="ml-auto pr-0"
onClick={handlePanelClose}
>
<XIcon aria-hidden="true" className="size-4 cursor-pointer" />
</button>
)}

Check warning on line 1170 in client/src/pages/platform/workflow-editor/components/WorkflowNodeDetailsPanel.tsx

View check run for this annotation

SonarQubeCloud / [client] SonarCloud Code Analysis

Unnecessary use of conditional expression for default assignment.

See more on https://sonarcloud.io/project/issues?id=bytechef_client&issues=AZp0yP3Vn2iNHoFqzSi0&open=AZp0yP3Vn2iNHoFqzSi0&pullRequest=3489
</header>

<main className="flex h-full flex-col overflow-hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ export default function useNodeClick(data: NodeDataType, id: NodeProps['id'], ac

if (!!data.clusterRoot && !clusterElementsCanvasOpen) {
setClusterElementsCanvasOpen(true);

setCurrentComponent(undefined);

setWorkflowNodeDetailsPanelOpen(false);

return;
}

setWorkflowNodeDetailsPanelOpen(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default function handleDeleteTask({
});

if (currentNode?.name === data.name) {
useWorkflowNodeDetailsPanelStore.getState().reset();
useWorkflowNodeDetailsPanelStore.getState().setWorkflowNodeDetailsPanelOpen(true);

setCurrentNode({
...rootClusterElementNodeData,
Expand Down
Loading