Skip to content

Commit

Permalink
[OPIK-566] Remove get-started page (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
andriidudar authored Dec 11, 2024
1 parent e73e2ff commit 10b558e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 184 deletions.
Binary file removed apps/opik-frontend/public/images/demo-project.png
Binary file not shown.
146 changes: 0 additions & 146 deletions apps/opik-frontend/src/components/pages/GetStartedPage/GetStarted.tsx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useMemo, useState } from "react";
import { Link, useRouter, useSearch } from "@tanstack/react-router";
import { Link, useRouter } from "@tanstack/react-router";
import { MoveLeft, SquareArrowOutUpRight } from "lucide-react";

import useAppStore from "@/store/AppStore";
Expand Down Expand Up @@ -90,9 +90,6 @@ const Quickstart: React.FunctionComponent<QuickstartProps> = ({
);

const router = useRouter();
const { from }: { from?: string } = useSearch({ strict: false });
const getBackText =
from === "get-started" ? "Return to ‘Get started’" : "Return back";

const renderMenuItems = () => {
return INTEGRATIONS.map((item, index) => {
Expand Down Expand Up @@ -124,7 +121,7 @@ const Quickstart: React.FunctionComponent<QuickstartProps> = ({
onClick={() => router.history.back()}
>
<MoveLeft className="mr-2 size-4 shrink-0"></MoveLeft>
{getBackText}
Return back
</Button>
</div>
<div className="m-auto flex w-full max-w-[1250px] gap-8">
Expand Down
11 changes: 0 additions & 11 deletions apps/opik-frontend/src/plugins/comet/GetStartedPage.tsx

This file was deleted.

29 changes: 24 additions & 5 deletions apps/opik-frontend/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import DatasetsPage from "@/components/pages/DatasetsPage/DatasetsPage";
import ExperimentsPage from "@/components/pages/ExperimentsPage/ExperimentsPage";
import CompareExperimentsPage from "@/components/pages/CompareExperimentsPage/CompareExperimentsPage";
import FeedbackDefinitionsPage from "@/components/pages/FeedbackDefinitionsPage/FeedbackDefinitionsPage";
import GetStartedPage from "@/components/pages/GetStartedPage/GetStartedPage";
import QuickstartPage from "@/components/pages/QuickstartPage/QuickstartPage";
import HomePage from "@/components/pages/HomePage/HomePage";
import PartialPageLayout from "@/components/layout/PartialPageLayout/PartialPageLayout";
Expand All @@ -27,6 +26,7 @@ import PromptsPage from "@/components/pages/PromptsPage/PromptsPage";
import PromptPage from "@/components/pages/PromptPage/PromptPage";
import RedirectProjects from "@/components/redirect/RedirectProjects";
import RedirectDatasets from "@/components/redirect/RedirectDatasets";
import useAppStore from "@/store/AppStore";

const TanStackRouterDevtools =
process.env.NODE_ENV === "production"
Expand Down Expand Up @@ -60,10 +60,15 @@ const workspaceGuardPartialLayoutRoute = createRoute({
component: () => <WorkspaceGuard Layout={PartialPageLayout} />,
});

const homeRoute = createRoute({
const baseRoute = createRoute({
path: "/",
getParentRoute: () => workspaceGuardRoute,
component: HomePage,
component: () => (
<Navigate
to="/$workspaceName/home"
params={{ workspaceName: useAppStore.getState().activeWorkspaceName }}
/>
),
});

const workspaceRoute = createRoute({
Expand All @@ -79,11 +84,24 @@ const quickstartRoute = createRoute({
component: QuickstartPage,
});

// TODO @deprecated, should be deleted after changes in EM app
// ----------- get started
const getStartedRoute = createRoute({
path: "/$workspaceName/get-started",
getParentRoute: () => workspaceGuardPartialLayoutRoute,
component: GetStartedPage,
component: () => (
<Navigate
to="/$workspaceName/home"
params={{ workspaceName: useAppStore.getState().activeWorkspaceName }}
/>
),
});

// ----------- home
const homeRoute = createRoute({
path: "/$workspaceName/home",
getParentRoute: () => workspaceGuardRoute,
component: HomePage,
});

// ----------- projects
Expand Down Expand Up @@ -239,10 +257,11 @@ const redirectDatasetsRoute = createRoute({

const routeTree = rootRoute.addChildren([
workspaceGuardPartialLayoutRoute.addChildren([
getStartedRoute,
quickstartRoute,
getStartedRoute,
]),
workspaceGuardRoute.addChildren([
baseRoute,
homeRoute,
workspaceRoute.addChildren([
projectsRoute.addChildren([
Expand Down
3 changes: 0 additions & 3 deletions apps/opik-frontend/src/store/PluginsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import WorkspacePreloader from "@/components/shared/WorkspacePreloader/Workspace
type PluginStore = {
Logo: React.ComponentType<{ expanded: boolean }> | null;
UserMenu: React.ComponentType | null;
GetStartedPage: React.ComponentType | null;
QuickstartPage: React.ComponentType | null;
WorkspacePreloader: React.ComponentType<{ children: React.ReactNode }> | null;
init: unknown;
Expand All @@ -17,7 +16,6 @@ const VALID_PLUGIN_FOLDER_NAMES = ["comet"];
const PLUGIN_NAMES = [
"Logo",
"UserMenu",
"GetStartedPage",
"QuickstartPage",
"WorkspacePreloader",
"init",
Expand All @@ -26,7 +24,6 @@ const PLUGIN_NAMES = [
const usePluginsStore = create<PluginStore>((set) => ({
Logo: null,
UserMenu: null,
GetStartedPage: null,
QuickstartPage: null,
WorkspacePreloader: null,
init: null,
Expand Down

0 comments on commit 10b558e

Please sign in to comment.