Skip to content

Commit

Permalink
Rename workflow parameter to input parameter (Skyvern-AI#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 28, 2024
1 parent 3fbd183 commit 4ad6072
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function RunWorkflowForm({ workflowParameters, initialValues }: Props) {
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<div className="space-y-8 rounded-lg bg-slate-elevation3 px-6 py-5">
<header>
<h1 className="text-lg">Workflow Parameters</h1>
<h1 className="text-lg">Input Parameters</h1>
</header>
{workflowParameters?.map((parameter) => {
return (
Expand Down Expand Up @@ -198,7 +198,7 @@ function RunWorkflowForm({ workflowParameters, initialValues }: Props) {
);
})}
{workflowParameters.length === 0 && (
<div>No workflow parameters for this workflow.</div>
<div>This workflow doesn't have any input parameters</div>
)}
</div>

Expand Down
5 changes: 4 additions & 1 deletion skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,11 @@ function WorkflowRun() {
{Object.entries(parameters).length > 0 && (
<div className="space-y-4">
<header>
<h2 className="text-lg font-semibold">Parameters</h2>
<h2 className="text-lg font-semibold">Input Parameter Values</h2>
</header>
{Object.entries(parameters).length === 0 && (
<div>This workflow doesn't have any input parameters.</div>
)}
{Object.entries(parameters).map(([key, value]) => {
return (
<div key={key} className="flex flex-col gap-2">
Expand Down
26 changes: 12 additions & 14 deletions skyvern-frontend/src/routes/workflows/WorkflowRunParameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@ function WorkflowRunParameters() {
{} as Record<string, unknown>,
);

const header = (
<header className="space-y-5">
<h1 className="text-3xl">Parameters</h1>
<h2 className="text-lg text-slate-400">
Fill the placeholder values that you have linked throughout your
workflow.
</h2>
</header>
);

if (isFetching) {
return (
<div className="space-y-8">
<header className="space-y-5">
<h1 className="text-3xl">Run Parameters</h1>
<h2 className="text-lg text-slate-400">
Fill the placeholder values that you have linked throughout your
workflow.
</h2>
</header>
{header}
<Skeleton className="h-96 w-full" />
</div>
);
Expand All @@ -84,13 +88,7 @@ function WorkflowRunParameters() {

return (
<div className="space-y-8">
<header className="space-y-5">
<h1 className="text-3xl">Run Parameters</h1>
<h2 className="text-lg text-slate-400">
Fill the placeholder values that you have linked throughout your
workflow.
</h2>
</header>
{header}
<RunWorkflowForm
initialValues={initialValues}
workflowParameters={workflowParameters}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const workflowParameterTypeOptions = [

function header(type: "workflow" | "credential" | "context") {
if (type === "workflow") {
return "Add Workflow Parameter";
return "Add Input Parameter";
}
if (type === "credential") {
return "Add Credential Parameter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const workflowParameterTypeOptions = [

function header(type: "workflow" | "credential" | "context") {
if (type === "workflow") {
return "Edit Workflow Parameter";
return "Edit Input Parameter";
}
if (type === "credential") {
return "Edit Credential Parameter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function WorkflowParametersPanel() {
<div className="relative w-[25rem] rounded-xl border border-slate-700 bg-slate-950 p-5 shadow-xl">
<div className="space-y-4">
<header>
<h1 className="text-lg">Workflow Parameters</h1>
<h1 className="text-lg">Parameters</h1>
<span className="text-sm text-slate-400">
Create placeholder values that you can link in nodes. You will be
prompted to fill them in before running your workflow.
Expand All @@ -79,7 +79,7 @@ function WorkflowParametersPanel() {
});
}}
>
Workflow Parameter
Input Parameter
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => {
Expand Down

0 comments on commit 4ad6072

Please sign in to comment.