Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function CustomErrorComponent() {
<div className={`h-screen w-full overflow-hidden bg-custom-background-100`}>
<div className="grid h-full place-items-center p-4">
<div className="space-y-8 text-center">
<div className="space-y-2">
<div className="space-y-2 relative flex flex-col justify-center items-center">
<h3 className="text-lg font-semibold">Yikes! That doesn{"'"}t look good.</h3>
<p className="mx-auto md:w-1/2 text-sm text-custom-text-200">
That crashed Plane, pun intended. No worries, though. Our engineers have been notified. If you have more
Expand Down
17 changes: 17 additions & 0 deletions web/core/constants/empty-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "workspace-project-not-found",
WORKSPACE_SETTINGS_API_TOKENS = "workspace-settings-api-tokens",
WORKSPACE_SETTINGS_WEBHOOKS = "workspace-settings-webhooks",
WORKSPACE_SETTINGS_EXPORT = "workspace-settings-export",
Expand Down Expand Up @@ -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",
Expand Down
21 changes: 9 additions & 12 deletions web/core/layouts/auth-layout/project-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -164,15 +165,11 @@ export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
return (
<div className="grid h-screen place-items-center bg-custom-background-100">
<EmptyState
title="No such project exists"
description="Try creating a new project"
image={emptyProject}
primaryButton={{
text: "Create Project",
onClick: () => {
setTrackElement("Projects page empty state");
toggleCreateProjectModal(true);
},
type={EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND}
layout="screen-detailed"
primaryButtonOnClick={() => {
setTrackElement("Projects page empty state");
toggleCreateProjectModal(true)
Comment on lines +168 to +172
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Fix typo in EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND enum value

The enum value is indeed misspelled as "workspave-project-no-found" instead of "workspace-project-not-found". This needs to be corrected for consistency.

  • In web/core/constants/empty-state.ts:
    • Change "workspave-project-no-found" to "workspace-project-not-found"
🔗 Analysis chain

EmptyState implementation looks good, but verify enum spelling.

The EmptyState component implementation aligns well with the PR objectives to fix the project not found state. The layout and click handler are properly configured.

Let's verify the enum value spelling mentioned in the AI summary:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the enum value spelling in empty-state.ts
rg -A 1 "WORKSPACE_PROJECT_NOT_FOUND" web/core/constants/empty-state.ts

Length of output: 343

}}
/>
</div>
Expand Down