Skip to content

Commit 6f40005

Browse files
refactor: make onboarding slimmer (#682)
1 parent 4eb4dc2 commit 6f40005

File tree

19 files changed

+348
-836
lines changed

19 files changed

+348
-836
lines changed

src/app/onboarding/Header.tsx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
import { Box } from "@zenml-io/react-component-library";
1+
import { useCurrentUser } from "@/data/users/current-user-query";
2+
import { getUsername } from "@/lib/user";
3+
import { Skeleton } from "@zenml-io/react-component-library";
4+
import { ProgressIndicatior } from "./ProgressIndicator";
25

36
export function HeaderOnboardingBox() {
47
return (
5-
<Box className="flex flex-col-reverse items-stretch overflow-hidden md:flex-row">
6-
<div className="w-full px-7 py-5 md:w-2/3">
7-
<h2 className="text-display-xs font-semibold">Welcome to ZenML</h2>
8-
<p className="mt-2 text-text-lg text-theme-text-secondary">
9-
You successfully installed the ZenML dashboard. Now you can get started with your new
10-
ZenML server.
8+
<div className="space-between flex flex-col flex-wrap items-center gap-1 space-x-5 overflow-x-hidden lg:flex-row">
9+
<div className="flex-1 space-y-1 overflow-x-hidden">
10+
<h2 className="truncate text-display-xs font-semibold">
11+
Welcome to ZenML
12+
<Username />
13+
</h2>
14+
<p className="truncate text-display-xs text-theme-text-secondary">
15+
You can start by following your quick setup.
1116
</p>
1217
</div>
13-
{/* <div className="flex w-full flex-1 items-center justify-center bg-primary-50 md:w-1/3"></div> */}
14-
</Box>
18+
<ProgressIndicatior />
19+
</div>
1520
);
1621
}
22+
23+
function Username() {
24+
const user = useCurrentUser();
25+
26+
if (user.isError) return null;
27+
if (user.isPending) return <Skeleton className="h-6 w-[70px]" />;
28+
const name = getUsername(user.data);
29+
return <>{name ? `, ${name}` : ""}</>;
30+
}

src/app/onboarding/ProductionSetup/ArtifactStore.tsx

Lines changed: 0 additions & 207 deletions
This file was deleted.

src/app/onboarding/ProductionSetup/ConnectorContent.tsx

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/app/onboarding/ProductionSetup/Items.tsx

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)