Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as Icons from '@uipath/apollo-react/canvas/icons';
import { NodeIcon } from '@uipath/apollo-react/canvas/utils';
import { Row } from '@uipath/apollo-react/canvas/layouts';
import { type NodeProps, Position } from '@uipath/apollo-react/canvas/xyflow/react';
import { ApIcon } from '@uipath/apollo-react/material/components';
Expand Down Expand Up @@ -161,26 +162,25 @@ export const ResourceNode = memo(
}, [data]);

const toolbarConfig = useMemo((): NodeToolbarConfig | null | undefined => {
if (mode === 'view') {
return null; // Explicitly disable toolbar in view mode
// Explicitly disable toolbar in view mode or for placeholder nodes
if (mode === 'view' || (data.isPlaceholder && (!isSuggestion || !suggestionId))) {
return null;
}

// Note: Removed standalone placeholder check - placeholders now show the same toolbar as permanent nodes

// If this is a suggestion, show accept/reject actions only if version is not "0.0.1"
if (isSuggestion && suggestionId) {
if (suggestionGroupVersion === '0.0.1') return null;
const rejectAction: ToolbarAction = {
id: 'reject-suggestion',
icon: 'close',
icon: <NodeIcon icon="X" size={14} />,
label: suggestTranslations.reject,
disabled: false,
onAction: () => handleActOnSuggestion(suggestionId, 'reject'),
};

const acceptAction: ToolbarAction = {
id: 'accept-suggestion',
icon: 'check',
icon: <NodeIcon icon="check" size={14} />,
label: suggestTranslations.accept,
disabled: false,
onAction: () => handleActOnSuggestion(suggestionId, 'accept'),
Expand Down Expand Up @@ -221,7 +221,7 @@ export const ResourceNode = memo(

const removeAction: ToolbarAction = {
id: 'remove',
icon: 'delete',
icon: <NodeIcon icon="trash" size={14} />,
label: translations?.remove ?? '',
disabled: false,
onAction: handleClickRemove,
Expand Down
Loading