Skip to content

Commit 32048be

Browse files
[WEB-2432]fix: project not found state and error page alignment (#6095)
* fixed error page alignment and projects empty page * spelling corrected * spelling corrected
1 parent f09e37f commit 32048be

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

web/app/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function CustomErrorComponent() {
3939
<div className={`h-screen w-full overflow-hidden bg-custom-background-100`}>
4040
<div className="grid h-full place-items-center p-4">
4141
<div className="space-y-8 text-center">
42-
<div className="space-y-2">
42+
<div className="space-y-2 relative flex flex-col justify-center items-center">
4343
<h3 className="text-lg font-semibold">Yikes! That doesn{"'"}t look good.</h3>
4444
<p className="mx-auto md:w-1/2 text-sm text-custom-text-200">
4545
That crashed Plane, pun intended. No worries, though. Our engineers have been notified. If you have more

web/core/constants/empty-state.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export enum EmptyStateType {
3535
WORKSPACE_SUBSCRIBED = "workspace-subscribed",
3636
WORKSPACE_CUSTOM_VIEW = "workspace-custom-view",
3737
WORKSPACE_NO_PROJECTS = "workspace-no-projects",
38+
WORKSPACE_PROJECT_NOT_FOUND = "workspace-project-not-found",
3839
WORKSPACE_SETTINGS_API_TOKENS = "workspace-settings-api-tokens",
3940
WORKSPACE_SETTINGS_WEBHOOKS = "workspace-settings-webhooks",
4041
WORKSPACE_SETTINGS_EXPORT = "workspace-settings-export",
@@ -208,6 +209,22 @@ const emptyStateDetails = {
208209
description: "Issues that applies to the filters, track all of them here.",
209210
path: "/empty-state/all-issues/custom-view",
210211
},
212+
[EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND]: {
213+
key: EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND,
214+
title: "No such project exists",
215+
description: 'To create issues or manage your work, you need to create a project or be a part of one.',
216+
path: "/empty-state/onboarding/projects",
217+
primaryButton: {
218+
text: "Create Project",
219+
comicBox: {
220+
title: "Everything starts with a project in Plane",
221+
description: "A project could be a product’s roadmap, a marketing campaign, or launching a new car.",
222+
},
223+
},
224+
225+
accessType: "workspace",
226+
access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER],
227+
},
211228
[EmptyStateType.WORKSPACE_NO_PROJECTS]: {
212229
key: EmptyStateType.WORKSPACE_NO_PROJECTS,
213230
title: "No project",

web/core/layouts/auth-layout/project-wrapper.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import useSWR from "swr";
77

88
// components
99
import { JoinProject } from "@/components/auth-screens";
10-
import { EmptyState, LogoSpinner } from "@/components/common";
10+
import { LogoSpinner } from "@/components/common";
11+
import { EmptyState } from "@/components/empty-state";
1112
import { ETimeLineTypeType } from "@/components/gantt-chart/contexts";
13+
//constants
14+
import { EmptyStateType } from "@/constants/empty-state";
1215
// hooks
1316
import {
1417
useCommandPalette,
@@ -28,8 +31,6 @@ import { useTimeLineChart } from "@/hooks/use-timeline-chart";
2831
import { persistence } from "@/local-db/storage.sqlite";
2932
// plane web constants
3033
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
31-
// images
32-
import emptyProject from "@/public/empty-state/onboarding/dashboard-light.webp";
3334

3435
interface IProjectAuthWrapper {
3536
children: ReactNode;
@@ -164,15 +165,11 @@ export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
164165
return (
165166
<div className="grid h-screen place-items-center bg-custom-background-100">
166167
<EmptyState
167-
title="No such project exists"
168-
description="Try creating a new project"
169-
image={emptyProject}
170-
primaryButton={{
171-
text: "Create Project",
172-
onClick: () => {
173-
setTrackElement("Projects page empty state");
174-
toggleCreateProjectModal(true);
175-
},
168+
type={EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND}
169+
layout="screen-detailed"
170+
primaryButtonOnClick={() => {
171+
setTrackElement("Projects page empty state");
172+
toggleCreateProjectModal(true)
176173
}}
177174
/>
178175
</div>

0 commit comments

Comments
 (0)