-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Workflow Run show page #7719
Conversation
Done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds a Workflow Run show page, introducing components to display workflow version visualizers and run outputs.
- Added
WorkflowRunOutputVisualizer
inpackages/twenty-front/src/modules/workflow/components/WorkflowRunOutputVisualizer.tsx
to render workflow run outputs as formatted JSON - Implemented
WorkflowRunVersionVisualizer
inpackages/twenty-front/src/modules/workflow/components/WorkflowRunVersionVisualizer.tsx
to display workflow version visualizers - Created
useWorkflowRun
hook inpackages/twenty-front/src/modules/workflow/hooks/useWorkflowRun.tsx
for fetching workflow run data - Modified
ShowPageRightContainer
inpackages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
to include new 'Output' and 'Flow' tabs for workflow runs - Added
WorkflowRun
andWorkflowRunOutput
types inpackages/twenty-front/src/modules/workflow/types/Workflow.ts
to support new workflow run functionality
6 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/components/WorkflowRunOutputVisualizer.tsx
Outdated
Show resolved
Hide resolved
a231211
to
6359fc5
Compare
} | ||
|
||
return ( | ||
<StyledSourceCode> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could use the <CodeEditor component here. See an example in readonly CodeEditor usage in packages/twenty-front/src/modules/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTestTab.tsx
line 99
<StyledSourceCode> | |
<CodeEditor | |
files={[ | |
{ | |
content: workflowRun.output, | |
language: 'json', | |
path: 'result.any', | |
}, | |
]} | |
currentFilePath={'result.any'} | |
options={{ readOnly: true, domReadOnly: true }} | |
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One required change then LGTM
language="json" | ||
height={200} | ||
onChange={setSettingsServerlessFunctionInput} | ||
options={{ readOnly: true, domReadOnly: true }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning, this is editable, not readonly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. It's fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…t for a serverless function test
b6f3056
to
3262ff2
Compare
3262ff2
to
8c1c579
Compare
In this PR:
CleanShot.2024-10-15.at.14.33.44.mp4