Baptiste Devessier
2025-04-04 11:20:57 +02:00
committed by GitHub
parent bb40bc9929
commit 9353e777ea
10 changed files with 91 additions and 3 deletions

View File

@ -19,11 +19,13 @@ import {
JsonTreeContextProvider,
ShouldExpandNodeInitiallyProps,
} from 'twenty-ui/json-visualizer';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
const { t, i18n } = useLingui();
const { getIcon } = useIcons();
const theme = useTheme();
const { copyToClipboard } = useCopyToClipboard();
const workflowRunId = useWorkflowRunIdOrThrow();
const workflowRun = useWorkflowRun({ workflowRunId });
@ -123,6 +125,7 @@ export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
arrowButtonExpandedLabel: t`Collapse`,
getNodeHighlighting,
shouldExpandNodeInitially: isFirstNodeDepthOfPreviousStep,
onNodeValueClick: copyToClipboard,
}}
>
<JsonNestedNode

View File

@ -9,17 +9,19 @@ import { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-ac
import { useTheme } from '@emotion/react';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
import { useIcons } from 'twenty-ui/display';
import {
GetJsonNodeHighlighting,
isTwoFirstDepths,
JsonTree,
} from 'twenty-ui/json-visualizer';
import { useIcons } from 'twenty-ui/display';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => {
const { t, i18n } = useLingui();
const theme = useTheme();
const { getIcon } = useIcons();
const { copyToClipboard } = useCopyToClipboard();
const workflowRunId = useWorkflowRunIdOrThrow();
const workflowRun = useWorkflowRun({ workflowRunId });
@ -73,6 +75,7 @@ export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => {
? setRedHighlightingForEveryNode
: undefined
}
onNodeValueClick={copyToClipboard}
/>
</WorkflowRunStepJsonContainer>
</>