Skip to content

Commit a75b3fa

Browse files
ivicackresimir-coko
authored andcommitted
1628 - client - Don’t hide action select component to avoid content inside panel jumping when switching actions
1 parent c558b41 commit a75b3fa

File tree

1 file changed

+15
-31
lines changed

1 file changed

+15
-31
lines changed

client/src/pages/platform/workflow-editor/components/WorkflowNodeDetailsPanel.tsx

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import LoadingIcon from '@/components/LoadingIcon';
22
import {Button} from '@/components/ui/button';
33
import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@/components/ui/select';
4-
import {Skeleton} from '@/components/ui/skeleton';
54
import {Tooltip, TooltipContent, TooltipTrigger} from '@/components/ui/tooltip';
65
import Properties from '@/pages/platform/workflow-editor/components/Properties/Properties';
76
import DataStreamComponentsTab from '@/pages/platform/workflow-editor/components/node-details-tabs/DataStreamComponentsTab';
87
import {
98
ActionDefinitionApi,
10-
ComponentDefinition,
119
ComponentDefinitionBasic,
1210
GetComponentActionDefinitionRequest,
1311
GetComponentTriggerDefinitionRequest,
@@ -448,9 +446,6 @@ const WorkflowNodeDetailsPanel = ({
448446
}, [componentActions, currentNode?.name]);
449447

450448
const currentTaskData = currentComponentDefinition || currentTaskDispatcherDefinition;
451-
const currentOperationFetcher = currentActionFetched || currentTriggerFetched;
452-
453-
const actionDataMissing = currentComponent?.operationName && (!matchingOperation?.name || !currentOperationFetcher);
454449

455450
if (!workflowNodeDetailsPanelOpen || !currentNode?.name || !currentTaskData) {
456451
return <></>;
@@ -501,32 +496,21 @@ const WorkflowNodeDetailsPanel = ({
501496
</header>
502497

503498
<main className="flex h-full flex-col">
504-
{actionDataMissing && (
505-
<div className="flex flex-col border-b border-muted p-4">
506-
<span className="text-sm leading-6">Actions</span>
507-
508-
<Skeleton className="h-9 w-full" />
509-
</div>
510-
)}
511-
512-
{(!!(currentTaskData as ComponentDefinition).actions?.length ||
513-
!!(currentTaskData as ComponentDefinition).triggers?.length) && (
514-
<CurrentOperationSelect
515-
description={
516-
currentNode?.trigger
517-
? currentTriggerDefinition?.description
518-
: currentActionDefinition?.description
519-
}
520-
handleValueChange={handleOperationSelectChange}
521-
operations={
522-
(currentNode?.trigger
523-
? currentComponentDefinition?.triggers
524-
: currentComponentDefinition?.actions)!
525-
}
526-
triggerSelect={currentNode?.trigger}
527-
value={currentOperationName}
528-
/>
529-
)}
499+
<CurrentOperationSelect
500+
description={
501+
currentNode?.trigger
502+
? currentTriggerDefinition?.description
503+
: currentActionDefinition?.description
504+
}
505+
handleValueChange={handleOperationSelectChange}
506+
operations={
507+
(currentNode?.trigger
508+
? currentComponentDefinition?.triggers
509+
: currentComponentDefinition?.actions)!
510+
}
511+
triggerSelect={currentNode?.trigger}
512+
value={currentOperationName}
513+
/>
530514

531515
{((!currentNode?.trigger && !currentNode?.taskDispatcher && currentActionFetched) ||
532516
currentNode?.taskDispatcher ||

0 commit comments

Comments
 (0)