From 327d6003edcbf593d629f612728bce646107d658 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Tue, 26 Nov 2024 13:02:12 +0530 Subject: [PATCH 1/3] fixed error page alignment and projects empty page --- web/app/error.tsx | 2 +- web/core/constants/empty-state.ts | 17 +++++++++++++++ .../layouts/auth-layout/project-wrapper.tsx | 21 ++++++++----------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/web/app/error.tsx b/web/app/error.tsx index da5d3bf2003..b176799b4d3 100644 --- a/web/app/error.tsx +++ b/web/app/error.tsx @@ -39,7 +39,7 @@ export default function CustomErrorComponent() {
-
+

Yikes! That doesn{"'"}t look good.

That crashed Plane, pun intended. No worries, though. Our engineers have been notified. If you have more diff --git a/web/core/constants/empty-state.ts b/web/core/constants/empty-state.ts index 267d8cdd798..69dda736659 100644 --- a/web/core/constants/empty-state.ts +++ b/web/core/constants/empty-state.ts @@ -35,6 +35,7 @@ export enum EmptyStateType { WORKSPACE_SUBSCRIBED = "workspace-subscribed", WORKSPACE_CUSTOM_VIEW = "workspace-custom-view", WORKSPACE_NO_PROJECTS = "workspace-no-projects", + WORKSPACE_PROJECT_NOT_FOUND = "workspave-project-no-found", WORKSPACE_SETTINGS_API_TOKENS = "workspace-settings-api-tokens", WORKSPACE_SETTINGS_WEBHOOKS = "workspace-settings-webhooks", WORKSPACE_SETTINGS_EXPORT = "workspace-settings-export", @@ -208,6 +209,22 @@ const emptyStateDetails = { description: "Issues that applies to the filters, track all of them here.", path: "/empty-state/all-issues/custom-view", }, + [EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND]: { + key: EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND, + title: "No such project exists", + description: 'To create issues or manage your work, you need to create a project or be a part of one.', + path: "/empty-state/onboarding/projects", + primaryButton: { + text: "Create Project", + comicBox: { + title: "Everything starts with a project in Plane", + description: "A project could be a product’s roadmap, a marketing campaign, or launching a new car.", + }, + }, + + accessType: "workspace", + access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER], + }, [EmptyStateType.WORKSPACE_NO_PROJECTS]: { key: EmptyStateType.WORKSPACE_NO_PROJECTS, title: "No project", diff --git a/web/core/layouts/auth-layout/project-wrapper.tsx b/web/core/layouts/auth-layout/project-wrapper.tsx index 34df02e06b8..70e427043ed 100644 --- a/web/core/layouts/auth-layout/project-wrapper.tsx +++ b/web/core/layouts/auth-layout/project-wrapper.tsx @@ -7,8 +7,11 @@ import useSWR from "swr"; // components import { JoinProject } from "@/components/auth-screens"; -import { EmptyState, LogoSpinner } from "@/components/common"; +import { LogoSpinner } from "@/components/common"; +import { EmptyState } from "@/components/empty-state"; import { ETimeLineTypeType } from "@/components/gantt-chart/contexts"; +//constants +import { EmptyStateType } from "@/constants/empty-state"; // hooks import { useCommandPalette, @@ -28,8 +31,6 @@ import { useTimeLineChart } from "@/hooks/use-timeline-chart"; import { persistence } from "@/local-db/storage.sqlite"; // plane web constants import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; -// images -import emptyProject from "@/public/empty-state/onboarding/dashboard-light.webp"; interface IProjectAuthWrapper { children: ReactNode; @@ -164,15 +165,11 @@ export const ProjectAuthWrapper: FC = observer((props) => { return (

{ - setTrackElement("Projects page empty state"); - toggleCreateProjectModal(true); - }, + type={EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND} + layout="screen-detailed" + primaryButtonOnClick={() => { + setTrackElement("Projects page empty state"); + toggleCreateProjectModal(true) }} />
From f249b44c8daa6c47d517fe6c1e01004e8eaaf8c6 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Tue, 26 Nov 2024 19:00:23 +0530 Subject: [PATCH 2/3] spelling corrected --- web/core/constants/empty-state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/constants/empty-state.ts b/web/core/constants/empty-state.ts index 69dda736659..bec7463a874 100644 --- a/web/core/constants/empty-state.ts +++ b/web/core/constants/empty-state.ts @@ -35,7 +35,7 @@ export enum EmptyStateType { WORKSPACE_SUBSCRIBED = "workspace-subscribed", WORKSPACE_CUSTOM_VIEW = "workspace-custom-view", WORKSPACE_NO_PROJECTS = "workspace-no-projects", - WORKSPACE_PROJECT_NOT_FOUND = "workspave-project-no-found", + WORKSPACE_PROJECT_NOT_FOUND = "workspave-project-not-found", WORKSPACE_SETTINGS_API_TOKENS = "workspace-settings-api-tokens", WORKSPACE_SETTINGS_WEBHOOKS = "workspace-settings-webhooks", WORKSPACE_SETTINGS_EXPORT = "workspace-settings-export", From 434561a82cae2d1c2aebd59cb61de05bbd0c8442 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Tue, 26 Nov 2024 19:01:18 +0530 Subject: [PATCH 3/3] spelling corrected --- web/core/constants/empty-state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/constants/empty-state.ts b/web/core/constants/empty-state.ts index bec7463a874..a86b18870ad 100644 --- a/web/core/constants/empty-state.ts +++ b/web/core/constants/empty-state.ts @@ -35,7 +35,7 @@ export enum EmptyStateType { WORKSPACE_SUBSCRIBED = "workspace-subscribed", WORKSPACE_CUSTOM_VIEW = "workspace-custom-view", WORKSPACE_NO_PROJECTS = "workspace-no-projects", - WORKSPACE_PROJECT_NOT_FOUND = "workspave-project-not-found", + WORKSPACE_PROJECT_NOT_FOUND = "workspace-project-not-found", WORKSPACE_SETTINGS_API_TOKENS = "workspace-settings-api-tokens", WORKSPACE_SETTINGS_WEBHOOKS = "workspace-settings-webhooks", WORKSPACE_SETTINGS_EXPORT = "workspace-settings-export",