π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
chore: issue comment empty state added (#4202)
Anmol Singh Bhatia0a6d7713fb73
diff --git a/web/components/issues/issue-detail/issue-activity/comments/root.tsx b/web/components/issues/issue-detail/issue-activity/comments/root.tsxindex 1db216537e..3381d02c92 100644--- a/web/components/issues/issue-detail/issue-activity/comments/root.tsx+++ b/web/components/issues/issue-detail/issue-activity/comments/root.tsx@@ -1,5 +1,9 @@import { FC } from "react";import { observer } from "mobx-react-lite";+// components+import { EmptyState } from "@/components/empty-state";+// hooks+import { EmptyStateType } from "@/constants/empty-state";// hooksimport { useIssueDetail } from "@/hooks/store";// components@@ -28,18 +32,24 @@ export const IssueCommentRoot: FC<TIssueCommentRoot> = observer((props) => {return (<div>- {commentIds.map((commentId, index) => (- <IssueCommentCard- projectId={projectId}- key={commentId}- workspaceSlug={workspaceSlug}- commentId={commentId}- ends={index === 0 ? "top" : index === commentIds.length - 1 ? "bottom" : undefined}- activityOperations={activityOperations}- showAccessSpecifier={showAccessSpecifier}- disabled={disabled}- />- ))}+ {commentIds.length > 0 ? (+ commentIds.map((commentId, index) => (+ <IssueCommentCard+ projectId={projectId}+ key={commentId}+ workspaceSlug={workspaceSlug}+ commentId={commentId}+ ends={index === 0 ? "top" : index === commentIds.length - 1 ? "bottom" : undefined}+ activityOperations={activityOperations}+ showAccessSpecifier={showAccessSpecifier}+ disabled={disabled}+ />+ ))+ ) : (+ <div className="flex items-center justify-center py-9">+ <EmptyState type={EmptyStateType.ISSUE_COMMENT_EMPTY_STATE} layout="screen-simple" />+ </div>+ )}</div>);});diff --git a/web/constants/empty-state.ts b/web/constants/empty-state.tsindex 6130674fd4..d62c8808eb 100644--- a/web/constants/empty-state.ts+++ b/web/constants/empty-state.ts@@ -532,7 +532,7 @@ const emptyStateDetails = {[EmptyStateType.ISSUE_COMMENT_EMPTY_STATE]: {key: EmptyStateType.ISSUE_COMMENT_EMPTY_STATE,title: "No comments yet",- description: "Comments can be used as a discussion and follow-up space for the issues",+ description: "Comments can be used as a discussion and \n follow-up space for the issues",path: "/empty-state/search/comments",},