From 7e21618762acebcdd2f3b8c6cb71b1981fc81fea Mon Sep 17 00:00:00 2001
From: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
Date: Mon, 19 May 2025 15:20:57 +0530
Subject: [PATCH] [WEB-3461] fix: profile activity rendering issue (#7059)
* fix: profile activity
* fix: icon
* fix: handled conversion case
* fix: handled conversion case
---
web/core/components/core/activity.tsx | 34 +++++++++++++++++--
.../activity/profile-activity-list.tsx | 11 +-----
2 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/web/core/components/core/activity.tsx b/web/core/components/core/activity.tsx
index 3febacd2d..0a1245725 100644
--- a/web/core/components/core/activity.tsx
+++ b/web/core/components/core/activity.tsx
@@ -21,7 +21,7 @@ import {
UsersIcon,
} from "lucide-react";
import { IIssueActivity } from "@plane/types";
-import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon, Intake } from "@plane/ui";
+import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon, Intake, EpicIcon } from "@plane/ui";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { generateWorkItemLink } from "@/helpers/issue.helper";
@@ -271,6 +271,12 @@ const activityDetails: {
created
>
);
+ else if (activity.verb === "converted")
+ return (
+ <>
+ converted to an epic
+ >
+ );
else
return (
<>
@@ -280,6 +286,29 @@ const activityDetails: {
},
icon: ,
},
+ epic: {
+ message: (activity) => {
+ if (activity.verb === "created")
+ return (
+ <>
+ created
+ >
+ );
+ else if (activity.verb === "converted")
+ return (
+ <>
+ converted to a work item
+ >
+ );
+ else
+ return (
+ <>
+ deleted
+ >
+ );
+ },
+ icon: ,
+ },
labels: {
message: (activity, showIssue, workspaceSlug) => {
if (activity.old_value === "")
@@ -727,10 +756,11 @@ type ActivityMessageProps = {
export const ActivityMessage = ({ activity, showIssue = false }: ActivityMessageProps) => {
// router params
const { workspaceSlug } = useParams();
+ const activityField = activity.field ?? "issue";
return (
<>
- {activityDetails[activity.field as keyof typeof activityDetails]?.message(
+ {activityDetails[activityField as keyof typeof activityDetails]?.message(
activity,
showIssue,
workspaceSlug ? workspaceSlug.toString() : (activity.workspace_detail?.slug ?? "")
diff --git a/web/core/components/profile/activity/profile-activity-list.tsx b/web/core/components/profile/activity/profile-activity-list.tsx
index 4d10ce2b1..efcd83e73 100644
--- a/web/core/components/profile/activity/profile-activity-list.tsx
+++ b/web/core/components/profile/activity/profile-activity-list.tsx
@@ -113,16 +113,7 @@ export const ProfileActivityListPage: React.FC = observer((props) => {
);
- const message =
- activityItem.verb === "created" &&
- !["cycles", "modules", "attachment", "link", "estimate"].includes(activityItem.field) &&
- !activityItem.field ? (
-
- created
-
- ) : (
-
- );
+ const message = ;
if ("field" in activityItem && activityItem.field !== "updated_by")
return (