Skip to content

Commit 3de655c

Browse files
fix: home recent n progress (#6648)
1 parent 376f781 commit 3de655c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

web/core/components/core/list/list-item.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { cn } from "@/helpers/common.helper";
88
import { useAppRouter } from "@/hooks/use-app-router";
99

1010
interface IListItemProps {
11+
id?: string;
1112
title: string;
1213
itemLink: string;
1314
onItemClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
@@ -22,10 +23,12 @@ interface IListItemProps {
2223
actionItemContainerClassName?: string;
2324
isSidebarOpen?: boolean;
2425
quickActionElement?: JSX.Element;
26+
preventDefaultNProgress?: boolean;
2527
}
2628

2729
export const ListItem: FC<IListItemProps> = (props) => {
2830
const {
31+
id,
2932
title,
3033
prependTitleElement,
3134
appendTitleElement,
@@ -40,6 +43,7 @@ export const ListItem: FC<IListItemProps> = (props) => {
4043
isSidebarOpen = false,
4144
quickActionElement,
4245
itemClassName = "",
46+
preventDefaultNProgress = false,
4347
} = props;
4448

4549
// router
@@ -56,20 +60,19 @@ export const ListItem: FC<IListItemProps> = (props) => {
5660
<Row
5761
className={cn(
5862
"group min-h-[52px] flex w-full flex-col items-center justify-between gap-3 py-4 text-sm border-b border-custom-border-200 bg-custom-background-100 hover:bg-custom-background-90 ",
59-
{
60-
"xl:gap-5 xl:py-0 xl:flex-row": isSidebarOpen,
61-
"lg:gap-5 lg:py-0 lg:flex-row": !isSidebarOpen,
62-
},
63+
{ "xl:gap-5 xl:py-0 xl:flex-row": isSidebarOpen, "lg:gap-5 lg:py-0 lg:flex-row": !isSidebarOpen },
6364
className
6465
)}
6566
>
6667
<div className={cn("relative flex w-full items-center justify-between gap-3 overflow-hidden", itemClassName)}>
6768
<ControlLink
69+
id={id}
6870
className="relative flex w-full items-center gap-3 overflow-hidden"
6971
href={itemLink}
7072
target="_self"
7173
onClick={handleControlLinkClick}
7274
disabled={disableLink}
75+
data-prevent-nprogress={preventDefaultNProgress}
7376
>
7477
<div className="flex items-center gap-4 truncate">
7578
{prependTitleElement && <span className="flex items-center flex-shrink-0">{prependTitleElement}</span>}

web/core/components/home/widgets/recents/issue.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const RecentIssue = (props: BlockProps) => {
4343
return (
4444
<ListItem
4545
key={activity.id}
46+
id={`issue-${issueDetails?.id}`}
4647
itemLink={workItemLink}
4748
title={issueDetails?.name}
4849
prependTitleElement={
@@ -113,6 +114,7 @@ export const RecentIssue = (props: BlockProps) => {
113114
e.stopPropagation();
114115
setPeekIssue({ workspaceSlug, projectId: issueDetails?.project_id, issueId: activity.entity_data.id });
115116
}}
117+
preventDefaultNProgress
116118
/>
117119
);
118120
};

0 commit comments

Comments
 (0)