Skip to content

Commit 80fcf95

Browse files
awkoyYaroslav Boiko
andauthored
[OPIK-2399] TS SDK banner in the quickstart page and dialog (#3259)
Co-authored-by: Yaroslav Boiko <[email protected]>
1 parent c350658 commit 80fcf95

File tree

7 files changed

+46
-4
lines changed

7 files changed

+46
-4
lines changed

apps/opik-frontend/src/components/pages-shared/onboarding/IntegrationExplorer/IntegrationExplorer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { IntegrationExplorerProvider } from "./IntegrationExplorerContext";
33

44
import IntegrationSearch from "./IntegrationSearch";
55
import IntegrationQuickInstall from "./IntegrationQuickInstall";
6+
import IntegrationTypeScriptSDK from "./IntegrationTypeScriptSDK";
67
import IntegrationGetHelp from "./IntegrationGetHelp";
78
import IntegrationCopyApiKey from "./IntegrationCopyApiKey";
89
import IntegrationTabs from "./IntegrationTabs";
@@ -15,6 +16,7 @@ export type IntegrationExplorerProps = {
1516
const IntegrationExplorer: React.FunctionComponent<IntegrationExplorerProps> & {
1617
Search: typeof IntegrationSearch;
1718
QuickInstall: typeof IntegrationQuickInstall;
19+
TypeScriptSDK: typeof IntegrationTypeScriptSDK;
1820
GetHelp: typeof IntegrationGetHelp;
1921
CopyApiKey: typeof IntegrationCopyApiKey;
2022
Tabs: typeof IntegrationTabs;
@@ -25,6 +27,7 @@ const IntegrationExplorer: React.FunctionComponent<IntegrationExplorerProps> & {
2527

2628
IntegrationExplorer.Search = IntegrationSearch;
2729
IntegrationExplorer.QuickInstall = IntegrationQuickInstall;
30+
IntegrationExplorer.TypeScriptSDK = IntegrationTypeScriptSDK;
2831
IntegrationExplorer.GetHelp = IntegrationGetHelp;
2932
IntegrationExplorer.CopyApiKey = IntegrationCopyApiKey;
3033
IntegrationExplorer.Tabs = IntegrationTabs;

apps/opik-frontend/src/components/pages-shared/onboarding/IntegrationExplorer/IntegrationQuickInstall.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const IntegrationQuickInstall: React.FC = () => {
3939
<IntegrationCard
4040
title="Quick install with AI assistants"
4141
description="Set up Opik fast with Cursor, Copilot, Windsurf, or your favorite AI assistant."
42+
size="lg"
4243
icon={
4344
<div className="flex items-center gap-1 pr-2">
4445
<img
@@ -58,8 +59,6 @@ const IntegrationQuickInstall: React.FC = () => {
5859
/>
5960
</div>
6061
}
61-
tag="New"
62-
className="mb-4"
6362
onClick={handleQuickInstallClick}
6463
/>
6564

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from "react";
2+
import IntegrationCard from "@/components/pages-shared/onboarding/IntegrationExplorer/components/IntegrationCard";
3+
import tsLogo from "@/icons/ts-logo.svg";
4+
import { buildDocsUrl } from "@/lib/utils";
5+
6+
const IntegrationTypeScriptSDK: React.FC = () => {
7+
return (
8+
<a
9+
href={buildDocsUrl(
10+
"/reference/typescript-sdk/overview",
11+
"&utm_source=opik_frontend&utm_medium=integration_explorer&utm_campaign=typescript_sdk&utm_content=integration_card",
12+
)}
13+
target="_blank"
14+
rel="noopener noreferrer"
15+
data-fs="ts-sdk-docs-link"
16+
>
17+
<IntegrationCard
18+
title="TypeScript SDK"
19+
description="Bring observability and evaluations to your JS apps"
20+
size="lg"
21+
icon={
22+
<img alt="TypeScript" src={tsLogo} className="size-[32px] shrink-0" />
23+
}
24+
tag="New"
25+
/>
26+
</a>
27+
);
28+
};
29+
30+
export default IntegrationTypeScriptSDK;

apps/opik-frontend/src/components/pages-shared/onboarding/IntegrationExplorer/components/IntegrationCard.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type IntegrationCardProps = {
1010
className?: string;
1111
iconClassName?: string;
1212
onClick?: () => void;
13+
size?: "sm" | "lg";
1314
};
1415

1516
const IntegrationCard: React.FC<IntegrationCardProps> = ({
@@ -20,11 +21,13 @@ const IntegrationCard: React.FC<IntegrationCardProps> = ({
2021
className,
2122
iconClassName,
2223
onClick,
24+
size = "sm",
2325
}) => {
2426
return (
2527
<div
2628
className={cn(
2729
"relative flex gap-2 items-center rounded-lg border bg-background p-4 transition-all duration-200 hover:bg-primary-foreground cursor-pointer",
30+
size === "lg" && "min-h-[86px]",
2831
className,
2932
)}
3033
onClick={onClick}

apps/opik-frontend/src/components/pages-shared/onboarding/QuickstartDialog/QuickstartDialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ const QuickstartDialog: React.FC<QuickstartDialogProps> = ({
3333
</div>
3434
</div>
3535

36-
<IntegrationExplorer.QuickInstall />
36+
<div className="mb-4 grid grid-cols-1 gap-4 lg:grid-cols-2">
37+
<IntegrationExplorer.QuickInstall />
38+
<IntegrationExplorer.TypeScriptSDK />
39+
</div>
3740

3841
<IntegrationExplorer.Tabs>
3942
<IntegrationExplorer.Grid />

apps/opik-frontend/src/components/pages/NewQuickstartPage/NewQuickstartPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ const NewQuickstartPage: React.FunctionComponent = () => {
3737
</div>
3838
</div>
3939

40-
<IntegrationExplorer.QuickInstall />
40+
<div className="mb-4 grid grid-cols-1 gap-4 lg:grid-cols-2">
41+
<IntegrationExplorer.QuickInstall />
42+
<IntegrationExplorer.TypeScriptSDK />
43+
</div>
4144

4245
<IntegrationExplorer.Tabs>
4346
<IntegrationExplorer.Grid />
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)