Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-5491] refactor: onboarding tour components (#8167)

Prateek Shouryaa05cd88a5378
diff --git a/apps/web/core/components/onboarding/tour/root.tsx b/apps/web/ce/components/onboarding/tour/root.tsx
similarity index 93%
rename from apps/web/core/components/onboarding/tour/root.tsx
rename to apps/web/ce/components/onboarding/tour/root.tsx
index 07db1afb5c..f44cd5a911 100644
--- a/apps/web/core/components/onboarding/tour/root.tsx
+++ b/apps/web/ce/components/onboarding/tour/root.tsx
@@ -18,7 +18,7 @@ import { useUser } from "@/hooks/store/user";
// local imports
import { TourSidebar } from "./sidebar";
-type Props = {
+export type TOnboardingTourProps = {
onComplete: () => void;
};
@@ -28,7 +28,7 @@ const TOUR_STEPS: {
key: TTourSteps;
title: string;
description: string;
- image: any;
+ image: string;
prevStep?: TTourSteps;
nextStep?: TTourSteps;
}[] = [
@@ -75,7 +75,7 @@ const TOUR_STEPS: {
},
];
-export const TourRoot = observer(function TourRoot(props: Props) {
+export const TourRoot = observer(function TourRoot(props: TOnboardingTourProps) {
const { onComplete } = props;
// states
const [step, setStep] = useState<TTourSteps>("welcome");
@@ -89,12 +89,12 @@ export const TourRoot = observer(function TourRoot(props: Props) {
return (
<>
{step === "welcome" ? (
- <div className="h-3/4 w-4/5 overflow-hidden rounded-[10px] bg-custom-background-100 md:w-1/2 lg:w-2/5">
+ <div className="w-4/5 overflow-hidden rounded-[10px] bg-custom-background-100 md:w-1/2 lg:w-2/5">
<div className="h-full overflow-hidden">
- <div className="grid h-3/5 place-items-center bg-custom-primary-100">
- <PlaneLockup className="h-10 w-auto text-custom-text-100" />
+ <div className="grid h-64 place-items-center bg-custom-primary-100">
+ <PlaneLockup className="h-10 w-auto text-white" />
</div>
- <div className="flex h-2/5 flex-col overflow-y-auto p-6">
+ <div className="flex flex-col overflow-y-auto p-6">
<h3 className="font-semibold sm:text-xl">
Welcome to Plane, {currentUser?.first_name} {currentUser?.last_name}
</h3>
@@ -103,7 +103,7 @@ export const TourRoot = observer(function TourRoot(props: Props) {
started by creating a project.
</p>
<div className="flex h-full items-end">
- <div className="mt-8 flex items-center gap-6">
+ <div className="mt-12 flex items-center gap-6">
<Button
variant="primary"
onClick={() => {
diff --git a/apps/web/core/components/onboarding/tour/sidebar.tsx b/apps/web/ce/components/onboarding/tour/sidebar.tsx
similarity index 94%
rename from apps/web/core/components/onboarding/tour/sidebar.tsx
rename to apps/web/ce/components/onboarding/tour/sidebar.tsx
index 27dc5b58d3..1c7abe20f9 100644
--- a/apps/web/core/components/onboarding/tour/sidebar.tsx
+++ b/apps/web/ce/components/onboarding/tour/sidebar.tsx
@@ -1,12 +1,13 @@
-// icons
+// plane imports
import { CycleIcon, ModuleIcon, PageIcon, ViewsIcon, WorkItemsIcon } from "@plane/propel/icons";
+import type { ISvgIcons } from "@plane/propel/icons";
// types
import type { TTourSteps } from "./root";
const sidebarOptions: {
key: TTourSteps;
label: string;
- Icon: any;
+ Icon: React.FC<ISvgIcons>;
}[] = [
{
key: "work-items",
diff --git a/apps/web/core/components/home/root.tsx b/apps/web/core/components/home/root.tsx
index 8274306289..cb56b27991 100644
--- a/apps/web/core/components/home/root.tsx
+++ b/apps/web/core/components/home/root.tsx
@@ -4,15 +4,14 @@ import useSWR from "swr";
// plane imports
import { PRODUCT_TOUR_TRACKER_EVENTS } from "@plane/constants";
import { ContentWrapper } from "@plane/ui";
-// components
-import { TourRoot } from "@/components/onboarding/tour";
// helpers
import { captureSuccess } from "@/helpers/event-tracker.helper";
// hooks
import { useHome } from "@/hooks/store/use-home";
import { useUserProfile, useUser } from "@/hooks/store/user";
-// plane web components
+// plane web imports
import { HomePeekOverviewsRoot } from "@/plane-web/components/home";
+import { TourRoot } from "@/plane-web/components/onboarding/tour/root";
// local imports
import { DashboardWidgets } from "./home-dashboard-widgets";
import { UserGreetingsView } from "./user-greetings";
@@ -53,7 +52,7 @@ export const WorkspaceHomeView = observer(function WorkspaceHomeView() {
return (
<>
{currentUserProfile && !currentUserProfile.is_tour_completed && (
- <div className="fixed left-0 top-0 z-20 grid h-full w-full place-items-center bg-custom-backdrop bg-opacity-50 transition-opacity">
+ <div className="fixed left-0 top-0 z-20 grid h-full w-full place-items-center bg-custom-backdrop bg-opacity-50 transition-opacity overflow-y-auto">
<TourRoot onComplete={handleTourCompleted} />
</div>
)}
diff --git a/apps/web/core/components/onboarding/tour/index.ts b/apps/web/core/components/onboarding/tour/index.ts
deleted file mode 100644
index 1efe34c51e..0000000000
--- a/apps/web/core/components/onboarding/tour/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./root";