Only display Flow for Workflow Runs and display Output tab for triggers (#11520)
> [!WARNING] > I refactored a bunch of components into utility functions to make it possible to display the `WorkflowStepHeader` component for **triggers** in the `CommandMenuWorkflowRunViewStep` component. Previously, we were asserting that we were displaying the header in `Output` and `Input` tabs only for **actions**. Handling triggers too required a bunch of changes. We can think of making a bigger refactor of this part. In this PR: - Only display the Flow for Workflow Runs; removed the Code Editor tab - Allows users to see the Output of trigger nodes - Prevent impossible states by manually setting the selected tab when selecting a node ## Demo ### Success, Running and Not Executed steps https://github.com/user-attachments/assets/c6bebd0f-5da2-4ccc-aef2-d9890eafa59a ### Failed step https://github.com/user-attachments/assets/e1f4e13a-2f5e-4792-a089-928e4d6b1ac0 Closes https://github.com/twentyhq/core-team-issues/issues/709
This commit is contained in:
committed by
GitHub
parent
c8011da4d7
commit
e8488e1da0
@ -8,7 +8,6 @@ import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableE
|
||||
import { FieldsCard } from '@/object-record/record-show/components/FieldsCard';
|
||||
import { CardType } from '@/object-record/record-show/types/CardType';
|
||||
import { ShowPageActivityContainer } from '@/ui/layout/show-page/components/ShowPageActivityContainer';
|
||||
import { WorkflowRunOutputVisualizer } from '@/workflow/workflow-diagram/components/WorkflowRunOutputVisualizer';
|
||||
import { WorkflowRunVisualizer } from '@/workflow/workflow-diagram/components/WorkflowRunVisualizer';
|
||||
import { WorkflowRunVisualizerEffect } from '@/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect';
|
||||
import { WorkflowVersionVisualizer } from '@/workflow/workflow-diagram/components/WorkflowVersionVisualizer';
|
||||
@ -104,7 +103,4 @@ export const CardComponents: Record<CardType, CardComponentType> = {
|
||||
<WorkflowRunVisualizer workflowRunId={targetableObject.id} />
|
||||
</>
|
||||
),
|
||||
[CardType.WorkflowRunOutputCard]: ({ targetableObject }) => (
|
||||
<WorkflowRunOutputVisualizer workflowRunId={targetableObject.id} />
|
||||
),
|
||||
};
|
||||
|
||||
@ -17,7 +17,6 @@ import {
|
||||
IconHome,
|
||||
IconMail,
|
||||
IconNotes,
|
||||
IconPrinter,
|
||||
IconSettings,
|
||||
} from 'twenty-ui/display';
|
||||
|
||||
@ -189,21 +188,7 @@ export const useRecordShowContainerTabs = (
|
||||
},
|
||||
[CoreObjectNameSingular.WorkflowRun]: {
|
||||
tabs: {
|
||||
workflowRunOutput: {
|
||||
title: 'Output',
|
||||
position: 0,
|
||||
Icon: IconPrinter,
|
||||
cards: [{ type: CardType.WorkflowRunOutputCard }],
|
||||
hide: {
|
||||
ifMobile: false,
|
||||
ifDesktop: false,
|
||||
ifInRightDrawer: false,
|
||||
ifFeaturesDisabled: [FeatureFlagKey.IsWorkflowEnabled],
|
||||
ifRequiredObjectsInactive: [],
|
||||
ifRelationsMissing: [],
|
||||
},
|
||||
},
|
||||
workflowRunFlow: {
|
||||
workflowRun: {
|
||||
title: 'Flow',
|
||||
position: 0,
|
||||
Icon: IconSettings,
|
||||
|
||||
@ -9,6 +9,5 @@ export enum CardType {
|
||||
WorkflowCard = 'WorkflowCard',
|
||||
WorkflowVersionCard = 'WorkflowVersionCard',
|
||||
WorkflowRunCard = 'WorkflowRunCard',
|
||||
WorkflowRunOutputCard = 'WorkflowRunOutputCard',
|
||||
RichTextCard = 'RichTextCard',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user