diff --git a/web/core/components/core/list/list-item.tsx b/web/core/components/core/list/list-item.tsx index 5515a1628df..a64ad910dda 100644 --- a/web/core/components/core/list/list-item.tsx +++ b/web/core/components/core/list/list-item.tsx @@ -18,6 +18,9 @@ interface IListItemProps { parentRef: React.RefObject; disableLink?: boolean; className?: string; + actionItemContainerClassName?: string; + isSidebarOpen?: boolean; + quickActionElement?: JSX.Element; } export const ListItem: FC = (props) => { @@ -32,6 +35,9 @@ export const ListItem: FC = (props) => { parentRef, disableLink = false, className = "", + actionItemContainerClassName = "", + isSidebarOpen = false, + quickActionElement, } = props; // router @@ -45,34 +51,49 @@ export const ListItem: FC = (props) => { return (
- -
-
-
-
- {prependTitleElement && {prependTitleElement}} - - {title} - -
- {appendTitleElement && {appendTitleElement}} -
+
+
+
+ + {prependTitleElement && {prependTitleElement}} + + {title} + + + {appendTitleElement && {appendTitleElement}}
- + {quickActionElement && quickActionElement}
- - {actionableItems && ( -
-
+ {actionableItems && ( +
{actionableItems}
-
- )} + )} +
); }; diff --git a/web/core/components/cycles/list/cycle-list-item-action.tsx b/web/core/components/cycles/list/cycle-list-item-action.tsx index 199fe4233ec..124fe45d5a4 100644 --- a/web/core/components/cycles/list/cycle-list-item-action.tsx +++ b/web/core/components/cycles/list/cycle-list-item-action.tsx @@ -161,7 +161,14 @@ export const CycleListItemAction: FC = observer((props) => { selected={!!cycleDetails.is_favorite} /> )} - +
+ +
); }); diff --git a/web/core/components/cycles/list/cycles-list-item.tsx b/web/core/components/cycles/list/cycles-list-item.tsx index 67983829a35..5cc3400c68d 100644 --- a/web/core/components/cycles/list/cycles-list-item.tsx +++ b/web/core/components/cycles/list/cycles-list-item.tsx @@ -18,6 +18,7 @@ import { generateQueryParams } from "@/helpers/router.helper"; import { useCycle } from "@/hooks/store"; import { useAppRouter } from "@/hooks/use-app-router"; import { usePlatformOS } from "@/hooks/use-platform-os"; +import { CycleQuickActions } from "../quick-actions"; type TCyclesListItem = { cycleId: string; @@ -122,8 +123,19 @@ export const CyclesListItem: FC = observer((props) => { parentRef={parentRef} /> } + quickActionElement={ +
+ +
+ } isMobile={isMobile} parentRef={parentRef} + isSidebarOpen={searchParams.has("peekCycle")} /> ); }); diff --git a/web/core/components/issues/issue-layouts/list/block.tsx b/web/core/components/issues/issue-layouts/list/block.tsx index 6ba4c14f63b..a07a1568481 100644 --- a/web/core/components/issues/issue-layouts/list/block.tsx +++ b/web/core/components/issues/issue-layouts/list/block.tsx @@ -16,7 +16,7 @@ import { IssueProperties } from "@/components/issues/issue-layouts/properties"; // helpers import { cn } from "@/helpers/common.helper"; // hooks -import { useIssueDetail, useProject } from "@/hooks/store"; +import { useAppTheme, useIssueDetail, useProject } from "@/hooks/store"; import { TSelectionHelper } from "@/hooks/use-multiple-select"; import { usePlatformOS } from "@/hooks/use-platform-os"; // types @@ -65,6 +65,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => { const workspaceSlug = routerWorkspaceSlug?.toString(); const projectId = routerProjectId?.toString(); // hooks + const { sidebarCollapsed: isSidebarCollapsed } = useAppTheme(); const { getProjectIdentifierById } = useProject(); const { getIsIssuePeeked, peekIssue, setPeekIssue, subIssues: subIssuesStore } = useIssueDetail(); @@ -133,13 +134,15 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
{ @@ -229,7 +232,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => { id={`issue-${issue.id}`} href={`/${workspaceSlug}/projects/${issue.project_id}/${issue.archived_at ? "archives/" : ""}issues/${ issue.id - }`} + }`} onClick={() => handleIssuePeekOverview(issue)} className="w-full truncate cursor-pointer text-sm text-custom-text-100" disabled={!!issue?.tempId} @@ -241,7 +244,12 @@ export const IssueBlock = observer((props: IssueBlockProps) => { )}
{!issue?.tempId && ( -
+
{quickActions({ issue, parentRef: issueRef, @@ -253,14 +261,19 @@ export const IssueBlock = observer((props: IssueBlockProps) => { {!issue?.tempId ? ( <> -
+
{quickActions({ issue, parentRef: issueRef, diff --git a/web/core/components/modules/module-list-item-action.tsx b/web/core/components/modules/module-list-item-action.tsx index e221904b60d..b1df2d3598e 100644 --- a/web/core/components/modules/module-list-item-action.tsx +++ b/web/core/components/modules/module-list-item-action.tsx @@ -154,12 +154,14 @@ export const ModuleListItemAction: FC = observer((props) => { /> )} {workspaceSlug && projectId && ( - +
+ +
)} ); diff --git a/web/core/components/modules/module-list-item.tsx b/web/core/components/modules/module-list-item.tsx index 8eb1f5b98a2..64627b2abab 100644 --- a/web/core/components/modules/module-list-item.tsx +++ b/web/core/components/modules/module-list-item.tsx @@ -9,7 +9,7 @@ import { Check, Info } from "lucide-react"; import { CircularProgressIndicator } from "@plane/ui"; // components import { ListItem } from "@/components/core/list"; -import { ModuleListItemAction } from "@/components/modules"; +import { ModuleListItemAction, ModuleQuickActions } from "@/components/modules"; // helpers import { generateQueryParams } from "@/helpers/router.helper"; // hooks @@ -109,6 +109,16 @@ export const ModuleListItem: React.FC = observer((props) => { } actionableItems={} + quickActionElement={ +
+ +
+ } isMobile={isMobile} parentRef={parentRef} /> diff --git a/web/core/components/views/view-list-item-action.tsx b/web/core/components/views/view-list-item-action.tsx index 03c27ecb0ea..7740520bac0 100644 --- a/web/core/components/views/view-list-item-action.tsx +++ b/web/core/components/views/view-list-item-action.tsx @@ -95,12 +95,14 @@ export const ViewListItemAction: FC = observer((props) => { /> )} {projectId && workspaceSlug && ( - +
+ +
)} ); diff --git a/web/core/components/views/view-list-item.tsx b/web/core/components/views/view-list-item.tsx index d0c913fae7e..1ba93fc100e 100644 --- a/web/core/components/views/view-list-item.tsx +++ b/web/core/components/views/view-list-item.tsx @@ -9,7 +9,7 @@ import { IProjectView } from "@plane/types"; // components import { Logo } from "@/components/common"; import { ListItem } from "@/components/core/list"; -import { ViewListItemAction } from "@/components/views"; +import { ViewListItemAction, ViewQuickActions } from "@/components/views"; // hooks import { usePlatformOS } from "@/hooks/use-platform-os"; @@ -40,6 +40,16 @@ export const ProjectViewListItem: FC = observer((props) => { title={view.name} itemLink={`/${workspaceSlug}/projects/${projectId}/views/${view.id}`} actionableItems={} + quickActionElement={ +
+ +
+ } isMobile={isMobile} parentRef={parentRef} />