Skip to content
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

Show message that workflows feature is experimental #812

Merged
merged 1 commit into from
Sep 11, 2024
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
31 changes: 31 additions & 0 deletions skyvern-frontend/src/routes/workflows/Workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { basicTimeFormat } from "@/util/timeFormat";
import { cn } from "@/util/utils";
import {
ExclamationTriangleIcon,
Pencil2Icon,
PlayIcon,
PlusIcon,
Expand All @@ -39,6 +40,7 @@ import { stringify as convertToYAML } from "yaml";
import { DeleteWorkflowButton } from "./editor/DeleteWorkflowButton";
import { WorkflowCreateYAMLRequest } from "./types/workflowYamlTypes";
import { WorkflowTitle } from "./WorkflowTitle";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";

const emptyWorkflowRequest: WorkflowCreateYAMLRequest = {
title: "New Workflow",
Expand Down Expand Up @@ -143,8 +145,37 @@ function Workflows() {
navigate(path);
}

const showExperimentalMessage =
workflows?.length === 0 && workflowsPage === 1;

return (
<div className="space-y-8">
{showExperimentalMessage && (
<Alert variant="default" className="bg-slate-elevation2">
<AlertTitle>
<div className="flex items-center gap-2">
<ExclamationTriangleIcon className="h-6 w-6" />
<span className="text-xl">Experimental Feature</span>
</div>
</AlertTitle>
<AlertDescription className="text-base text-slate-300">
Workflows are still in experimental mode. Please{" "}
{
<a
href="https://meetings.hubspot.com/skyvern/demo"
target="_blank"
rel="noopener noreferrer"
className="ml-auto underline underline-offset-2"
>
book a demo
</a>
}{" "}
if you'd like to learn more. If you're feeling adventurous, create
your first workflow!
</AlertDescription>
</Alert>
)}

<header className="flex items-center justify-between">
<h1 className="text-2xl font-semibold">Workflows</h1>
<Button
Expand Down
Loading