From dd2a05cfc718b598fdd44969d4cd756ff61988ff Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Fri, 18 Oct 2024 20:41:09 +0530 Subject: [PATCH 1/2] [WEB-2674] chore: open parent issues in peek-overview from the parent badge. --- .../issues/issue-detail/parent/root.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web/core/components/issues/issue-detail/parent/root.tsx b/web/core/components/issues/issue-detail/parent/root.tsx index 1e8fbb01cd9..b299c970645 100644 --- a/web/core/components/issues/issue-detail/parent/root.tsx +++ b/web/core/components/issues/issue-detail/parent/root.tsx @@ -2,14 +2,15 @@ import { FC } from "react"; import { observer } from "mobx-react"; -import Link from "next/link"; import { MinusCircle } from "lucide-react"; import { TIssue } from "@plane/types"; // component // ui -import { CustomMenu } from "@plane/ui"; +import { ControlLink, CustomMenu } from "@plane/ui"; // hooks import { useIssues, useProjectState } from "@/hooks/store"; +import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; +import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web components import { IssueIdentifier } from "@/plane-web/components/issues"; // types @@ -29,6 +30,8 @@ export const IssueParentDetail: FC = observer((props) => { // hooks const { issueMap } = useIssues(); const { getProjectStates } = useProjectState(); + const { handleRedirection } = useIssuePeekOverviewRedirection(); + const { isMobile } = usePlatformOS(); const parentIssue = issueMap?.[issue.parent_id || ""] || undefined; @@ -42,7 +45,11 @@ export const IssueParentDetail: FC = observer((props) => { return ( <>
- + handleRedirection(workspaceSlug, parentIssue, isMobile)} + >
@@ -56,7 +63,7 @@ export const IssueParentDetail: FC = observer((props) => {
{(parentIssue?.name ?? "").substring(0, 50)}
- +
From 36d92ba07e9553b98930d41c697764fac9fca003 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Mon, 21 Oct 2024 12:34:45 +0530 Subject: [PATCH 2/2] chore: remove `_blank` target from ControlLink. --- web/core/components/issues/issue-detail/parent/root.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/web/core/components/issues/issue-detail/parent/root.tsx b/web/core/components/issues/issue-detail/parent/root.tsx index b299c970645..c96ecd69ac0 100644 --- a/web/core/components/issues/issue-detail/parent/root.tsx +++ b/web/core/components/issues/issue-detail/parent/root.tsx @@ -47,7 +47,6 @@ export const IssueParentDetail: FC = observer((props) => {
handleRedirection(workspaceSlug, parentIssue, isMobile)} >